Hi,

I'm new at developing applications for riot and I'm trying to
run two threads in one application. When the threas call sleep they were
not woken up by the OS. I don't know why...

This is my code:

#include
<pthread.h>
#include <unistd.h>
#include <stdio.h>
#include
"vtimer.h"

int main(void);
void* thread_func(void* foo);

int
main(void){
 pthread_t t;

 pthread_create(&t, NULL, thread_func,
NULL);
 printf("Created new Threadn");

 for (;;){
 printf("Thread1:
Test :Dn");
 vtimer_usleep(10 *SEC_IN_USEC);
 }
}

void*
thread_func(void* foo){
 printf("Start new Threadn");
 for (;;){

printf("Thread2: Test :Dn");
 vtimer_usleep(10 *SEC_IN_USEC);
 }
}

And
the output is:

RIOT native interrupts/signals
initialized.
LED_GREEN_OFF
LED_RED_ON
RIOT native board
initialized.
RIOT native hardware initialization
complete.

kernel_init(): This is RIOT! (Version: UNKNOWN (builddir:
/home/andreas/workspace/portToRiot/platform/riot))
kernel_init():
jumping into first task...
Initilaized sDDS
Created new Thread
Thread1:
Test :D
Start new Thread
Thread2: Test :D

Can you help me?
 
_______________________________________________
users mailing list
[email protected]
http://lists.riot-os.org/mailman/listinfo/users

Reply via email to