Acquiring mutexes is now wraped in a easy to use MUTEX_SECTION macro. This scheme will be extended for chained lock propagation soon. Notes: * NoBug resourcemanagement is now part of the lower layer, RESOURCE_ENTER/RESOUCE_LEAVE are maintained automatically * one must still call RESOURCE_ANNOUNCE/RESOURCE_FORGET, because we want to maintain high level information about resources. * MUTEX_SECTIONS must not be left with any kind of jump
26 lines
421 B
Text
26 lines
421 B
Text
|
|
TESTING "Locking" ./test-locking
|
|
|
|
TEST "condition not unlocked asserts" conditionforgotunlock <<END
|
|
return: 134
|
|
END
|
|
|
|
|
|
|
|
|
|
|
|
TEST "mutex section" mutexsection <<END
|
|
out: mutex locked section 1
|
|
out: mutex locked section 2
|
|
END
|
|
|
|
|
|
TEST "mutex not unlocked asserts" mutexforgotunlock <<END
|
|
return: 134
|
|
END
|
|
|
|
|
|
TEST "nested mutex section" nestedmutexsection <<END
|
|
out: outer mutex locked section
|
|
out: inner mutex locked section
|
|
END
|