minix/minix/servers/vfs/threads.h
David van Moolenbroek 728b0e5b34 VFS: suspend threads for live update
- do not allow live update for request and protocol free states if
  there are any worker threads that have pending or active work;
- destroy all worker threads before such live updates and recreate
  them afterwards, because transferring (the contents of) the
  thread stacks is not an option at this time;
- recreate worker threads in the new instance only if they were
  shut down before the state transfer, by letting RS provide the
  original preparation state as initialization information.

Change-Id: I846225f5b7281f19e69175485f2c88a4b4891dc2
2015-09-17 17:13:46 +00:00

39 lines
883 B
C

#ifndef __VFS_WORKERS_H__
#define __VFS_WORKERS_H__
#include <minix/mthread.h>
#define thread_t mthread_thread_t
#define mutex_t mthread_mutex_t
#define cond_t mthread_cond_t
#define attr_t mthread_attr_t
#define mutex_init mthread_mutex_init
#define mutex_destroy mthread_mutex_destroy
#define mutex_lock mthread_mutex_lock
#define mutex_trylock mthread_mutex_trylock
#define mutex_unlock mthread_mutex_unlock
#define cond_init mthread_cond_init
#define cond_destroy mthread_cond_destroy
#define cond_wait mthread_cond_wait
#define cond_signal mthread_cond_signal
struct fproc;
struct worker_thread {
thread_t w_tid;
mutex_t w_event_mutex;
cond_t w_event;
struct fproc *w_fp;
message w_m_in;
message w_m_out;
int w_err_code;
message *w_sendrec;
message *w_drv_sendrec;
endpoint_t w_task;
struct dmap *w_dmap;
struct worker_thread *w_next;
};
#endif