Lines Matching refs:nxpncihal_monitor
275 static phNxpNciHal_Monitor_t *nxpncihal_monitor = NULL; variable
291 if (nxpncihal_monitor == NULL) in phNxpNciHal_init_monitor()
293 nxpncihal_monitor = (phNxpNciHal_Monitor_t *) malloc( in phNxpNciHal_init_monitor()
297 if (nxpncihal_monitor != NULL) in phNxpNciHal_init_monitor()
299 memset(nxpncihal_monitor, 0x00, sizeof(phNxpNciHal_Monitor_t)); in phNxpNciHal_init_monitor()
301 if (pthread_mutex_init(&nxpncihal_monitor->reentrance_mutex, NULL) in phNxpNciHal_init_monitor()
308 if (pthread_mutex_init(&nxpncihal_monitor->concurrency_mutex, NULL) in phNxpNciHal_init_monitor()
312 pthread_mutex_destroy(&nxpncihal_monitor->reentrance_mutex); in phNxpNciHal_init_monitor()
316 if (listInit(&nxpncihal_monitor->sem_list) != 1) in phNxpNciHal_init_monitor()
319 pthread_mutex_destroy(&nxpncihal_monitor->concurrency_mutex); in phNxpNciHal_init_monitor()
320 pthread_mutex_destroy(&nxpncihal_monitor->reentrance_mutex); in phNxpNciHal_init_monitor()
332 return nxpncihal_monitor; in phNxpNciHal_init_monitor()
337 if (nxpncihal_monitor != NULL) in phNxpNciHal_init_monitor()
339 free(nxpncihal_monitor); in phNxpNciHal_init_monitor()
340 nxpncihal_monitor = NULL; in phNxpNciHal_init_monitor()
357 if (nxpncihal_monitor != NULL) in phNxpNciHal_cleanup_monitor()
359 pthread_mutex_destroy(&nxpncihal_monitor->concurrency_mutex); in phNxpNciHal_cleanup_monitor()
361 pthread_mutex_destroy(&nxpncihal_monitor->reentrance_mutex); in phNxpNciHal_cleanup_monitor()
363 listDestroy(&nxpncihal_monitor->sem_list); in phNxpNciHal_cleanup_monitor()
366 free(nxpncihal_monitor); in phNxpNciHal_cleanup_monitor()
367 nxpncihal_monitor = NULL; in phNxpNciHal_cleanup_monitor()
384 return nxpncihal_monitor; in phNxpNciHal_get_monitor()