1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

* fix mutex_trylock_fail test

This commit is contained in:
Kaspar Schleiser 2010-11-02 11:52:39 +01:00
parent 711ae3b686
commit 82abee6769

View File

@ -7,14 +7,14 @@
mutex_t mutex;
void second_thread(void) {
static void second_thread(void) {
puts(" 2nd: trying to lock mutex...");
mutex_trylock(&mutex);
puts(" 2nd: done.");
}
tcb second_tcb;
char second_stack[KERNEL_CONF_STACKSIZE_MAIN];
static tcb second_tcb;
static char second_stack[KERNEL_CONF_STACKSIZE_MAIN];
void mutex_trylock_fail(char* cmdline)
{
@ -22,7 +22,7 @@ void mutex_trylock_fail(char* cmdline)
mutex_lock(&mutex);
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...");
mutex_unlock(&mutex, true);