locale component from the default.
- Sysvsem:
- . sem_get() will now return an Sysvsem object rather than a resource.
+ . sem_get() will now return an SysvSemaphore object rather than a resource.
Return value checks using is_resource() should be replaced with checks
for `false`.
#define SYSVSEM_USAGE 1
#define SYSVSEM_SETVAL 2
-/* Sysvsem class */
+/* SysvSemaphore class */
zend_class_entry *sysvsem_ce;
static zend_object_handlers sysvsem_object_handlers;
}
static zend_function *sysvsem_get_constructor(zend_object *object) {
- zend_throw_error(NULL, "Cannot directly construct Sysvsem, use sem_get() instead");
+ zend_throw_error(NULL, "Cannot directly construct SysvSemaphore, use sem_get() instead");
return NULL;
}
PHP_MINIT_FUNCTION(sysvsem)
{
zend_class_entry ce;
- INIT_CLASS_ENTRY(ce, "Sysvsem", class_Sysvsem_methods);
+ INIT_CLASS_ENTRY(ce, "SysvSemaphore", class_SysvSemaphore_methods);
sysvsem_ce = zend_register_internal_class(&ce);
sysvsem_ce->ce_flags |= ZEND_ACC_FINAL;
sysvsem_ce->create_object = sysvsem_create_object;
#undef SETVAL_WANTS_PTR
#endif
-/* {{{ proto Sysvsem sem_get(int key [, int max_acquire [, int perm [, int auto_release]])
+/* {{{ proto SysvSemaphore sem_get(int key [, int max_acquire [, int perm [, int auto_release]])
Return an id for the semaphore with the given key, and allow max_acquire (default 1) processes to acquire it simultaneously */
PHP_FUNCTION(sem_get)
{
}
/* }}} */
-/* {{{ proto bool sem_acquire(Sysvsem id)
+/* {{{ proto bool sem_acquire(SysvSemaphore id)
Acquires the semaphore with the given id, blocking if necessary */
PHP_FUNCTION(sem_acquire)
{
}
/* }}} */
-/* {{{ proto bool sem_release(Sysvsem id)
+/* {{{ proto bool sem_release(SysvSemaphore id)
Releases the semaphore with the given id */
PHP_FUNCTION(sem_release)
{
}
/* }}} */
-/* {{{ proto bool sem_remove(Sysvsem id)
+/* {{{ proto bool sem_remove(SysvSemaphore id)
Removes semaphore from Unix systems */
/*
/** @generate-function-entries */
-final class Sysvsem
+final class SysvSemaphore
{
}
/**
* @todo use bool for $auto_release
*/
-function sem_get(int $key, int $max_acquire = 1, int $perm = 0666, int $auto_release = 1): Sysvsem|false {}
+function sem_get(int $key, int $max_acquire = 1, int $perm = 0666, int $auto_release = 1): SysvSemaphore|false {}
-function sem_acquire(Sysvsem $sem_identifier, bool $nowait = false): bool {}
+function sem_acquire(SysvSemaphore $semaphore, bool $nowait = false): bool {}
-function sem_release(Sysvsem $sem_identifier): bool {}
+function sem_release(SysvSemaphore $semaphore): bool {}
-function sem_remove(Sysvsem $sem_identifier): bool {}
+function sem_remove(SysvSemaphore $semaphore): bool {}
/* This is a generated file, edit the .stub.php file instead. */
-ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_sem_get, 0, 1, Sysvsem, MAY_BE_FALSE)
+ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_sem_get, 0, 1, SysvSemaphore, MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, key, IS_LONG, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, max_acquire, IS_LONG, 0, "1")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, perm, IS_LONG, 0, "0666")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sem_acquire, 0, 1, _IS_BOOL, 0)
- ZEND_ARG_OBJ_INFO(0, sem_identifier, Sysvsem, 0)
+ ZEND_ARG_OBJ_INFO(0, semaphore, SysvSemaphore, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, nowait, _IS_BOOL, 0, "false")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_sem_release, 0, 1, _IS_BOOL, 0)
- ZEND_ARG_OBJ_INFO(0, sem_identifier, Sysvsem, 0)
+ ZEND_ARG_OBJ_INFO(0, semaphore, SysvSemaphore, 0)
ZEND_END_ARG_INFO()
#define arginfo_sem_remove arginfo_sem_release
};
-static const zend_function_entry class_Sysvsem_methods[] = {
+static const zend_function_entry class_SysvSemaphore_methods[] = {
ZEND_FE_END
};