93 #define NS_JOB_NONE 0x0 115 #define NS_JOB_ACCEPT 0x1 126 #define NS_JOB_CONNECT 0x2 137 #define NS_JOB_READ 0x4 148 #define NS_JOB_WRITE 0x8 159 #define NS_JOB_TIMER 0x10 170 #define NS_JOB_SIGNAL 0x20 193 #define NS_JOB_PERSIST 0x40 212 #define NS_JOB_THREAD 0x80 221 #define NS_JOB_PRESERVE_FD 0x100 246 #define NS_JOB_IS_ACCEPT(eee) ((eee)&NS_JOB_ACCEPT) 251 #define NS_JOB_IS_READ(eee) ((eee)&NS_JOB_READ) 256 #define NS_JOB_IS_CONNECT(eee) ((eee)&NS_JOB_CONNECT) 261 #define NS_JOB_IS_WRITE(eee) ((eee)&NS_JOB_WRITE) 266 #define NS_JOB_IS_TIMER(eee) ((eee)&NS_JOB_TIMER) 271 #define NS_JOB_IS_SIGNAL(eee) ((eee)&NS_JOB_SIGNAL) 276 #define NS_JOB_IS_PERSIST(eee) ((eee)&NS_JOB_PERSIST) 281 #define NS_JOB_IS_IO(eee) (NS_JOB_IS_ACCEPT(eee)||NS_JOB_IS_READ(eee)||NS_JOB_IS_CONNECT(eee)||NS_JOB_IS_WRITE(eee)) 286 #define NS_JOB_IS_THREAD(eee) ((eee)&NS_JOB_THREAD) 291 #define NS_JOB_IS_PRESERVE_FD(eee) ((eee)&NS_JOB_PRESERVE_FD) 296 #define NS_JOB_SET_READ(eee) ((eee) |= NS_JOB_READ) 300 #define NS_JOB_SET_WRITE(eee) ((eee) |= NS_JOB_WRITE) 304 #define NS_JOB_SET_THREAD(eee) ((eee) |= NS_JOB_THREAD) 308 #define NS_JOB_UNSET_READ(eee) ((eee) &= ~NS_JOB_READ) 312 #define NS_JOB_UNSET_WRITE(eee) ((eee) &= ~NS_JOB_WRITE) 316 #define NS_JOB_UNSET_THREAD(eee) ((eee) &= ~NS_JOB_THREAD) 349 void* (*malloc_fct)(size_t);
350 void* (*memalign_fct)(
size_t size,
size_t alignment);
351 void* (*calloc_fct)(size_t, size_t);
352 void* (*realloc_fct)(
void *, size_t);
PRStatus ns_thrpool_wait(struct ns_thrpool_t *tp)
ns_job_type_t ns_job_get_output_type(struct ns_job_t *job)
void(* log_start_fct)(void)
Definition: nunc-stans.h:345
PRStatus ns_add_signal_job(ns_thrpool_t *tp, PRInt32 signum, ns_job_type_t job_type, ns_job_func_t func, void *data, struct ns_job_t **job)
PRStatus ns_create_job(struct ns_thrpool_t *tp, ns_job_type_t job_type, ns_job_func_t func, struct ns_job_t **job)
void(* log_close_fct)(void)
Definition: nunc-stans.h:346
void(* log_fct)(int, const char *, va_list)
Definition: nunc-stans.h:344
void ns_thrpool_shutdown(struct ns_thrpool_t *tp)
PRStatus ns_add_io_timeout_job(struct ns_thrpool_t *tp, PRFileDesc *fd, struct timeval *tv, ns_job_type_t job_type, ns_job_func_t func, void *data, struct ns_job_t **job)
PRInt32 max_threads
Definition: nunc-stans.h:340
PRFileDesc * ns_job_get_fd(struct ns_job_t *job)
struct ns_thrpool_t * ns_thrpool_new(struct ns_thrpool_config *config)
PRStatus ns_job_set_done_cb(struct ns_job_t *job, ns_job_func_t func)
PRStatus ns_add_io_job(struct ns_thrpool_t *tp, PRFileDesc *fd, ns_job_type_t job_type, ns_job_func_t func, void *data, struct ns_job_t **job)
Definition: nunc-stans.h:336
void * ns_job_get_data(struct ns_job_t *job)
PRUint32 stacksize
Definition: nunc-stans.h:341
void ns_thrpool_destroy(struct ns_thrpool_t *tp)
PRInt32 ns_thrpool_is_shutdown(struct ns_thrpool_t *tp)
void(* ns_job_func_t)(struct ns_job_t *)
Definition: nunc-stans.h:82
PRStatus ns_add_job(ns_thrpool_t *tp, ns_job_type_t job_type, ns_job_func_t func, void *data, struct ns_job_t **job)
PRStatus ns_job_set_data(struct ns_job_t *job, void *data)
ns_job_type_t ns_job_get_type(struct ns_job_t *job)
PRStatus ns_add_timeout_job(struct ns_thrpool_t *tp, struct timeval *tv, ns_job_type_t job_type, ns_job_func_t func, void *data, struct ns_job_t **job)
struct ns_thrpool_t ns_thrpool_t
Definition: nunc-stans.h:61
void(* free_fct)(void *)
Definition: nunc-stans.h:353
unsigned short ns_job_type_t
Definition: nunc-stans.h:240
void ns_thrpool_config_init(struct ns_thrpool_config *tp_config)
PRStatus ns_job_done(struct ns_job_t *job)
ns_thrpool_t * ns_job_get_tp(struct ns_job_t *job)
PRStatus ns_job_rearm(struct ns_job_t *job)