diff --git a/tests/thread_flags/main.c b/tests/thread_flags/main.c index e4364a5a81..046973423f 100644 --- a/tests/thread_flags/main.c +++ b/tests/thread_flags/main.c @@ -23,6 +23,8 @@ static char stack[THREAD_STACKSIZE_MAIN]; +volatile unsigned done; + static void *_thread(void *arg) { (void) arg; @@ -50,6 +52,8 @@ static void *_thread(void *arg) flags = thread_flags_wait_one(0xFFFF); printf("thread(): received flags: 0x%04x\n", (unsigned)flags & 0xFFFF); + done = 1; + return NULL; } @@ -79,6 +83,9 @@ int main(void) _set(thread, 0x2); _set(thread, 0x4); - while(1) {}; + while(!done) {}; + + puts("test finished."); + return 0; }