summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2012-04-08 18:23:01 -0700
committerPixel <pixel@nobis-crew.org>2012-04-08 18:23:01 -0700
commit0e9a58842a03ca7e15cf81a9954684d29a025798 (patch)
treebe403816e1d7f6d6202c4b405a2a49ed31245c5f /includes
parent15d724abee8a610cce5544024454e27b6e4cdb16 (diff)
Renaming 'StacklessWait' into 'StacklessWaitCond', and adding 'StacklessOperationOrCond'.
Diffstat (limited to 'includes')
-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__: { \