diff options
author | Stig Bakken <ssb@php.net> | 2000-08-29 09:18:48 +0000 |
---|---|---|
committer | Stig Bakken <ssb@php.net> | 2000-08-29 09:18:48 +0000 |
commit | 1b4d8c0fb616f33dc5386e180b4201fc996014cd (patch) | |
tree | 4dfb62cdf17402d63718fac5cf6c04df0738fa90 /main/php_ticks.h | |
parent | fad9bab629b93a81213d79da7b62994d0ba0f5b1 (diff) | |
download | php-git-1b4d8c0fb616f33dc5386e180b4201fc996014cd.tar.gz |
@Added PHP API for Zend's ticks
Added PHP API for registering tick functions. Ticks is a per-instruction
callback in Zend that allows us to implement cooperative multitasking
within PHP. Example:
In extension code:
php_add_tick_function(my_tick_func);
void my_tick_func(int count) {
php_printf("[tick %d]", count);
}
In PHP code:
<?php
declare(ticks = 1) {
print "there should be two ticks here.\n";
}
?>
Diffstat (limited to 'main/php_ticks.h')
-rw-r--r-- | main/php_ticks.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/main/php_ticks.h b/main/php_ticks.h index 078ca3aae2..1ca4617424 100644 --- a/main/php_ticks.h +++ b/main/php_ticks.h @@ -21,16 +21,11 @@ #ifndef PHP_TICKS_H #define PHP_TICKS_H -struct _php_tick_function_entry { - void (*func)(int count); - struct _php_tick_function_entry *next; -}; - int php_startup_ticks(PLS_D); void php_shutdown_ticks(PLS_D); void php_run_ticks(int count); -PHPAPI int php_add_tick_function(void (*func)(int count)); -PHPAPI int php_remove_tick_function(void (*func)(int count)); +PHPAPI void php_add_tick_function(void (*func)(int)); +PHPAPI void php_remove_tick_function(void (*func)(int)); #endif |