linux/kernel/sched/wait_bit.c

// SPDX-License-Identifier: GPL-2.0-only

/*
 * The implementation of the wait_bit*() and related waiting APIs:
 */

#define WAIT_TABLE_BITS
#define WAIT_TABLE_SIZE

static wait_queue_head_t bit_wait_table[WAIT_TABLE_SIZE] __cacheline_aligned;

wait_queue_head_t *bit_waitqueue(void *word, int bit)
{}
EXPORT_SYMBOL();

int wake_bit_function(struct wait_queue_entry *wq_entry, unsigned mode, int sync, void *arg)
{}
EXPORT_SYMBOL();

/*
 * To allow interruptible waiting and asynchronous (i.e. non-blocking)
 * waiting, the actions of __wait_on_bit() and __wait_on_bit_lock() are
 * permitted return codes. Nonzero return codes halt waiting and return.
 */
int __sched
__wait_on_bit(struct wait_queue_head *wq_head, struct wait_bit_queue_entry *wbq_entry,
	      wait_bit_action_f *action, unsigned mode)
{}
EXPORT_SYMBOL();

int __sched out_of_line_wait_on_bit(void *word, int bit,
				    wait_bit_action_f *action, unsigned mode)
{}
EXPORT_SYMBOL();

int __sched out_of_line_wait_on_bit_timeout(
	void *word, int bit, wait_bit_action_f *action,
	unsigned mode, unsigned long timeout)
{}
EXPORT_SYMBOL_GPL();

int __sched
__wait_on_bit_lock(struct wait_queue_head *wq_head, struct wait_bit_queue_entry *wbq_entry,
			wait_bit_action_f *action, unsigned mode)
{}
EXPORT_SYMBOL();

int __sched out_of_line_wait_on_bit_lock(void *word, int bit,
					 wait_bit_action_f *action, unsigned mode)
{}
EXPORT_SYMBOL();

void __wake_up_bit(struct wait_queue_head *wq_head, void *word, int bit)
{}
EXPORT_SYMBOL();

/**
 * wake_up_bit - wake up a waiter on a bit
 * @word: the word being waited on, a kernel virtual address
 * @bit: the bit of the word being waited on
 *
 * There is a standard hashed waitqueue table for generic use. This
 * is the part of the hash-table's accessor API that wakes up waiters
 * on a bit. For instance, if one were to have waiters on a bitflag,
 * one would call wake_up_bit() after clearing the bit.
 *
 * In order for this to function properly, as it uses waitqueue_active()
 * internally, some kind of memory barrier must be done prior to calling
 * this. Typically, this will be smp_mb__after_atomic(), but in some
 * cases where bitflags are manipulated non-atomically under a lock, one
 * may need to use a less regular barrier, such fs/inode.c's smp_mb(),
 * because spin_unlock() does not guarantee a memory barrier.
 */
void wake_up_bit(void *word, int bit)
{}
EXPORT_SYMBOL();

wait_queue_head_t *__var_waitqueue(void *p)
{}
EXPORT_SYMBOL();

static int
var_wake_function(struct wait_queue_entry *wq_entry, unsigned int mode,
		  int sync, void *arg)
{}

void init_wait_var_entry(struct wait_bit_queue_entry *wbq_entry, void *var, int flags)
{}
EXPORT_SYMBOL();

void wake_up_var(void *var)
{}
EXPORT_SYMBOL();

__sched int bit_wait(struct wait_bit_key *word, int mode)
{}
EXPORT_SYMBOL();

__sched int bit_wait_io(struct wait_bit_key *word, int mode)
{}
EXPORT_SYMBOL();

__sched int bit_wait_timeout(struct wait_bit_key *word, int mode)
{}
EXPORT_SYMBOL_GPL();

__sched int bit_wait_io_timeout(struct wait_bit_key *word, int mode)
{}
EXPORT_SYMBOL_GPL();

void __init wait_bit_init(void)
{}