Mutex and semopare
DECLARE_SEMAPHORE_GENERIC(name, count)
static DECLARE_MUTEX(name);
sema_init(sem, count);
init_MUTEX(sem);
init_MUTEX_LOCKED(struct semaphore *)
down_interruptible(struct semaphore *)
down(struct semaphore *)
down_trylock(struct semaphore *)
up(struct semaphore *)
spinlock
spinlock_t mr_lock = SPIN_LOCK_UNLOCKED;
spin_lock_init()
spin_lock()
spin_lock_irq()
spin_lock_irqsave()
spin_lock_bh()
spin_unlock()
spin_unlock_irq()
spin_unlock_irqrestore()
spin_unlock_bh()
spin_trylock()
spin_is_locked()
completion
DECLARE_COMPLETION(mr_comp);
init_completion(struct completion *)
wait_for_completion(struct completion *)
complete(struct completion *)
tasklet
DECLARE_TASKLET(name, func, data)
DECLARE_TASKLET_DISABLED(name, func, data);
tasklet_init():
tasklet_schedule
tasklet_disable()
tasklet_disable_nosync()
tasklet_enable()
tasklet_kill().
Work queue
DECLARE_WORK(name, void (*func)(void *), void *data);
INIT_WORK(struct work_struct *work, void (*func)(void *), void *data);
schedule_work(&work);
schedule_delayed_work(&work, delay);
flush_scheduled_work(void);
cancel_delayed_work(struct work_struct *work);
create_workqueue(const char *name);
queue_work(struct workqueue_struct *wq, struct work_struct *work)
queue_delayed_work(struct workqueue_struct *wq,
struct work_struct *work,
unsigned long delay)
flush_workqueue(struct workqueue_struct *wq)