diff options
author | Michael Brown <mcb30@ipxe.org> | 2013-11-01 01:56:33 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2013-11-01 17:00:16 +0000 |
commit | 92c56e129bae6dd054c89a6077009e25da5b7e29 (patch) | |
tree | 3485ab2d93a8e2f184d1859a3a9aa76b27ffc40b /src/core | |
parent | dc7a023715e8c317e8013737ccd8960ff781a15c (diff) | |
download | ipxe-92c56e129bae6dd054c89a6077009e25da5b7e29.tar.gz |
[cmdline] Rewrite "sync" command to use monojob_wait()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/pending.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/core/pending.c b/src/core/pending.c index c2671a68..7bb0c2e0 100644 --- a/src/core/pending.c +++ b/src/core/pending.c @@ -31,7 +31,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); */ /** Total count of pending operations */ -static int pending_total; +int pending_total; /** * Mark an operation as pending @@ -60,21 +60,3 @@ void pending_put ( struct pending_operation *pending ) { pending, pending->count, pending_total ); } } - -/** - * Wait for pending operations to complete - * - * @v timeout Timeout period, in ticks (0=indefinite) - * @ret rc Return status code - */ -int pending_wait ( unsigned long timeout ) { - unsigned long start = currticks(); - - do { - if ( pending_total == 0 ) - return 0; - step(); - } while ( ( timeout == 0 ) || ( ( currticks() - start ) < timeout ) ); - - return -ETIMEDOUT; -} |