Changeset View
Changeset View
Standalone View
Standalone View
head/sys/cddl/contrib/opensolaris/uts/common/sys/taskq.h
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | |||||
* KM_SLEEP/KM_NOSLEEP. | * KM_SLEEP/KM_NOSLEEP. | ||||
*/ | */ | ||||
#define TQ_SLEEP 0x00 /* Can block for memory */ | #define TQ_SLEEP 0x00 /* Can block for memory */ | ||||
#define TQ_NOSLEEP 0x01 /* cannot block for memory; may fail */ | #define TQ_NOSLEEP 0x01 /* cannot block for memory; may fail */ | ||||
#define TQ_NOQUEUE 0x02 /* Do not enqueue if can't dispatch */ | #define TQ_NOQUEUE 0x02 /* Do not enqueue if can't dispatch */ | ||||
#define TQ_NOALLOC 0x04 /* cannot allocate memory; may fail */ | #define TQ_NOALLOC 0x04 /* cannot allocate memory; may fail */ | ||||
#define TQ_FRONT 0x08 /* Put task at the front of the queue */ | #define TQ_FRONT 0x08 /* Put task at the front of the queue */ | ||||
#define TASKQID_INVALID ((taskqid_t)0) | |||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
extern taskq_t *system_taskq; | extern taskq_t *system_taskq; | ||||
void taskq_init(void); | void taskq_init(void); | ||||
void taskq_mp_init(void); | void taskq_mp_init(void); | ||||
taskq_t *taskq_create(const char *, int, pri_t, int, int, uint_t); | taskq_t *taskq_create(const char *, int, pri_t, int, int, uint_t); | ||||
taskq_t *taskq_create_instance(const char *, int, int, pri_t, int, int, uint_t); | taskq_t *taskq_create_instance(const char *, int, int, pri_t, int, int, uint_t); | ||||
taskq_t *taskq_create_proc(const char *, int, pri_t, int, int, | taskq_t *taskq_create_proc(const char *, int, pri_t, int, int, | ||||
struct proc *, uint_t); | struct proc *, uint_t); | ||||
taskq_t *taskq_create_sysdc(const char *, int, int, int, | taskq_t *taskq_create_sysdc(const char *, int, int, int, | ||||
struct proc *, uint_t, uint_t); | struct proc *, uint_t, uint_t); | ||||
taskqid_t taskq_dispatch(taskq_t *, task_func_t, void *, uint_t); | taskqid_t taskq_dispatch(taskq_t *, task_func_t, void *, uint_t); | ||||
void taskq_dispatch_ent(taskq_t *, task_func_t, void *, uint_t, | void taskq_dispatch_ent(taskq_t *, task_func_t, void *, uint_t, | ||||
taskq_ent_t *); | taskq_ent_t *); | ||||
void nulltask(void *); | void nulltask(void *); | ||||
void taskq_destroy(taskq_t *); | void taskq_destroy(taskq_t *); | ||||
void taskq_wait(taskq_t *); | void taskq_wait(taskq_t *); | ||||
void taskq_wait_id(taskq_t *, taskqid_t); | |||||
void taskq_suspend(taskq_t *); | void taskq_suspend(taskq_t *); | ||||
int taskq_suspended(taskq_t *); | int taskq_suspended(taskq_t *); | ||||
void taskq_resume(taskq_t *); | void taskq_resume(taskq_t *); | ||||
int taskq_member(taskq_t *, kthread_t *); | int taskq_member(taskq_t *, kthread_t *); | ||||
#endif /* _KERNEL */ | #endif /* _KERNEL */ | ||||
#ifdef __cplusplus | #ifdef __cplusplus | ||||
} | } | ||||
#endif | #endif | ||||
#endif /* _SYS_TASKQ_H */ | #endif /* _SYS_TASKQ_H */ |