Skip to content

Commit 4bc9487

Browse files
committed
rename to zend_timers
1 parent cd1e38b commit 4bc9487

File tree

15 files changed

+53
-53
lines changed

15 files changed

+53
-53
lines changed

Zend/Zend.m4

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -269,27 +269,27 @@ fi
269269
AC_MSG_CHECKING(whether to enable zend signal handling)
270270
AC_MSG_RESULT($ZEND_SIGNALS)
271271
272-
dnl By default, enable Zend Timer only for ZTS builds
272+
dnl By default, enable Zend Timers only for ZTS builds
273273
AC_ARG_ENABLE([zend-timer],
274274
[AS_HELP_STRING([--enable-zend-timer],
275275
[whether to enable zend timer])],
276-
[ZEND_TIMER=$enableval],
277-
[ZEND_TIMER=$ZEND_ZTS])
276+
[ZEND_TIMERS=$enableval],
277+
[ZEND_TIMERS=$ZEND_ZTS])
278278
279-
AS_CASE(["$host_alias"], [*linux*], [], [ZEND_TIMER='no'])
279+
AS_CASE(["$host_alias"], [*linux*], [], [ZEND_TIMERS='no'])
280280
281281
PHP_CHECK_FUNC(timer_create, rt)
282282
if test "$ac_cv_func_timer_create" != "yes"; then
283-
ZEND_TIMER='no'
283+
ZEND_TIMERS='no'
284284
fi
285285
286-
if test "$ZEND_TIMER" = "yes"; then
287-
AC_DEFINE(ZEND_TIMER, 1, [Use zend timer])
288-
CFLAGS="$CFLAGS -DZEND_TIMER"
286+
if test "$ZEND_TIMERS" = "yes"; then
287+
AC_DEFINE(ZEND_TIMERS, 1, [Use zend timer])
288+
CFLAGS="$CFLAGS -DZEND_TIMERS"
289289
fi
290290
291291
AC_MSG_CHECKING(whether to enable zend timer)
292-
AC_MSG_RESULT($ZEND_TIMER)
292+
AC_MSG_RESULT($ZEND_TIMERS)
293293
294294
])
295295

Zend/zend.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include "zend_attributes.h"
3636
#include "zend_observer.h"
3737
#include "zend_fibers.h"
38-
#include "zend_timer.h"
38+
#include "zend_timers.h"
3939
#include "Optimizer/zend_optimizer.h"
4040

4141
static size_t global_map_ptr_last = 0;
@@ -822,16 +822,16 @@ static void zend_new_thread_end_handler(THREAD_T thread_id) /* {{{ */
822822
{
823823
zend_copy_ini_directives();
824824
zend_ini_refresh_caches(ZEND_INI_STAGE_STARTUP);
825-
#ifdef ZEND_TIMER
826-
zend_timer_create();
825+
#ifdef ZEND_TIMERS
826+
zend_timers_create();
827827
#endif
828828
}
829829
/* }}} */
830830

831831
static void zend_thread_shutdown_handler(void) { /* {{{ */
832832
zend_interned_strings_dtor();
833-
#ifdef ZEND_TIMER
834-
zend_timer_delete();
833+
#ifdef ZEND_TIMERS
834+
zend_timers_delete();
835835
#endif
836836
}
837837
/* }}} */

Zend/zend.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#include "zend_smart_str_public.h"
4040
#include "zend_smart_string_public.h"
4141
#include "zend_signal.h"
42-
#include "zend_timer.h"
42+
#include "zend_timers.h"
4343

4444
#define zend_sprintf sprintf
4545

Zend/zend_execute_API.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
#ifdef HAVE_UNISTD_H
4444
#include <unistd.h>
4545
#endif
46-
#ifdef ZEND_TIMER
46+
#ifdef ZEND_TIMERS
4747
#include <sys/syscall.h>
4848
#endif
4949

@@ -173,8 +173,8 @@ void init_executor(void) /* {{{ */
173173
EG(full_tables_cleanup) = 0;
174174
EG(vm_interrupt) = 0;
175175
EG(timed_out) = 0;
176-
#ifdef ZEND_TIMER
177-
zend_timer_create();
176+
#ifdef ZEND_TIMERS
177+
zend_timers_create();
178178
#endif
179179

180180
EG(exception) = NULL;
@@ -1320,7 +1320,7 @@ ZEND_API ZEND_NORETURN void ZEND_FASTCALL zend_timeout(void) /* {{{ */
13201320
/* }}} */
13211321

