int pthreadpool_tevent_init(TALLOC_CTX *mem_ctx, unsigned max_threads,
struct pthreadpool_tevent **presult);
-struct pthreadpool_tevent_wrapper_ops {
- const char *name;
-
- bool (*before_job)(struct pthreadpool_tevent *wrap_tp,
- void *private_state,
- struct pthreadpool_tevent *main_tp,
- const char *location);
- bool (*after_job)(struct pthreadpool_tevent *wrap_tp,
- void *private_state,
- struct pthreadpool_tevent *main_tp,
- const char *location);
-};
-
-struct pthreadpool_tevent *_pthreadpool_tevent_wrapper_create(
- struct pthreadpool_tevent *main_tp,
- TALLOC_CTX *mem_ctx,
- const struct pthreadpool_tevent_wrapper_ops *ops,
- void *pstate,
- size_t psize,
- const char *type,
- const char *location);
-#define pthreadpool_tevent_wrapper_create(main_tp, mem_ctx, ops, state, type) \
- _pthreadpool_tevent_wrapper_create(main_tp, mem_ctx, ops, \
- state, sizeof(type), #type, __location__)
-
-/*
- * this can only be called directly after
- * pthreadpool_tevent_wrapper_create()
- */
-void pthreadpool_tevent_force_per_thread_cwd(struct pthreadpool_tevent *pool,
- const void *private_state);
-
size_t pthreadpool_tevent_max_threads(struct pthreadpool_tevent *pool);
size_t pthreadpool_tevent_queued_jobs(struct pthreadpool_tevent *pool);
bool pthreadpool_tevent_per_thread_cwd(struct pthreadpool_tevent *pool);