Merge pull request #6636 from kaspar030/fix_tests_thread_flag
tests: thread_flags: print success message
This commit is contained in:
commit
a8bc77b35b
@ -23,6 +23,8 @@
|
|||||||
|
|
||||||
static char stack[THREAD_STACKSIZE_MAIN];
|
static char stack[THREAD_STACKSIZE_MAIN];
|
||||||
|
|
||||||
|
volatile unsigned done;
|
||||||
|
|
||||||
static void *_thread(void *arg)
|
static void *_thread(void *arg)
|
||||||
{
|
{
|
||||||
(void) arg;
|
(void) arg;
|
||||||
@ -50,6 +52,8 @@ static void *_thread(void *arg)
|
|||||||
flags = thread_flags_wait_one(0xFFFF);
|
flags = thread_flags_wait_one(0xFFFF);
|
||||||
printf("thread(): received flags: 0x%04x\n", (unsigned)flags & 0xFFFF);
|
printf("thread(): received flags: 0x%04x\n", (unsigned)flags & 0xFFFF);
|
||||||
|
|
||||||
|
done = 1;
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,6 +83,9 @@ int main(void)
|
|||||||
_set(thread, 0x2);
|
_set(thread, 0x2);
|
||||||
_set(thread, 0x4);
|
_set(thread, 0x4);
|
||||||
|
|
||||||
while(1) {};
|
while(!done) {};
|
||||||
|
|
||||||
|
puts("test finished.");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user