From 92c56e129bae6dd054c89a6077009e25da5b7e29 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Fri, 1 Nov 2013 01:56:33 +0000 Subject: [cmdline] Rewrite "sync" command to use monojob_wait() Signed-off-by: Michael Brown --- src/core/pending.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'src/core') diff --git a/src/core/pending.c b/src/core/pending.c index c2671a688..7bb0c2e00 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; -} -- cgit v1.2.3-55-g7522