www.pudn.com > Tornado_Train_Workshop_demo_program.rar > semB.c


#include "vxWorks.h" 
#include "semLib.h" 
#include "stdio.h" 
#include "taskLib.h" 
 
void semB (SEM_ID semId) 
	{ 
	FOREVER 
		{ 
		if (semTake (semId, WAIT_FOREVER) == ERROR) 
			{ 
			printErr ("semTake failed\n"); 
			return; 
			} 
		printf ("%s task took semaphore\n", taskName (0)); 
		} 
	}