libexec exec fix
[minix.git] / servers / vfs / glo.h
blob8ad298abcdfc546fd2888310fa1203f6a88f512f
1 #ifndef __VFS_GLO_H__
2 #define __VFS_GLO_H__
4 /* EXTERN should be extern except for the table file */
5 #ifdef _TABLE
6 #undef EXTERN
7 #define EXTERN
8 #endif
10 #include <minix/param.h>
12 /* File System global variables */
13 EXTERN struct fproc *fp; /* pointer to caller's fproc struct */
14 EXTERN int susp_count; /* number of procs suspended on pipe */
15 EXTERN int nr_locks; /* number of locks currently in place */
16 EXTERN int reviving; /* number of pipe processes to be revived */
17 EXTERN int pending;
18 EXTERN int sending;
19 EXTERN int verbose;
21 EXTERN dev_t ROOT_DEV; /* device number of the root device */
22 EXTERN int ROOT_FS_E; /* kernel endpoint of the root FS proc */
23 EXTERN u32_t system_hz; /* system clock frequency. */
25 /* The parameters of the call are kept here. */
26 EXTERN message m_in; /* the input message itself */
27 EXTERN message m_out; /* the output message used for reply */
28 # define who_p ((int) (fp - fproc))
29 # define isokslot(p) (p >= 0 && \
30 p < (int)(sizeof(fproc) / sizeof(struct fproc)))
31 # define who_e (self != NULL && fp != NULL ? fp->fp_endpoint : \
32 m_in.m_source)
33 # define call_nr (m_in.m_type)
34 # define job_m_in (self->w_job.j_m_in)
35 # define job_call_nr (job_m_in.m_type)
36 # define super_user (fp->fp_effuid == SU_UID ? 1 : 0)
37 # define scratch(p) (scratchpad[((int) ((p) - fproc))])
38 EXTERN struct worker_thread *self;
39 EXTERN int force_sync; /* toggle forced synchronous communication */
40 EXTERN int deadlock_resolving;
41 EXTERN mutex_t exec_lock;
42 EXTERN mutex_t bsf_lock;/* Global lock for access to block special files */
43 EXTERN struct worker_thread workers[NR_WTHREADS];
44 EXTERN struct worker_thread sys_worker;
45 EXTERN struct worker_thread dl_worker;
46 EXTERN thread_t invalid_thread_id;
47 EXTERN char mount_label[LABEL_MAX]; /* label of file system to mount */
49 /* The following variables are used for returning results to the caller. */
50 EXTERN int err_code; /* temporary storage for error number */
52 /* Data initialized elsewhere. */
53 extern int(*call_vec[]) (void);
54 extern int(*pfs_call_vec[]) (void);
55 extern char mode_map[]; /* mapping from O_ACCMODE mask to R_BIT/W_BIT flags */
57 EXTERN struct kinfo kinfo; /* kernel information */
59 #endif