2 +----------------------------------------------------------------------+
4 +----------------------------------------------------------------------+
5 | Copyright (c) 2010- Facebook, Inc. (http://www.facebook.com) |
6 | Copyright (c) 1997-2010 The PHP Group |
7 +----------------------------------------------------------------------+
8 | This source file is subject to version 3.01 of the PHP license, |
9 | that is bundled with this package in the file LICENSE, and is |
10 | available through the world-wide-web at the following url: |
11 | http://www.php.net/license/3_01.txt |
12 | If you did not receive a copy of the PHP license and are unable to |
13 | obtain it through the world-wide-web, please send a note to |
14 | license@php.net so we can mail you a copy immediately. |
15 +----------------------------------------------------------------------+
18 #ifndef incl_HPHP_EXT_IPC_H_
19 #define incl_HPHP_EXT_IPC_H_
21 #include <runtime/base/base_includes.h>
24 ///////////////////////////////////////////////////////////////////////////////
27 int64_t f_ftok(CStrRef pathname
, CStrRef proj
);
29 Variant
f_msg_get_queue(int64_t key
, int64_t perms
= 0666);
30 bool f_msg_queue_exists(int64_t key
);
31 bool f_msg_send(CObjRef queue
, int64_t msgtype
, CVarRef message
,
32 bool serialize
= true, bool blocking
= true,
33 VRefParam errorcode
= uninit_null());
34 bool f_msg_receive(CObjRef queue
, int64_t desiredmsgtype
, VRefParam msgtype
,
35 int64_t maxsize
, VRefParam message
, bool unserialize
= true,
36 int64_t flags
= 0, VRefParam errorcode
= uninit_null());
37 bool f_msg_remove_queue(CObjRef queue
);
38 bool f_msg_set_queue(CObjRef queue
, CArrRef data
);
39 Array
f_msg_stat_queue(CObjRef queue
);
41 ///////////////////////////////////////////////////////////////////////////////
44 bool f_sem_acquire(CObjRef sem_identifier
);
45 Variant
f_sem_get(int64_t key
, int64_t max_acquire
= 1, int64_t perm
= 0666,
46 bool auto_release
= true);
47 bool f_sem_release(CObjRef sem_identifier
);
48 bool f_sem_remove(CObjRef sem_identifier
);
50 ///////////////////////////////////////////////////////////////////////////////
53 Variant
f_shm_attach(int64_t shm_key
, int64_t shm_size
= 10000, int64_t shm_flag
= 0666);
54 bool f_shm_detach(int64_t shm_identifier
);
55 bool f_shm_remove(int64_t shm_identifier
);
56 Variant
f_shm_get_var(int64_t shm_identifier
, int64_t variable_key
);
57 bool f_shm_has_var(int64_t shm_identifier
, int64_t variable_key
);
58 bool f_shm_put_var(int64_t shm_identifier
, int64_t variable_key
, CVarRef variable
);
59 bool f_shm_remove_var(int64_t shm_identifier
, int64_t variable_key
);
61 ///////////////////////////////////////////////////////////////////////////////
64 #endif // incl_HPHP_EXT_IPC_H_