From d92a3bd5b06c8555f919d10eafc49eac3f187c96 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Tue, 21 Feb 2017 10:37:47 +0100 Subject: [PATCH] tests: thread_flags: print success message --- tests/thread_flags/main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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; }