xref: /minix/minix/servers/vfs/threads.h (revision 728b0e5b)
1 #ifndef __VFS_WORKERS_H__
2 #define __VFS_WORKERS_H__
3 #include <minix/mthread.h>
4 
5 #define thread_t	mthread_thread_t
6 #define mutex_t		mthread_mutex_t
7 #define cond_t		mthread_cond_t
8 #define attr_t		mthread_attr_t
9 
10 #define mutex_init	mthread_mutex_init
11 #define mutex_destroy	mthread_mutex_destroy
12 #define mutex_lock	mthread_mutex_lock
13 #define mutex_trylock	mthread_mutex_trylock
14 #define mutex_unlock	mthread_mutex_unlock
15 
16 #define cond_init	mthread_cond_init
17 #define cond_destroy	mthread_cond_destroy
18 #define cond_wait	mthread_cond_wait
19 #define cond_signal	mthread_cond_signal
20 
21 struct fproc;
22 
23 struct worker_thread {
24   thread_t w_tid;
25   mutex_t w_event_mutex;
26   cond_t w_event;
27   struct fproc *w_fp;
28   message w_m_in;
29   message w_m_out;
30   int w_err_code;
31   message *w_sendrec;
32   message *w_drv_sendrec;
33   endpoint_t w_task;
34   struct dmap *w_dmap;
35   struct worker_thread *w_next;
36 };
37 
38 #endif
39