Lines Matching refs:shmop

47 	PHP_MINIT(shmop),
51 PHP_MINFO(shmop),
58 ZEND_GET_MODULE(shmop)
101 php_shmop *shmop = shmop_from_obj(object); in shmop_free_obj() local
103 shmdt(shmop->addr); in shmop_free_obj()
105 zend_object_std_dtor(&shmop->std); in shmop_free_obj()
109 PHP_MINIT_FUNCTION(shmop) in PHP_MINIT_FUNCTION() argument
131 PHP_MINFO_FUNCTION(shmop) in PHP_MINFO_FUNCTION() argument
143 php_shmop *shmop; in PHP_FUNCTION() local
158 shmop = Z_SHMOP_P(return_value); in PHP_FUNCTION()
159 shmop->key = key; in PHP_FUNCTION()
160 shmop->shmflg |= mode; in PHP_FUNCTION()
165 shmop->shmatflg |= SHM_RDONLY; in PHP_FUNCTION()
168 shmop->shmflg |= IPC_CREAT; in PHP_FUNCTION()
169 shmop->size = size; in PHP_FUNCTION()
172 shmop->shmflg |= (IPC_CREAT | IPC_EXCL); in PHP_FUNCTION()
173 shmop->size = size; in PHP_FUNCTION()
186 if (shmop->shmflg & IPC_CREAT && shmop->size < 1) { in PHP_FUNCTION()
191 shmop->shmid = shmget(shmop->key, shmop->size, shmop->shmflg); in PHP_FUNCTION()
192 if (shmop->shmid == -1) { in PHP_FUNCTION()
197 if (shmctl(shmop->shmid, IPC_STAT, &shm)) { in PHP_FUNCTION()
208 shmop->addr = shmat(shmop->shmid, 0, shmop->shmatflg); in PHP_FUNCTION()
209 if (shmop->addr == (char*) -1) { in PHP_FUNCTION()
214 shmop->size = shm.shm_segsz; in PHP_FUNCTION()
228 php_shmop *shmop; in PHP_FUNCTION() local
237 shmop = Z_SHMOP_P(shmid); in PHP_FUNCTION()
239 if (start < 0 || start > shmop->size) { in PHP_FUNCTION()
244 if (count < 0 || start > (ZEND_LONG_MAX - count) || start + count > shmop->size) { in PHP_FUNCTION()
249 startaddr = shmop->addr + start; in PHP_FUNCTION()
250 bytes = count ? count : shmop->size - start; in PHP_FUNCTION()
273 php_shmop *shmop; in PHP_FUNCTION() local
279 shmop = Z_SHMOP_P(shmid); in PHP_FUNCTION()
281 RETURN_LONG(shmop->size); in PHP_FUNCTION()
288 php_shmop *shmop; in PHP_FUNCTION() local
298 shmop = Z_SHMOP_P(shmid); in PHP_FUNCTION()
300 if ((shmop->shmatflg & SHM_RDONLY) == SHM_RDONLY) { in PHP_FUNCTION()
305 if (offset < 0 || offset > shmop->size) { in PHP_FUNCTION()
310 …writesize = ((zend_long)ZSTR_LEN(data) < shmop->size - offset) ? (zend_long)ZSTR_LEN(data) : shmop in PHP_FUNCTION()
311 memcpy(shmop->addr + offset, ZSTR_VAL(data), writesize); in PHP_FUNCTION()
321 php_shmop *shmop; in PHP_FUNCTION() local
327 shmop = Z_SHMOP_P(shmid); in PHP_FUNCTION()
329 if (shmctl(shmop->shmid, IPC_RMID, NULL)) { in PHP_FUNCTION()