Lines Matching refs:mq
124 sysvmsg_queue_t * mq = (sysvmsg_queue_t *) rsrc->ptr; in ZEND_GET_MODULE() local
125 efree(mq); in ZEND_GET_MODULE()
158 sysvmsg_queue_t *mq = NULL; in PHP_FUNCTION() local
167 ZEND_FETCH_RESOURCE(mq, sysvmsg_queue_t *, &queue, -1, "sysvmsg queue", le_sysvmsg); in PHP_FUNCTION()
169 if (msgctl(mq->id, IPC_STAT, &stat) == 0) { in PHP_FUNCTION()
189 if (msgctl(mq->id, IPC_SET, &stat) == 0) { in PHP_FUNCTION()
201 sysvmsg_queue_t *mq = NULL; in PHP_FUNCTION() local
210 ZEND_FETCH_RESOURCE(mq, sysvmsg_queue_t *, &queue, -1, "sysvmsg queue", le_sysvmsg); in PHP_FUNCTION()
212 if (msgctl(mq->id, IPC_STAT, &stat) == 0) { in PHP_FUNCTION()
255 sysvmsg_queue_t *mq; in PHP_FUNCTION() local
261 mq = (sysvmsg_queue_t *) emalloc(sizeof(sysvmsg_queue_t)); in PHP_FUNCTION()
263 mq->key = key; in PHP_FUNCTION()
264 mq->id = msgget(key, 0); in PHP_FUNCTION()
265 if (mq->id < 0) { in PHP_FUNCTION()
267 mq->id = msgget(key, IPC_CREAT | IPC_EXCL | perms); in PHP_FUNCTION()
268 if (mq->id < 0) { in PHP_FUNCTION()
270 efree(mq); in PHP_FUNCTION()
274 RETVAL_RESOURCE(zend_list_insert(mq, le_sysvmsg)); in PHP_FUNCTION()
283 sysvmsg_queue_t *mq = NULL; in PHP_FUNCTION() local
289 ZEND_FETCH_RESOURCE(mq, sysvmsg_queue_t *, &queue, -1, "sysvmsg queue", le_sysvmsg); in PHP_FUNCTION()
291 if (msgctl(mq->id, IPC_RMID, NULL) == 0) { in PHP_FUNCTION()
307 sysvmsg_queue_t *mq = NULL; in PHP_FUNCTION() local
341 ZEND_FETCH_RESOURCE(mq, sysvmsg_queue_t *, &queue, -1, "sysvmsg queue", le_sysvmsg); in PHP_FUNCTION()
345 result = msgrcv(mq->id, messagebuffer, maxsize, desiredmsgtype, realflags); in PHP_FUNCTION()
394 sysvmsg_queue_t * mq = NULL; in PHP_FUNCTION() local
406 ZEND_FETCH_RESOURCE(mq, sysvmsg_queue_t*, &queue, -1, "sysvmsg queue", le_sysvmsg); in PHP_FUNCTION()
455 result = msgsnd(mq->id, messagebuffer, message_len, blocking ? 0 : IPC_NOWAIT); in PHP_FUNCTION()