Lines Matching refs:pSemaphoreImpl
55 oslSemaphoreImpl * pSemaphoreImpl; in osl_createSemaphore() local
58 pSemaphoreImpl = (oslSemaphoreImpl *) malloc(sizeof(oslSemaphoreImpl)); in osl_createSemaphore()
59 if( pSemaphoreImpl == NULL ) in osl_createSemaphore()
64 &pSemaphoreImpl->hevReachedZero, in osl_createSemaphore()
69 free( pSemaphoreImpl ); in osl_createSemaphore()
73 pSemaphoreImpl->nCount = initialCount; in osl_createSemaphore()
79 return (oslSemaphore) pSemaphoreImpl; in osl_createSemaphore()
92 oslSemaphoreImpl* pSemaphoreImpl = (oslSemaphoreImpl*)Semaphore; in osl_destroySemaphore() local
95 DosCloseEventSem( pSemaphoreImpl->hevReachedZero ); in osl_destroySemaphore()
97 free( pSemaphoreImpl ); in osl_destroySemaphore()
111 oslSemaphoreImpl* pSemaphoreImpl = (oslSemaphoreImpl*)Semaphore; in osl_acquireSemaphore() local
117 while( pSemaphoreImpl->nCount < 1 ) in osl_acquireSemaphore()
123 rc = DosWaitEventSem(pSemaphoreImpl->hevReachedZero, SEM_INDEFINITE_WAIT ); in osl_acquireSemaphore()
124 DosResetEventSem(pSemaphoreImpl->hevReachedZero, &nPostCount); in osl_acquireSemaphore()
129 pSemaphoreImpl->nCount--; in osl_acquireSemaphore()
145 oslSemaphoreImpl* pSemaphoreImpl = (oslSemaphoreImpl*)Semaphore; in osl_tryToAcquireSemaphore() local
151 nCount = pSemaphoreImpl->nCount; in osl_tryToAcquireSemaphore()
152 if( pSemaphoreImpl->nCount > 0 ) in osl_tryToAcquireSemaphore()
153 pSemaphoreImpl->nCount--; in osl_tryToAcquireSemaphore()
169 oslSemaphoreImpl* pSemaphoreImpl = (oslSemaphoreImpl*)Semaphore; in osl_releaseSemaphore() local
175 nCount = pSemaphoreImpl->nCount; in osl_releaseSemaphore()
176 pSemaphoreImpl->nCount++; in osl_releaseSemaphore()
181 DosPostEventSem(pSemaphoreImpl->hevReachedZero); in osl_releaseSemaphore()