Lines Matching refs:sem_ptr

114 	sysvsem_sem *sem_ptr = sysvsem_from_obj(object);  in sysvsem_free_obj()  local
122 if (sem_ptr->count == -1 || !sem_ptr->auto_release) { in sysvsem_free_obj()
123 zend_object_std_dtor(&sem_ptr->std); in sysvsem_free_obj()
134 if (sem_ptr->count) { in sysvsem_free_obj()
137 sop[1].sem_op = sem_ptr->count; in sysvsem_free_obj()
143 semop(sem_ptr->semid, sop, opcount); in sysvsem_free_obj()
145 zend_object_std_dtor(&sem_ptr->std); in sysvsem_free_obj()
190 sysvsem_sem *sem_ptr; in PHP_FUNCTION() local
284 sem_ptr = Z_SYSVSEM_P(return_value); in PHP_FUNCTION()
285 sem_ptr->key = key; in PHP_FUNCTION()
286 sem_ptr->semid = semid; in PHP_FUNCTION()
287 sem_ptr->count = 0; in PHP_FUNCTION()
288 sem_ptr->auto_release = (int) auto_release; in PHP_FUNCTION()
297 sysvsem_sem *sem_ptr; in php_sysvsem_semop() local
310 sem_ptr = Z_SYSVSEM_P(arg_id); in php_sysvsem_semop()
312 if (!acquire && sem_ptr->count == 0) { in php_sysvsem_semop()
313 …ror_docref(NULL, E_WARNING, "SysV semaphore for key 0x%x is not currently acquired", sem_ptr->key); in php_sysvsem_semop()
321 while (semop(sem_ptr->semid, &sop, 1) == -1) { in php_sysvsem_semop()
324 …E_WARNING, "Failed to %s key 0x%x: %s", acquire ? "acquire" : "release", sem_ptr->key, strerror(er… in php_sysvsem_semop()
330 sem_ptr->count -= acquire ? -1 : 1; in php_sysvsem_semop()
359 sysvsem_sem *sem_ptr; local
369 sem_ptr = Z_SYSVSEM_P(arg_id);
373 if (semctl(sem_ptr->semid, 0, IPC_STAT, un) < 0) {
375 if (semctl(sem_ptr->semid, 0, IPC_STAT, NULL) < 0) {
377 …r_docref(NULL, E_WARNING, "SysV semaphore for key 0x%x does not (any longer) exist", sem_ptr->key);
382 if (semctl(sem_ptr->semid, 0, IPC_RMID, un) < 0) {
384 if (semctl(sem_ptr->semid, 0, IPC_RMID, NULL) < 0) {
386 …php_error_docref(NULL, E_WARNING, "Failed for SysV semaphore for key 0x%x: %s", sem_ptr->key, stre…
394 sem_ptr->count = -1;