Lines Matching refs:ptr
123 static int php_put_shm_data(sysvshm_chunk_head *ptr, zend_long key, const char *data, zend_long len…
124 static zend_long php_check_shm_data(sysvshm_chunk_head *ptr, zend_long key);
125 static int php_remove_shm_data(sysvshm_chunk_head *ptr, zend_long shm_varpos);
131 sysvshm_shm *shm_ptr = (sysvshm_shm *) rsrc->ptr; in php_release_sysvshm()
132 shmdt((void *) shm_ptr->ptr); in php_release_sysvshm()
202 shm_list_ptr->ptr = chunk_ptr; in PHP_FUNCTION()
271 …ret = php_put_shm_data(shm_list_ptr->ptr, shm_key, shm_var.s? ZSTR_VAL(shm_var.s) : NULL, shm_var.… in PHP_FUNCTION()
303 shm_varpos = php_check_shm_data((shm_list_ptr->ptr), shm_key); in PHP_FUNCTION()
309 shm_var = (sysvshm_chunk*) ((char *)shm_list_ptr->ptr + shm_varpos); in PHP_FUNCTION()
333 RETURN_BOOL(php_check_shm_data(shm_list_ptr->ptr, shm_key) >= 0); in PHP_FUNCTION()
350 shm_varpos = php_check_shm_data((shm_list_ptr->ptr), shm_key); in PHP_FUNCTION()
356 php_remove_shm_data((shm_list_ptr->ptr), shm_varpos); in PHP_FUNCTION()
363 static int php_put_shm_data(sysvshm_chunk_head *ptr, zend_long key, const char *data, zend_long len) in php_put_shm_data() argument
371 if ((shm_varpos = php_check_shm_data(ptr, key)) > 0) { in php_put_shm_data()
372 php_remove_shm_data(ptr, shm_varpos); in php_put_shm_data()
375 if (ptr->free < total_size) { in php_put_shm_data()
379 shm_var = (sysvshm_chunk *) ((char *) ptr + ptr->end); in php_put_shm_data()
384 ptr->end += total_size; in php_put_shm_data()
385 ptr->free -= total_size; in php_put_shm_data()
392 static zend_long php_check_shm_data(sysvshm_chunk_head *ptr, zend_long key) in php_check_shm_data() argument
397 pos = ptr->start; in php_check_shm_data()
400 if (pos >= ptr->end) { in php_check_shm_data()
403 shm_var = (sysvshm_chunk*) ((char *) ptr + pos); in php_check_shm_data()
409 if (shm_var->next <= 0 || pos < ptr->start) { in php_check_shm_data()
419 static int php_remove_shm_data(sysvshm_chunk_head *ptr, zend_long shm_varpos) in php_remove_shm_data() argument
424 chunk_ptr = (sysvshm_chunk *) ((char *) ptr + shm_varpos); in php_remove_shm_data()
425 next_chunk_ptr = (sysvshm_chunk *) ((char *) ptr + shm_varpos + chunk_ptr->next); in php_remove_shm_data()
427 memcpy_len = ptr->end-shm_varpos - chunk_ptr->next; in php_remove_shm_data()
428 ptr->free += chunk_ptr->next; in php_remove_shm_data()
429 ptr->end -= chunk_ptr->next; in php_remove_shm_data()