scheduler_recurrent_func_add

March 26, 2020 Contributors

Name

scheduler_recurrent_func_add — Registers a recurrent function and a closure for the master scheduler thread

Synopsis

#include "scheduler.h"

| void **scheduler_recurrent_func_add** ( | func, |   |
|   | closure); |   |

RecurFunc <var class="pdparam">func</var>;
void * <var class="pdparam">closure</var>;

Description

Registers a recurrent function and a closure for the master scheduler thread.

Parameters

func

The recurrent function to register for the master scheduler thread.

The following typedef applies to this data type:

typedef int (*RecurFunc) (void *closure, struct timeval * now);

closure

The closure to register for the master scheduler thread.

Return Values

This function returns void.

Threading

This function may only be called in the Scheduler thread.

Warning

This function should only be called at startup.

See Also

is_scheduler_thread, get_scheduler_pid and ping_scheduler.