summaryrefslogtreecommitdiffstats
path: root/src/core/pending.c
diff options
context:
space:
mode:
authorMichael Brown2013-11-01 02:56:33 +0100
committerMichael Brown2013-11-01 18:00:16 +0100
commit92c56e129bae6dd054c89a6077009e25da5b7e29 (patch)
tree3485ab2d93a8e2f184d1859a3a9aa76b27ffc40b /src/core/pending.c
parent[monojob] Report ongoing job status as overall return status on timeout (diff)
downloadipxe-92c56e129bae6dd054c89a6077009e25da5b7e29.tar.gz
ipxe-92c56e129bae6dd054c89a6077009e25da5b7e29.tar.xz
ipxe-92c56e129bae6dd054c89a6077009e25da5b7e29.zip
[cmdline] Rewrite "sync" command to use monojob_wait()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/core/pending.c')
-rw-r--r--src/core/pending.c20
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;
-}