Exemple #1
0
void *dim_tcpip_thread(void *tag)
{
	extern int dim_tcpip_init();
	extern void tcpip_task();
	/*	
	int prio;
		
	thr_getprio(thr_self(),&prio);
	thr_setprio(thr_self(),prio+10);
	*/
	if(tag){}
	IO_thread = pthread_self();

	dim_tcpip_init(1);
	if(INIT_thread)
	{
#ifndef darwin
		sem_post(&DIM_INIT_Sema);
#else
		sem_post(DIM_INIT_Semap);
#endif
	}
	while(1)
    {
		tcpip_task();
		/*
#ifndef darwin
		sem_post(&DIM_WAIT_Sema);
#else
		sem_post(DIM_WAIT_Semap);
#endif
		*/
		dim_signal_cond();
    }
}
Exemple #2
0
void *dim_tcpip_thread(void *tag)
{
	sigset_t set1, set2;
	int signo;
	/*	
	int prio;
		
	thr_getprio(thr_self(),&prio);
	thr_setprio(thr_self(),prio+10);
	*/
	IO_thread = pthread_self();

	dim_tcpip_init(1);
	while(1)
    {
		if(INIT_thread)
#ifndef darwin
			sem_post(&DIM_INIT_Sema);
#else
			sem_post(DIM_INIT_Semap);
#endif
		tcpip_task();
#ifndef darwin
		sem_post(&DIM_WAIT_Sema);
#else
		sem_post(DIM_WAIT_Semap);
#endif
    }
}