php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
php_sysvshm.h
Go to the documentation of this file.
1/*
2 +----------------------------------------------------------------------+
3 | Copyright (c) The PHP Group |
4 +----------------------------------------------------------------------+
5 | This source file is subject to version 3.01 of the PHP license, |
6 | that is bundled with this package in the file LICENSE, and is |
7 | available through the world-wide-web at the following url: |
8 | https://www.php.net/license/3_01.txt |
9 | If you did not receive a copy of the PHP license and are unable to |
10 | obtain it through the world-wide-web, please send a note to |
11 | license@php.net so we can mail you a copy immediately. |
12 +----------------------------------------------------------------------+
13 | Author: Christian Cartus <cartus@atrior.de> |
14 +----------------------------------------------------------------------+
15*/
16
17#ifndef PHP_SYSVSHM_H
18#define PHP_SYSVSHM_H
19
20#ifdef HAVE_SYSVSHM
21
22extern zend_module_entry sysvshm_module_entry;
23#define sysvshm_module_ptr &sysvshm_module_entry
24
25#include "php_version.h"
26#define PHP_SYSVSHM_VERSION PHP_VERSION
27
28#include <sys/types.h>
29
30#ifdef PHP_WIN32
31# include <TSRM/tsrm_win32.h>
32# include "win32/ipc.h"
33#else
34# include <sys/ipc.h>
35# include <sys/shm.h>
36#endif
37
38typedef struct {
39 zend_long init_mem;
40} sysvshm_module;
41
42typedef struct {
44 zend_long length;
46 char mem;
47} sysvshm_chunk;
48
49typedef struct {
50 char magic[8];
53 zend_long free;
55} sysvshm_chunk_head;
56
57typedef struct {
58 key_t key; /* key set by user */
59 zend_long id; /* returned by shmget */
60 sysvshm_chunk_head *ptr; /* memory address of shared memory */
61 zend_object std;
62} sysvshm_shm;
63
64PHP_MINIT_FUNCTION(sysvshm);
65PHP_MINFO_FUNCTION(sysvshm);
66
67extern sysvshm_module php_sysvshm;
68
69#else
70
71#define sysvshm_module_ptr NULL
72
73#endif
74
75#define phpext_sysvshm_ptr sysvshm_module_ptr
76
77#endif /* PHP_SYSVSHM_H */
total()
Definition bench.php:374
void * ptr
Definition ffi.c:3814
buf start
Definition ffi.c:4687
int key_t
Definition ipc.h:26
#define next(ls)
Definition minilua.c:2661
#define PHP_MINIT_FUNCTION
Definition php.h:400
#define PHP_MINFO_FUNCTION
Definition php.h:404
unsigned const char * end
Definition php_ffi.h:51
unsigned char key[REFLECTION_KEY_LEN]
Definition file.h:202
int32_t zend_long
Definition zend_long.h:42
struct _zend_module_entry zend_module_entry
struct _zend_object zend_object