Sleep doesn't wake up by using multple threads

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 Thread\n");

	for (;;){
		printf("Thread1: Test :D\n");
		vtimer_usleep(10 *SEC_IN_USEC);
	}
}

void* thread_func(void* foo){
	printf("Start new Thread\n");
	for (;;){
		printf("Thread2: Test :D\n");
		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?

Hi Andreas,

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...

welcome to RIOT.

void* thread_func(void* foo){

Are you using the original RIOT toolchain? You should have gotten a "unused variable 'foo'" here which is treated as error and stops building.

Created new Thread Thread1: Test :smiley: Start new Thread Thread2: Test :smiley:

Can you help me?

I'm assuming you *really* waited more than 10s, and dont get *any* further reaction?

greetings Paul