summaryrefslogtreecommitdiffstats
path: root/kernel/include/linux/swork.h
blob: f175fa9a60169ffa7120357b3d7729e979991629 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef _LINUX_SWORK_H
#define _LINUX_SWORK_H

#include <linux/list.h>

struct swork_event {
	struct list_head item;
	unsigned long flags;
	void (*func)(struct swork_event *);
};

static inline void INIT_SWORK(struct swork_event *event,
			      void (*func)(struct swork_event *))
{
	event->flags = 0;
	event->func = func;
}

bool swork_queue(struct swork_event *sev);

int swork_get(void);
void swork_put(void);

#endif /* _LINUX_SWORK_H */