mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
[projects test_*]
* fixed some tests
This commit is contained in:
parent
3b4de3d39c
commit
ff7892e898
@ -79,4 +79,5 @@ expect {
|
|||||||
timeout { exit 1 }
|
timeout { exit 1 }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sleep 1
|
||||||
puts "\nTest successful!\n"
|
puts "\nTest successful!\n"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
SubDir TOP projects test_thread_exit ;
|
SubDir TOP projects test_thread_basic ;
|
||||||
|
|
||||||
Module test_thread_exit : main.c ;
|
Module test_thread_basic : main.c ;
|
||||||
|
|
||||||
UseModule test_thread_exit ;
|
UseModule test_thread_basic ;
|
||||||
|
@ -3,12 +3,16 @@
|
|||||||
#include <flags.h>
|
#include <flags.h>
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
|
|
||||||
|
#define STACK_SIZE (8192)
|
||||||
|
|
||||||
|
char t2_stack[STACK_SIZE];
|
||||||
|
|
||||||
void second_thread(void) {
|
void second_thread(void) {
|
||||||
puts("second thread\n");
|
puts("second thread\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
int pid = thread_create(8192, PRIORITY_MAIN-1, CREATE_WOUT_YIELD | CREATE_STACKTEST, second_thread, "nr2");
|
(void) thread_create(t2_stack, STACK_SIZE, PRIORITY_MAIN-1, CREATE_WOUT_YIELD | CREATE_STACKTEST, second_thread, "nr2");
|
||||||
puts("first thread\n");
|
puts("first thread\n");
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,6 @@ char second_thread_stack[8192];
|
|||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
int pid = thread_create(second_thread_stack, sizeof(second_thread_stack), PRIORITY_MAIN-1, CREATE_WOUT_YIELD | CREATE_STACKTEST, second_thread, "nr2");
|
(void) thread_create(second_thread_stack, sizeof(second_thread_stack), PRIORITY_MAIN-1, CREATE_WOUT_YIELD | CREATE_STACKTEST, second_thread, "nr2");
|
||||||
puts("Main thread exiting...");
|
puts("Main thread exiting...");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user