
TESTING "Locking" ./test-locking

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


TEST "chained mutex section" chainedmutexsection <<END
out: outer mutex locked section
out: inner but not outer mutex locked section
END


TEST "recursive mutex section" recursivemutexsection <<END
out: mutex locked once
out: mutex locked twice
END


TEST "rwlock section" rwlocksection <<END
out: write locked section 1
out: read locked section 2
END


TEST "rwlock not unlocked asserts" rwlockforgotunlock <<END
return: 134
END


TEST "condition not unlocked asserts" conditionforgotunlock <<END
return: 134
END

TEST "condition section" conditionsection <<END
out: condition locked section 1
out: condition locked section 2
END

PLANNED "condition signaling" <<END
END

PLANNED "condition broadcasting" <<END
END


