Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/sleepqueue.h
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | |||||
#define SLEEPQ_PAUSE 0x02 /* Used by pause. */ | #define SLEEPQ_PAUSE 0x02 /* Used by pause. */ | ||||
#define SLEEPQ_SX 0x03 /* Used by an sx lock. */ | #define SLEEPQ_SX 0x03 /* Used by an sx lock. */ | ||||
#define SLEEPQ_LK 0x04 /* Used by a lockmgr. */ | #define SLEEPQ_LK 0x04 /* Used by a lockmgr. */ | ||||
#define SLEEPQ_INTERRUPTIBLE 0x100 /* Sleep is interruptible. */ | #define SLEEPQ_INTERRUPTIBLE 0x100 /* Sleep is interruptible. */ | ||||
#define SLEEPQ_UNFAIR 0x200 /* Unfair wakeup order. */ | #define SLEEPQ_UNFAIR 0x200 /* Unfair wakeup order. */ | ||||
#define SLEEPQ_DROP 0x400 /* Return without lock held. */ | #define SLEEPQ_DROP 0x400 /* Return without lock held. */ | ||||
void init_sleepqueues(void); | void init_sleepqueues(void); | ||||
int sleepq_abort(struct thread *td, int intrval); | void sleepq_abort(struct thread *td, int intrval); | ||||
void sleepq_add(const void *wchan, struct lock_object *lock, | void sleepq_add(const void *wchan, struct lock_object *lock, | ||||
const char *wmesg, int flags, int queue); | const char *wmesg, int flags, int queue); | ||||
struct sleepqueue *sleepq_alloc(void); | struct sleepqueue *sleepq_alloc(void); | ||||
int sleepq_broadcast(const void *wchan, int flags, int pri, int queue); | void sleepq_broadcast(const void *wchan, int flags, int pri, int queue); | ||||
void sleepq_chains_remove_matching(bool (*matches)(struct thread *)); | void sleepq_chains_remove_matching(bool (*matches)(struct thread *)); | ||||
void sleepq_free(struct sleepqueue *sq); | void sleepq_free(struct sleepqueue *sq); | ||||
void sleepq_lock(const void *wchan); | void sleepq_lock(const void *wchan); | ||||
struct sleepqueue *sleepq_lookup(const void *wchan); | struct sleepqueue *sleepq_lookup(const void *wchan); | ||||
void sleepq_release(const void *wchan); | void sleepq_release(const void *wchan); | ||||
void sleepq_remove(struct thread *td, const void *wchan); | void sleepq_remove(struct thread *td, const void *wchan); | ||||
int sleepq_remove_matching(struct sleepqueue *sq, int queue, | void sleepq_remove_matching(struct sleepqueue *sq, int queue, | ||||
bool (*matches)(struct thread *), int pri); | bool (*matches)(struct thread *), int pri); | ||||
void sleepq_remove_nested(struct thread *td); | void sleepq_remove_nested(struct thread *td); | ||||
int sleepq_signal(const void *wchan, int flags, int pri, int queue); | void sleepq_signal(const void *wchan, int flags, int pri, int queue); | ||||
void sleepq_set_timeout_sbt(const void *wchan, sbintime_t sbt, | void sleepq_set_timeout_sbt(const void *wchan, sbintime_t sbt, | ||||
sbintime_t pr, int flags); | sbintime_t pr, int flags); | ||||
#define sleepq_set_timeout(wchan, timo) \ | #define sleepq_set_timeout(wchan, timo) \ | ||||
sleepq_set_timeout_sbt((wchan), tick_sbt * (timo), 0, C_HARDCLOCK) | sleepq_set_timeout_sbt((wchan), tick_sbt * (timo), 0, C_HARDCLOCK) | ||||
u_int sleepq_sleepcnt(const void *wchan, int queue); | u_int sleepq_sleepcnt(const void *wchan, int queue); | ||||
int sleepq_timedwait(const void *wchan, int pri); | int sleepq_timedwait(const void *wchan, int pri); | ||||
int sleepq_timedwait_sig(const void *wchan, int pri); | int sleepq_timedwait_sig(const void *wchan, int pri); | ||||
int sleepq_type(const void *wchan); | int sleepq_type(const void *wchan); | ||||
Show All 11 Lines |