summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/StacklessTask.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/includes/StacklessTask.h b/includes/StacklessTask.h
index d21c63a..bb18a7a 100644
--- a/includes/StacklessTask.h
+++ b/includes/StacklessTask.h
@@ -31,6 +31,20 @@ class StacklessTask : public Task {
} \
+#define StacklessOperationOrCond(operation, cond) \
+ m_state = __LINE__; \
+ } \
+ case __LINE__: { \
+ try { \
+ if (!(cond)) { \
+ operation; \
+ } \
+ } \
+ catch (Balau::EAgain & e) { \
+ taskSwitch(); \
+ } \
+
+
#define StacklessWaitFor(evt) \
m_state = __LINE__; \
waitFor(evt); \
@@ -39,7 +53,7 @@ class StacklessTask : public Task {
case __LINE__: { \
-#define StacklessWait(cond) \
+#define StacklessWaitCond(cond) \
m_state = __LINE__; \
} \
case __LINE__: { \