Lines Matching refs:nxpncihal_monitor

269 static phNxpNciHal_Monitor_t *nxpncihal_monitor = NULL;  variable
285 if (nxpncihal_monitor == NULL) in phNxpNciHal_init_monitor()
287 nxpncihal_monitor = (phNxpNciHal_Monitor_t *) malloc( in phNxpNciHal_init_monitor()
291 if (nxpncihal_monitor != NULL) in phNxpNciHal_init_monitor()
293 memset(nxpncihal_monitor, 0x00, sizeof(phNxpNciHal_Monitor_t)); in phNxpNciHal_init_monitor()
295 if (pthread_mutex_init(&nxpncihal_monitor->reentrance_mutex, NULL) in phNxpNciHal_init_monitor()
302 if (pthread_mutex_init(&nxpncihal_monitor->concurrency_mutex, NULL) in phNxpNciHal_init_monitor()
306 pthread_mutex_destroy(&nxpncihal_monitor->reentrance_mutex); in phNxpNciHal_init_monitor()
310 if (listInit(&nxpncihal_monitor->sem_list) != 1) in phNxpNciHal_init_monitor()
313 pthread_mutex_destroy(&nxpncihal_monitor->concurrency_mutex); in phNxpNciHal_init_monitor()
314 pthread_mutex_destroy(&nxpncihal_monitor->reentrance_mutex); in phNxpNciHal_init_monitor()
326 return nxpncihal_monitor; in phNxpNciHal_init_monitor()
331 if (nxpncihal_monitor != NULL) in phNxpNciHal_init_monitor()
333 free(nxpncihal_monitor); in phNxpNciHal_init_monitor()
334 nxpncihal_monitor = NULL; in phNxpNciHal_init_monitor()
351 if (nxpncihal_monitor != NULL) in phNxpNciHal_cleanup_monitor()
353 pthread_mutex_destroy(&nxpncihal_monitor->concurrency_mutex); in phNxpNciHal_cleanup_monitor()
355 pthread_mutex_destroy(&nxpncihal_monitor->reentrance_mutex); in phNxpNciHal_cleanup_monitor()
357 listDestroy(&nxpncihal_monitor->sem_list); in phNxpNciHal_cleanup_monitor()
360 free(nxpncihal_monitor); in phNxpNciHal_cleanup_monitor()
361 nxpncihal_monitor = NULL; in phNxpNciHal_cleanup_monitor()
378 return nxpncihal_monitor; in phNxpNciHal_get_monitor()