Some label fixes
This commit is contained in:
@@ -45,7 +45,7 @@ static void test_thread_start_stop(void **state) {
|
||||
}
|
||||
|
||||
static void test_thread_should_stop(void **state) {
|
||||
// threadStop blocks until STOPPED — if threadShouldStop is broken the
|
||||
// threadStop blocks until STOPPED - if threadShouldStop is broken the
|
||||
// looping callback never exits and this test hangs / times out.
|
||||
thread_t thread;
|
||||
threadInit(&thread, helper_loop);
|
||||
@@ -108,12 +108,12 @@ typedef struct {
|
||||
static void helper_trylock(thread_t *thread) {
|
||||
trylock_data_t *data = (trylock_data_t *)thread->data;
|
||||
|
||||
// Phase 1: main holds the lock — trylock must fail.
|
||||
// Phase 1: main holds the lock - trylock must fail.
|
||||
while(data->phase != 1) {}
|
||||
data->resultWhileLocked = threadMutexTryLock(data->target);
|
||||
data->phase = 2;
|
||||
|
||||
// Phase 3: main released the lock — trylock must succeed.
|
||||
// Phase 3: main released the lock - trylock must succeed.
|
||||
while(data->phase != 3) {}
|
||||
data->resultAfterUnlock = threadMutexTryLock(data->target);
|
||||
if(data->resultAfterUnlock) {
|
||||
|
||||
Reference in New Issue
Block a user