|
|
|
@ -29,24 +29,24 @@ static void *_thread(void *arg)
|
|
|
|
|
|
|
|
|
|
thread_flags_t flags;
|
|
|
|
|
|
|
|
|
|
printf("thread(): waiting for 0x1...\n");
|
|
|
|
|
puts("thread(): waiting for 0x1...");
|
|
|
|
|
flags = thread_flags_wait_any(0x1);
|
|
|
|
|
printf("thread(): received flags: 0x%04x\n", (unsigned)flags & 0xFFFF);
|
|
|
|
|
|
|
|
|
|
printf("thread(): waiting for 0x1 || 0x64...\n");
|
|
|
|
|
puts("thread(): waiting for 0x1 || 0x64...");
|
|
|
|
|
flags = thread_flags_wait_any(0x1 | 0x64);
|
|
|
|
|
printf("thread(): received flags: 0x%04x\n", (unsigned)flags & 0xFFFF);
|
|
|
|
|
|
|
|
|
|
printf("thread(): waiting for 0x2 && 0x4...\n");
|
|
|
|
|
puts("thread(): waiting for 0x2 && 0x4...");
|
|
|
|
|
flags = thread_flags_wait_all(0x2 | 0x4);
|
|
|
|
|
printf("thread(): received flags: 0x%04x\n", (unsigned)flags & 0xFFFF);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
printf("thread(): waiting for any flag, one by one\n");
|
|
|
|
|
puts("thread(): waiting for any flag, one by one");
|
|
|
|
|
flags = thread_flags_wait_one(0xFFFF);
|
|
|
|
|
printf("thread(): received flags: 0x%04x\n", (unsigned)flags & 0xFFFF);
|
|
|
|
|
|
|
|
|
|
printf("thread(): waiting for any flag, one by one\n");
|
|
|
|
|
puts("thread(): waiting for any flag, one by one");
|
|
|
|
|
flags = thread_flags_wait_one(0xFFFF);
|
|
|
|
|
printf("thread(): received flags: 0x%04x\n", (unsigned)flags & 0xFFFF);
|
|
|
|
|
|
|
|
|
@ -61,7 +61,7 @@ static void _set(thread_t *thread, thread_flags_t flags)
|
|
|
|
|
|
|
|
|
|
int main(void)
|
|
|
|
|
{
|
|
|
|
|
printf("main starting\n");
|
|
|
|
|
puts("main starting");
|
|
|
|
|
|
|
|
|
|
kernel_pid_t pid = thread_create(stack,
|
|
|
|
|
sizeof(stack),
|
|
|
|
|