1 #ifndef FIBER_BASE_INCLUDE_H 2 #define FIBER_BASE_INCLUDE_H 33 void* arg,
size_t size);
189 #define FIBER_EVENT_KERNEL 0 190 #define FIBER_EVENT_POLL 1 191 #define FIBER_EVENT_SELECT 2 192 #define FIBER_EVENT_WMSG 3 236 size_t size,
void (*fn)(
ACL_FIBER*,
void*),
void* ctx);
354 #if !defined(_WIN32) || !defined(_WIN64) FIBER_API int acl_fiber_closed(ACL_FIBER *fiber)
FIBER_API unsigned int acl_fiber_id(const ACL_FIBER *fiber)
FIBER_API ACL_FIBER * acl_fiber_create_timer(unsigned int milliseconds, size_t size, void(*fn)(ACL_FIBER *, void *), void *ctx)
FIBER_API void acl_fiber_msg_stdout_enable(int onoff)
FIBER_API int acl_fiber_killed(ACL_FIBER *fiber)
FIBER_API int acl_fiber_yield(void)
void(* FIBER_MSG_WRITE_FN)(void *ctx, const char *fmt, va_list ap)
FIBER_API void acl_fiber_keep_errno(ACL_FIBER *fiber, int yesno)
FIBER_API unsigned int acl_fiber_self(void)
FIBER_API int acl_fiber_errno(ACL_FIBER *fiber)
FIBER_API void acl_fiber_register(FIBER_ALLOC_FN alloc_fn, FIBER_ORIGIN_FN origin_fn)
FIBER_API void acl_fiber_schedule(void)
FIBER_API int acl_fiber_set_fdlimit(int limit)
FIBER_API void acl_fiber_set_dns(const char *ip, int port)
FIBER_API const char * acl_fiber_last_serror(void)
FIBER_API int acl_fiber_scheduled(void)
FIBER_API ACL_FIBER * acl_fiber_alloc(size_t size, void **pptr)
FIBER_API void acl_fiber_msg_unregister(void)
FIBER_API void * acl_fiber_get_specific(int key)
FIBER_API void acl_fiber_ready(ACL_FIBER *fiber)
ACL_FIBER *(* FIBER_ORIGIN_FN)(void))
FIBER_API int acl_fiber_gettimeofday(struct timeval *tv, struct timezone *tz)
FIBER_API void acl_fiber_msg_register(FIBER_MSG_WRITE_FN write_fn, void *ctx)
FIBER_API void acl_fiber_msg_pre_write(FIBER_MSG_PRE_WRITE_FN pre_write, void *ctx)
FIBER_API int acl_fiber_canceled(ACL_FIBER *fiber)
FIBER_API void acl_fiber_set_error(int errnum)
FIBER_API int acl_fiber_status(const ACL_FIBER *fiber)
FIBER_API unsigned int acl_fiber_delay(unsigned int milliseconds)
FIBER_API int acl_fiber_set_specific(int *key, void *ctx, void(*free_fn)(void *))
FIBER_API void acl_fiber_set_errno(ACL_FIBER *fiber, int errnum)
FIBER_API void acl_fiber_schedule_set_event(int event_mode)
FIBER_API const char * acl_fiber_strerror(int errnum, char *buf, size_t size)
FIBER_API void acl_fiber_check_timer(size_t max)
ACL_FIBER *(* FIBER_ALLOC_FN)(void(*)(ACL_FIBER *), size_t))
FIBER_API void acl_fiber_kill(ACL_FIBER *fiber)
void(* FIBER_MSG_PRE_WRITE_FN)(void *ctx, const char *fmt, va_list ap)
FIBER_API ACL_FIBER * acl_fiber_running(void)
struct ACL_FIBER ACL_FIBER
FIBER_API int acl_fiber_signum(ACL_FIBER *fiber)
FIBER_API void acl_fiber_signal(ACL_FIBER *fiber, int signum)
FIBER_API int acl_fiber_last_error(void)
FIBER_API unsigned acl_fiber_ndead(void)
FIBER_API unsigned acl_fiber_number(void)
FIBER_API void acl_fiber_schedule_with(int event_mode)
ACL_API void const char * fmt
FIBER_API ACL_FIBER * acl_fiber_create(void(*fn)(ACL_FIBER *, void *), void *arg, size_t size)
FIBER_API int acl_fiber_signaled(ACL_FIBER *fiber)
FIBER_API void acl_fiber_switch(void)
FIBER_API void acl_fiber_memstat(void)
FIBER_API void acl_fiber_hook_api(int onoff)
FIBER_API void acl_fiber_reset_timer(ACL_FIBER *timer, unsigned int milliseconds)
FIBER_API void acl_fiber_schedule_stop(void)
FIBER_API unsigned int acl_fiber_sleep(unsigned int seconds)
FIBER_API void acl_fiber_schedule_init(int on)