summaryrefslogtreecommitdiffstats
path: root/src/include/gpxe
diff options
context:
space:
mode:
authorMichael Brown2007-01-29 05:15:24 +0100
committerMichael Brown2007-01-29 05:15:24 +0100
commit1a79437888be127a1a966e20145d79e0673275d1 (patch)
tree1a6bbbf47d83af7908a15f7a9dfbcc2ab4da3582 /src/include/gpxe
parentMoved most buffer debug messages to DBG2. (diff)
downloadipxe-1a79437888be127a1a966e20145d79e0673275d1.tar.gz
ipxe-1a79437888be127a1a966e20145d79e0673275d1.tar.xz
ipxe-1a79437888be127a1a966e20145d79e0673275d1.zip
Added async_block_progress() and default SIGUPDATE handler.
Diffstat (limited to 'src/include/gpxe')
-rw-r--r--src/include/gpxe/async.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/include/gpxe/async.h b/src/include/gpxe/async.h
index 42ee93d59..2d1d31a4a 100644
--- a/src/include/gpxe/async.h
+++ b/src/include/gpxe/async.h
@@ -204,4 +204,25 @@ static inline aid_t async_init_orphan ( struct async *async ) {
rc; \
} )
+/**
+ * Execute and block on an asynchronous operation, with progress indicator
+ *
+ * @v async_temp Temporary asynchronous operation structure to use
+ * @v START Code used to start the asynchronous operation
+ * @ret rc Return status code
+ *
+ * As for async_block(), the argument START is a code snippet; it
+ * should initiate an asynchronous operation as a child of @c
+ * async_temp and return an error status code if it failed to do so
+ * (e.g. due to malloc() failure).
+ */
+#define async_block_progress( async_temp, START ) ( { \
+ int rc; \
+ \
+ async_init_orphan ( async_temp ); \
+ if ( ( rc = START ) == 0 ) \
+ async_wait_progress ( async_temp, &rc );\
+ rc; \
+ } )
+
#endif /* _GPXE_ASYNC_H */