Home | History | Annotate | Download | only in Linux_x86

Lines Matching refs:pQueue

72    phDal4Nfc_message_queue_t * pQueue;
73 pQueue = (phDal4Nfc_message_queue_t *) phOsalNfc_GetMemory(sizeof(phDal4Nfc_message_queue_t));
74 if (pQueue == NULL)
76 memset(pQueue, 0, sizeof(phDal4Nfc_message_queue_t));
77 if (pthread_mutex_init (&pQueue->nCriticalSectionMutex, NULL) == -1)
79 if (sem_init (&pQueue->nProcessSemaphore, 0, 0) == -1)
81 return ((int)pQueue);
98 phDal4Nfc_message_queue_t * pQueue;
104 pQueue = (phDal4Nfc_message_queue_t *)msqid;
105 pthread_mutex_lock(&pQueue->nCriticalSectionMutex);
106 if (pQueue->pItems != NULL)
108 p = pQueue->pItems;
118 pQueue->pItems = NULL;
119 pthread_mutex_unlock(&pQueue->nCriticalSectionMutex);
120 pthread_mutex_destroy(&pQueue->nCriticalSectionMutex);
121 phOsalNfc_FreeMemory(pQueue);
141 phDal4Nfc_message_queue_t * pQueue;
151 pQueue = (phDal4Nfc_message_queue_t *)msqid;
157 pthread_mutex_lock(&pQueue->nCriticalSectionMutex);
158 if (pQueue->pItems != NULL)
160 p = pQueue->pItems;
167 pQueue->pItems = pNew;
169 pthread_mutex_unlock(&pQueue->nCriticalSectionMutex);
171 sem_post(&pQueue->nProcessSemaphore);
192 phDal4Nfc_message_queue_t * pQueue;
201 pQueue = (phDal4Nfc_message_queue_t *)msqid;
202 sem_wait(&pQueue->nProcessSemaphore);
203 pthread_mutex_lock(&pQueue->nCriticalSectionMutex);
204 if (pQueue->pItems != NULL)
206 memcpy(&((phDal4Nfc_Message_Wrapper_t*)msgp)->msg, &(pQueue->pItems)->nMsg, sizeof(phLibNfc_Message_t));
207 p = pQueue->pItems->pNext;
208 phOsalNfc_FreeMemory(pQueue->pItems);
209 pQueue->pItems = p;
211 pthread_mutex_unlock(&pQueue->nCriticalSectionMutex);