Skip to content
Snippets Groups Projects
Commit 82abee67 authored by Kaspar Schleiser's avatar Kaspar Schleiser
Browse files

* fix mutex_trylock_fail test

parent 711ae3b6
No related branches found
No related tags found
No related merge requests found
...@@ -7,14 +7,14 @@ ...@@ -7,14 +7,14 @@
mutex_t mutex; mutex_t mutex;
void second_thread(void) { static void second_thread(void) {
puts(" 2nd: trying to lock mutex..."); puts(" 2nd: trying to lock mutex...");
mutex_trylock(&mutex); mutex_trylock(&mutex);
puts(" 2nd: done."); puts(" 2nd: done.");
} }
tcb second_tcb; static tcb second_tcb;
char second_stack[KERNEL_CONF_STACKSIZE_MAIN]; static char second_stack[KERNEL_CONF_STACKSIZE_MAIN];
void mutex_trylock_fail(char* cmdline) void mutex_trylock_fail(char* cmdline)
{ {
...@@ -22,7 +22,7 @@ void mutex_trylock_fail(char* cmdline) ...@@ -22,7 +22,7 @@ void mutex_trylock_fail(char* cmdline)
mutex_lock(&mutex); mutex_lock(&mutex);
puts("main: creating thread..."); puts("main: creating thread...");
int pid = thread_create(&second_tcb, second_stack, KERNEL_CONF_STACKSIZE_MAIN, PRIORITY_MAIN-1, CREATE_STACKTEST, second_thread, "nr2"); thread_create(&second_tcb, second_stack, KERNEL_CONF_STACKSIZE_MAIN, PRIORITY_MAIN-1, CREATE_STACKTEST, second_thread, "nr2");
puts("main: thread created. Unlocking mutex..."); puts("main: thread created. Unlocking mutex...");
mutex_unlock(&mutex, true); mutex_unlock(&mutex, true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment