doc/porting/sync_v1.c
/*
 *
 * @param taskname    task identification string
 * @param mySem       task's own semaphore
 * @param otherSem    other task's semaphore
 *
 */
@param taskname    task identification string
@param mySem       task's own semaphore
@param otherSem    other task's semaphore
@param taskname task identification string @param mySem task ' s own semaphore @param otherSem other task ' s semaphore
void helloLoop(const char *taskname, ksem_t mySem, ksem_t otherSem)
{
	while (1) {
		task_sem_take(mySem, TICKS_UNLIMITED);
		printk("%s: Hello World from %s!\n", taskname, CONFIG_ARCH);
		task_sleep(SLEEPTICKS);
		task_sem_give(otherSem);
	}
}
void helloLoop ( const char * taskname , ksem_t mySem , ksem_t otherSem ) { while ( 1 ) { task_sem_take ( mySem , TICKS_UNLIMITED ) ; printk ( " \n " , taskname , CONFIG_ARCH ) ; task_sleep ( SLEEPTICKS ) ; task_sem_give ( otherSem ) ; } }
@param taskname    task identification string
 @param mySem       task's own semaphore
 @param otherSem    other task's semaphore
@param taskname task identification string @param mySem task ' s own semaphore @param otherSem other task ' s semaphore
/* say "hello" */ /* wait a while, then let other task have a turn */