mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
use CREATE_WOUT_YIELD on uart0 thread creation
This should remove a race condition in the case that some uart event occurs after the uart0 thread has started and before control has returned to the calling thread, as uart0_handler_pid would not have been set yet.
This commit is contained in:
parent
9f0aed27f3
commit
0f066befeb
@ -25,7 +25,7 @@ static void uart0_loop(void)
|
||||
void board_uart0_init(void)
|
||||
{
|
||||
ringbuffer_init(&uart0_ringbuffer, buffer, UART0_BUFSIZE);
|
||||
int pid = thread_create(uart0_thread_stack, sizeof(uart0_thread_stack), PRIORITY_MAIN - 1, CREATE_STACKTEST, uart0_loop, "uart0");
|
||||
int pid = thread_create(uart0_thread_stack, sizeof(uart0_thread_stack), PRIORITY_MAIN - 1, CREATE_STACKTEST|CREATE_WOUT_YIELD, uart0_loop, "uart0");
|
||||
uart0_handler_pid = pid;
|
||||
puts("uart0_init() [OK]");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user