2010-09-22 15:10:42 +02:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <thread.h>
|
|
|
|
#include <flags.h>
|
|
|
|
#include <kernel.h>
|
|
|
|
|
|
|
|
void second_thread(void) {
|
|
|
|
printf("second_thread starting.\n");
|
|
|
|
|
|
|
|
puts("2nd: running...");
|
|
|
|
}
|
|
|
|
|
2010-10-25 15:40:01 +02:00
|
|
|
char second_thread_stack[8192];
|
|
|
|
|
2010-09-22 15:10:42 +02:00
|
|
|
int main(void)
|
|
|
|
{
|
2010-11-04 16:47:24 +01:00
|
|
|
int pid = thread_create(second_thread_stack, sizeof(second_thread_stack), PRIORITY_MAIN-1, CREATE_WOUT_YIELD | CREATE_STACKTEST, second_thread, "nr2");
|
2010-09-22 15:10:42 +02:00
|
|
|
puts("Main thread exiting...");
|
|
|
|
}
|