FIX: uhm .. forgotten to fix some stuff
This commit is contained in:
parent
3e8d8590e9
commit
dbb3b2e2e7
2 changed files with 20 additions and 16 deletions
|
|
@ -52,8 +52,10 @@
|
|||
cnd, (lumiera_sectionlock_unlock_fn) lumiera_condition_unlock \
|
||||
NOBUG_ALPHA_COMMA(&NOBUG_FLAG(nobugflag)) NOBUG_ALPHA_COMMA_NULL}; \
|
||||
({ \
|
||||
lumiera_lock_section_.lock = \
|
||||
lumiera_condition_lock (cnd, &NOBUG_FLAG(nobugflag), &lumiera_lock_section_.rh); \
|
||||
if (lumiera_lock_section_.lock) \
|
||||
lumiera_lock_section_.lock = \
|
||||
lumiera_condition_lock (cnd, &NOBUG_FLAG(nobugflag), &lumiera_lock_section_.rh); \
|
||||
lumiera_lock_section_.lock; \
|
||||
}); \
|
||||
({ \
|
||||
LUMIERA_CONDITION_SECTION_UNLOCK; \
|
||||
|
|
@ -123,7 +125,7 @@
|
|||
*/
|
||||
#define LUMIERA_CONDITION_SIGNAL \
|
||||
do { \
|
||||
REQUIRE (lumiera_cond_section_.lock, "Condition mutex not locked"); \
|
||||
REQUIRE (lumiera_lock_section_.lock, "Condition mutex not locked"); \
|
||||
lumiera_condition_signal (lumiera_lock_section_.lock, \
|
||||
lumiera_lock_section_.flag); \
|
||||
} while (0)
|
||||
|
|
@ -136,7 +138,7 @@
|
|||
*/
|
||||
#define LUMIERA_CONDITION_BROADCAST \
|
||||
do { \
|
||||
REQUIRE (lumiera_cond_section_.lock, "Condition mutex not locked"); \
|
||||
REQUIRE (lumiera_lock_section_.lock, "Condition mutex not locked"); \
|
||||
lumiera_condition_broadcast (lumiera_lock_section_.lock, \
|
||||
lumiera_lock_section_.flag); \
|
||||
} while (0)
|
||||
|
|
|
|||
|
|
@ -44,17 +44,19 @@
|
|||
* @param nobugflag NoBug flag used to log actions on the condition
|
||||
* @param cnd Condition variable to be locked
|
||||
*/
|
||||
#define LUMIERA_RECCONDITION_SECTION(nobugflag, cnd) \
|
||||
for (lumiera_sectionlock NOBUG_CLEANUP(lumiera_sectionlock_ensureunlocked) \
|
||||
lumiera_lock_section_ = { \
|
||||
cnd, (lumiera_sectionlock_unlock_fn) lumiera_reccondition_unlock \
|
||||
NOBUG_ALPHA_COMMA(&NOBUG_FLAG(nobugflag)) NOBUG_ALPHA_COMMA_NULL}; \
|
||||
({ \
|
||||
lumiera_lock_section_.lock = \
|
||||
lumiera_reccondition_lock (cnd, &NOBUG_FLAG(nobugflag), &lumiera_lock_section_.rh); \
|
||||
}); \
|
||||
({ \
|
||||
LUMIERA_RECCONDITION_SECTION_UNLOCK; \
|
||||
#define LUMIERA_RECCONDITION_SECTION(nobugflag, cnd) \
|
||||
for (lumiera_sectionlock NOBUG_CLEANUP(lumiera_sectionlock_ensureunlocked) \
|
||||
lumiera_lock_section_ = { \
|
||||
cnd, (lumiera_sectionlock_unlock_fn) lumiera_reccondition_unlock \
|
||||
NOBUG_ALPHA_COMMA(&NOBUG_FLAG(nobugflag)) NOBUG_ALPHA_COMMA_NULL}; \
|
||||
({ \
|
||||
if (lumiera_lock_section_.lock) \
|
||||
lumiera_lock_section_.lock = \
|
||||
lumiera_reccondition_lock (cnd, &NOBUG_FLAG(nobugflag), &lumiera_lock_section_.rh); \
|
||||
lumiera_lock_section_.lock; \
|
||||
}); \
|
||||
({ \
|
||||
LUMIERA_RECCONDITION_SECTION_UNLOCK; \
|
||||
}))
|
||||
|
||||
|
||||
|
|
@ -92,7 +94,7 @@
|
|||
do { \
|
||||
REQUIRE (lumiera_lock_section_.lock, "Reccondition mutex not locked"); \
|
||||
lumiera_reccondition_wait (lumiera_lock_section_.lock, \
|
||||
NOBUG_FLAG_RAW(lumiera_lock_section_.flag), \
|
||||
lumiera_lock_section_.flag, \
|
||||
&lumiera_lock_section_.rh); \
|
||||
} while (!(expr))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue