Exemple #1
0
static void timer_sema_peek_1Hz(void *arg)
{
	GL_UINT32 value;

	GL_TraceInfo("[%s]GL_SemaphorePeek: addr=0x%x\n", __FUNCTION__, (unsigned int)cross_semid);
	if(GL_SUCCESS != GL_SemaphorePeek(cross_semid, &value)){
		GL_TraceError("[%s-%4d]GL_SemaphorePeek  fail\n", __FUNCTION__, __LINE__);
		exit(1); //
	}else{
		GL_TraceInfo("[%s-%4d]GL_SemaphorePeek  %d\n", __FUNCTION__, __LINE__, value);
	}
}
Exemple #2
0
void GL_SemaphoreDumpList(GL_UINT16 wChannel)
{
	gsl_list_t *p;
	gsl_semaphore_t *s;
	GL_INT32 value;

	wChannel = wChannel;
	GL_TraceInfo("\n-------GSL semaphore dump list start ------------\n");
	for (p = &sem_dump_list; p->next != NULL; p = (gsl_list_t *)p->next) {
		s = (gsl_semaphore_t *)p->next;
		if(GL_SUCCESS != GL_SemaphorePeek(s, &value)){
			GL_TraceError("[%s]GL_SemaphorePeek fail\n", __FUNCTION__);
		}
		GL_TraceInfo("sem name:%s, current value=%d\n", s->name, value);
	}
	GL_TraceInfo("\n-------GSL semaphore dump list end  ------------\n");

}