13221322
#ifndef ZEND_WIN32
1323-
# ifdef ZEND_TIMER
1323+
# ifdef ZEND_TIMERS
13241324
static void zend_timeout_handler(int dummy, siginfo_t *si, void *uc) /* {{{ */
13251325
{
13261326
if (si->si_value.sival_ptr != &EG(timer)) {
@@ -1440,8 +1440,8 @@ static void zend_set_timeout_ex(zend_long seconds, bool reset_signals) /* {{{ */
14401440
zend_error_noreturn(E_ERROR, "Could not queue new timer");
14411441
return;
14421442
}
1443-
#elif defined(ZEND_TIMER)
1444-
zend_timer_settime(seconds);
1443+
#elif defined(ZEND_TIMERS)
1444+
zend_timers_settime(seconds);
14451445

14461446
if (reset_signals) {
14471447
sigset_t sigset;
@@ -1520,8 +1520,8 @@ void zend_unset_timeout(void) /* {{{ */
15201520
}
15211521
tq_timer = NULL;
15221522
}
1523-
#elif ZEND_TIMER
1524-
zend_timer_settime(0);
1523+
#elif ZEND_TIMERS
1524+
zend_timers_settime(0);
15251525
#elif defined(HAVE_SETITIMER)
15261526
if (EG(timeout_seconds)) {
15271527
struct itimerval no_timeout;

Zend/zend_globals.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#include "zend_multibyte.h"
3737
#include "zend_multiply.h"
3838
#include "zend_arena.h"
39-
#include "zend_timer.h"
39+
#include "zend_timers.h"
4040

4141
/* Define ZTS if you want a thread-safe Zend */
4242
/*#undef ZTS*/
@@ -267,7 +267,7 @@ struct _zend_executor_globals {
267267
uint32_t num_errors;
268268
zend_error_info **errors;
269269

270-
#ifdef ZEND_TIMER
270+
#ifdef ZEND_TIMERS
271271
timer_t timer;
272272
struct sigaction oldact;
273273
#endif

Zend/zend_timer.c renamed to Zend/zend_timers.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
+----------------------------------------------------------------------+
1515
*/
1616

17-
#ifdef ZEND_TIMER
17+
#ifdef ZEND_TIMERS
1818

1919
#include <stdio.h>
2020
#include <signal.h>
@@ -33,7 +33,7 @@
3333
# define sigev_notify_thread_id _sigev_un._tid
3434
# endif
3535

36-
ZEND_API void zend_timer_create(void) /* {{{ */
36+
ZEND_API void zend_timers_create(void) /* {{{ */
3737
{
3838
struct sigevent sev;
3939
sev.sigev_notify = SIGEV_THREAD_ID;
@@ -59,7 +59,7 @@ ZEND_API void zend_timer_create(void) /* {{{ */
5959
}
6060
/* }}} */
6161

62-
ZEND_API void zend_timer_settime(zend_long seconds) /* {{{ }*/
62+
ZEND_API void zend_timers_settime(zend_long seconds) /* {{{ }*/
6363
{
6464
timer_t timer = EG(timer);
6565

@@ -77,7 +77,7 @@ ZEND_API void zend_timer_settime(zend_long seconds) /* {{{ }*/
7777
}
7878
/* }}} */
7979

80-
ZEND_API void zend_timer_delete(void) /* {{{ */
80+
ZEND_API void zend_timers_delete(void) /* {{{ */
8181
{
8282
timer_t timer = EG(timer);
8383
if (timer == (timer_t){0}) {

Zend/zend_timer.h renamed to Zend/zend_timers.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@
1414
+----------------------------------------------------------------------+
1515
*/
1616

17-
#ifndef ZEND_TIMER_H
18-
#define ZEND_TIMER_H
17+
#ifndef ZEND_TIMERS_H
18+
#define ZEND_TIMERS_H
1919

20-
# ifdef ZEND_TIMER
20+
# ifdef ZEND_TIMERS
2121

2222
#include "zend_long.h"
2323

24-
ZEND_API void zend_timer_create(void);
25-
ZEND_API void zend_timer_settime(zend_long seconds);
26-
ZEND_API void zend_timer_delete(void);
24+
ZEND_API void zend_timers_create(void);
25+
ZEND_API void zend_timers_settime(zend_long seconds);
26+
ZEND_API void zend_timers_delete(void);
2727

2828
# endif
2929
#endif

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1634,7 +1634,7 @@ PHP_ADD_SOURCES(Zend, \
16341634
zend_closures.c zend_weakrefs.c zend_float.c zend_string.c zend_signal.c zend_generators.c \
16351635
zend_virtual_cwd.c zend_ast.c zend_objects.c zend_object_handlers.c zend_objects_API.c \
16361636
zend_default_classes.c zend_inheritance.c zend_smart_str.c zend_cpuinfo.c zend_gdb.c \
1637-
zend_observer.c zend_system_id.c zend_enum.c zend_fibers.c zend_timer.c \
1637+
zend_observer.c zend_system_id.c zend_enum.c zend_fibers.c zend_timers.c \
16381638
Optimizer/zend_optimizer.c \
16391639
Optimizer/pass1.c \
16401640
Optimizer/pass3.c \

ext/opcache/ZendAccelerator.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4693,8 +4693,8 @@ static int accel_finish_startup(void)
46934693
zend_accel_error(ACCEL_LOG_WARNING, "Preloading failed to setuid(%d)", pw->pw_uid);
46944694
exit(1);
46954695
}
4696-
#ifdef ZEND_TIMER
4697-
zend_timer_create();
4696+
#ifdef ZEND_TIMERS
4697+
zend_timers_create();
46984698
#endif
46994699
in_child = 1;
47004700
} else { /* parent */

ext/pcntl/pcntl.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
# define NSIG 32
5151
#endif
5252

53-
#include "Zend/zend_timer.h"
53+
#include "Zend/zend_timers.h"
5454

5555
ZEND_DECLARE_MODULE_GLOBALS(pcntl)
5656
static PHP_GINIT_FUNCTION(pcntl);
@@ -534,8 +534,8 @@ PHP_FUNCTION(pcntl_fork)
534534
PCNTL_G(last_error) = errno;
535535
php_error_docref(NULL, E_WARNING, "Error %d", errno);
536536
} else if (id == 0) {
537-
#ifdef ZEND_TIMER
538-
zend_timer_create();
537+
#ifdef ZEND_TIMERS
538+
zend_timers_create();
539539
#endif
540540
}
541541

ext/standard/info.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -891,10 +891,10 @@ PHPAPI ZEND_COLD void php_print_info(int flag)
891891
efree(descr);
892892
}
893893

894-
#ifdef ZEND_TIMER
895-
php_info_print_table_row(2, "Zend Timer", "enabled" );
894+
#ifdef ZEND_TIMERS
895+
php_info_print_table_row(2, "Zend Timers", "enabled" );
896896
#else
897-
php_info_print_table_row(2, "Zend Timer", "disabled" );
897+
php_info_print_table_row(2, "Zend Timers", "disabled" );
898898
#endif
899899

900900
#if HAVE_IPV6

ext/standard/tests/general_functions/phpinfo.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Thread Safety => %s%A
3434
Zend Signal Handling => %s
3535
Zend Memory Manager => %s
3636
Zend Multibyte Support => %s
37-
Zend Timer => %s
37+
Zend Timers => %s
3838
IPv6 Support => %s
3939
DTrace Support => %s
4040

sapi/cgi/cgi_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2054,8 +2054,8 @@ consult the installation file that came with this distribution, or visit \n\
20542054
sigaction(SIGINT, &old_int, 0);
20552055
zend_signal_init();
20562056

2057-
#if ZEND_TIMER
2058-
zend_timer_create();
2057+
#if ZEND_TIMERS
2058+
zend_timers_create();
20592059
#endif
20602060
break;
20612061
case -1:

sapi/cli/php_cli_server.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
#include "zend_execute.h"
6565
#include "zend_highlight.h"
6666
#include "zend_exceptions.h"
67-
#include "zend_timer.h"
67+
#include "zend_timers.h"
6868

6969
#include "php_getopt.h"
7070

@@ -2401,8 +2401,8 @@ static void php_cli_server_startup_workers(void) {
24012401
} else if (pid == SUCCESS) {
24022402
return;
24032403
} else {
2404-
#if ZEND_TIMER
2405-
zend_timer_create();
2404+
#if ZEND_TIMERS
2405+
zend_timers_create();
24062406
#endif
24072407

24082408
php_cli_server_workers[php_cli_server_worker] = pid;

sapi/fpm/fpm/fpm_php.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include "php_ini.h"
1212
#include "ext/standard/dl.h"
1313

14-
#include "zend_timer.h"
14+
#include "zend_timers.h"
1515

1616
#include "fastcgi.h"
1717

@@ -217,8 +217,8 @@ int fpm_php_init_child(struct fpm_worker_pool_s *wp) /* {{{ */
217217
return -1;
218218
}
219219

220-
#if ZEND_TIMER
221-
zend_timer_create();
220+
#if ZEND_TIMERS
221+
zend_timers_create();
222222
#endif
223223

224224
if (wp->limit_extensions) {

0 commit comments

Comments
 (0)