Back to index

php5  5.3.10
Functions
php_ticks.c File Reference
#include "php.h"
#include "php_ticks.h"

Go to the source code of this file.

Functions

int php_startup_ticks (TSRMLS_D)
void php_deactivate_ticks (TSRMLS_D)
void php_shutdown_ticks (TSRMLS_D)
static int php_compare_tick_functions (void *elem1, void *elem2)
PHPAPI void php_add_tick_function (void(*func)(int))
PHPAPI void php_remove_tick_function (void(*func)(int))
static void php_tick_iterator (void *data, void *arg TSRMLS_DC)
void php_run_ticks (int count)

Function Documentation

PHPAPI void php_add_tick_function ( void(*)(int func)

Definition at line 49 of file php_ticks.c.

{
       TSRMLS_FETCH();

       zend_llist_add_element(&PG(tick_functions), (void *)&func);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static int php_compare_tick_functions ( void *  elem1,
void *  elem2 
) [static]

Definition at line 40 of file php_ticks.c.

{
       void(*func1)(int);
       void(*func2)(int);
       memcpy(&func1, elem1, sizeof(void(*)(int)));
       memcpy(&func2, elem2, sizeof(void(*)(int)));
       return (func1 == func2);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 30 of file php_ticks.c.

{
       zend_llist_clean(&PG(tick_functions));
}

Here is the call graph for this function:

Here is the caller graph for this function:

PHPAPI void php_remove_tick_function ( void(*)(int func)

Definition at line 56 of file php_ticks.c.

{
       TSRMLS_FETCH();

       zend_llist_del_element(&PG(tick_functions), (void *)func,
                                             (int(*)(void*, void*))php_compare_tick_functions);
}

Here is the call graph for this function:

void php_run_ticks ( int  count)

Definition at line 72 of file php_ticks.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 35 of file php_ticks.c.

{
       zend_llist_destroy(&PG(tick_functions));
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 24 of file php_ticks.c.

{
       zend_llist_init(&PG(tick_functions), sizeof(void(*)(int)), NULL, 1);
       return SUCCESS;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void php_tick_iterator ( void *  data,
void *arg  TSRMLS_DC 
) [static]

Definition at line 64 of file php_ticks.c.

{
       void (*func)(int);

       memcpy(&func, data, sizeof(void(*)(int)));
       func(*((int *)arg));
}

Here is the caller graph for this function: