mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
unittests/ubjson: Use MUTEX_INIT to initialize mutexes
This commit is contained in:
parent
8b6308d89b
commit
a6eda18099
@ -81,11 +81,11 @@ void test_ubjson_test(void (*sender_fun)(void), void (*receiver_fun)(void))
|
||||
test_ubjson_receiver_data_t data = {
|
||||
.run = receiver_fun,
|
||||
.main_thread = (tcb_t *) sched_active_thread,
|
||||
.mutexes = {
|
||||
{ 1, PRIORITY_QUEUE_INIT },
|
||||
{ 1, PRIORITY_QUEUE_INIT },
|
||||
},
|
||||
.mutexes = { MUTEX_INIT, MUTEX_INIT },
|
||||
};
|
||||
mutex_lock(&data.mutexes[0]);
|
||||
mutex_lock(&data.mutexes[1]);
|
||||
|
||||
kernel_pid_t receiver_pid = thread_create(receiver_stack, sizeof(receiver_stack),
|
||||
THREAD_PRIORITY_MAIN, CREATE_WOUT_YIELD,
|
||||
test_ubjson_receiver_trampoline, &data, "receiver");
|
||||
|
Loading…
Reference in New Issue
Block a user