summaryrefslogtreecommitdiff
path: root/ext/sysvsem
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2001-06-05 13:12:10 +0000
committerRasmus Lerdorf <rasmus@php.net>2001-06-05 13:12:10 +0000
commit25c3a3a39d7aebdce95825e6af2ad8c62905b7cc (patch)
tree4d8f1ff9644c880e3b7a63a361a0db2280d8058f /ext/sysvsem
parent4efe6f7e6b53496fb1c4f6990b3ad0771bd9be67 (diff)
downloadphp-git-25c3a3a39d7aebdce95825e6af2ad8c62905b7cc.tar.gz
vim-6 does folding - clean up a bunch of missing folding tags plus
some misguided RINIT and RSHUTDOWN calls in a few fringe extensions
Diffstat (limited to 'ext/sysvsem')
-rw-r--r--ext/sysvsem/sysvsem.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/ext/sysvsem/sysvsem.c b/ext/sysvsem/sysvsem.c
index a55f1c1adb..3a006dde76 100644
--- a/ext/sysvsem/sysvsem.c
+++ b/ext/sysvsem/sysvsem.c
@@ -56,6 +56,8 @@ union semun {
#endif
+/* {{{ sysvsem_functions[]
+ */
function_entry sysvsem_functions[] = {
PHP_FE(sem_get, NULL)
PHP_FE(sem_acquire, NULL)
@@ -63,10 +65,14 @@ function_entry sysvsem_functions[] = {
PHP_FE(sem_remove, NULL)
{NULL, NULL, NULL}
};
+/* }}} */
+/* {{{ sysvsem_module_entry
+ */
zend_module_entry sysvsem_module_entry = {
"sysvsem", sysvsem_functions, PHP_MINIT(sysvsem), NULL, NULL, NULL, NULL, STANDARD_MODULE_PROPERTIES
};
+/* }}} */
#ifdef COMPILE_DL_SYSVSEM
ZEND_GET_MODULE(sysvsem)
@@ -94,7 +100,8 @@ THREAD_LS sysvsem_module php_sysvsem_module;
#define SYSVSEM_USAGE 1
#define SYSVSEM_SETVAL 2
-
+/* {{{ release_sysvsem_sem
+ */
static void release_sysvsem_sem(zend_rsrc_list_entry *rsrc)
{
sysvsem_sem *sem_ptr = (sysvsem_sem *)rsrc->ptr;
@@ -129,14 +136,17 @@ static void release_sysvsem_sem(zend_rsrc_list_entry *rsrc)
efree(sem_ptr);
}
+/* }}} */
-
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(sysvsem)
{
php_sysvsem_module.le_sem = zend_register_list_destructors_ex(release_sysvsem_sem, NULL, "sysvsem", module_number);
return SUCCESS;
}
+/* }}} */
#define SETVAL_WANTS_PTR
@@ -296,7 +306,8 @@ PHP_FUNCTION(sem_get)
}
/* }}} */
-
+/* {{{ php_sysvsem_semop
+ */
static void php_sysvsem_semop(INTERNAL_FUNCTION_PARAMETERS, int acquire)
{
pval **arg_id;
@@ -343,7 +354,7 @@ static void php_sysvsem_semop(INTERNAL_FUNCTION_PARAMETERS, int acquire)
sem_ptr->count -= acquire ? -1 : 1;
RETURN_TRUE;
}
-
+/* }}} */
/* {{{ proto int sem_acquire(int id)
Acquires the semaphore with the given id, blocking if necessary */
@@ -361,9 +372,6 @@ PHP_FUNCTION(sem_release)
}
/* }}} */
-
-
-
/* {{{ proto int sem_remove(int id)
Removes semaphore from Unix systems */
@@ -419,9 +427,11 @@ PHP_FUNCTION(sem_remove)
/* }}} */
#endif /* HAVE_SYSVSEM */
+
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/