2012-02-13 16:28:04 +01:00
|
|
|
#ifndef __VFS_GLO_H__
|
|
|
|
#define __VFS_GLO_H__
|
|
|
|
|
2005-04-21 16:53:53 +02:00
|
|
|
/* EXTERN should be extern except for the table file */
|
|
|
|
#ifdef _TABLE
|
|
|
|
#undef EXTERN
|
|
|
|
#define EXTERN
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* File System global variables */
|
|
|
|
EXTERN struct fproc *fp; /* pointer to caller's fproc struct */
|
|
|
|
EXTERN int susp_count; /* number of procs suspended on pipe */
|
|
|
|
EXTERN int nr_locks; /* number of locks currently in place */
|
|
|
|
EXTERN int reviving; /* number of pipe processes to be revived */
|
2012-02-13 16:28:04 +01:00
|
|
|
EXTERN int pending;
|
|
|
|
EXTERN int sending;
|
2012-03-30 11:24:44 +02:00
|
|
|
EXTERN int verbose;
|
2006-10-25 15:40:36 +02:00
|
|
|
|
2012-02-13 16:28:04 +01:00
|
|
|
EXTERN dev_t ROOT_DEV; /* device number of the root device */
|
2006-10-25 15:40:36 +02:00
|
|
|
EXTERN int ROOT_FS_E; /* kernel endpoint of the root FS proc */
|
2008-12-11 15:48:05 +01:00
|
|
|
EXTERN u32_t system_hz; /* system clock frequency. */
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
/* The parameters of the call are kept here. */
|
|
|
|
EXTERN message m_in; /* the input message itself */
|
|
|
|
EXTERN message m_out; /* the output message used for reply */
|
2012-02-13 16:28:04 +01:00
|
|
|
# define who_p ((int) (fp - fproc))
|
|
|
|
# define isokslot(p) (p >= 0 && \
|
|
|
|
p < (int)(sizeof(fproc) / sizeof(struct fproc)))
|
2012-04-13 14:50:38 +02:00
|
|
|
# define who_e (self != NULL && fp != NULL ? fp->fp_endpoint : \
|
|
|
|
m_in.m_source)
|
2012-02-13 16:28:04 +01:00
|
|
|
# define call_nr (m_in.m_type)
|
2012-04-13 14:50:38 +02:00
|
|
|
# define job_m_in (self->w_job.j_m_in)
|
|
|
|
# define job_call_nr (job_m_in.m_type)
|
2012-02-13 16:28:04 +01:00
|
|
|
# define super_user (fp->fp_effuid == SU_UID ? 1 : 0)
|
|
|
|
# define scratch(p) (scratchpad[((int) ((p) - fproc))])
|
|
|
|
EXTERN struct worker_thread *self;
|
|
|
|
EXTERN int force_sync; /* toggle forced synchronous communication */
|
|
|
|
EXTERN int deadlock_resolving;
|
|
|
|
EXTERN mutex_t exec_lock;
|
|
|
|
EXTERN mutex_t bsf_lock;/* Global lock for access to block special files */
|
|
|
|
EXTERN struct worker_thread workers[NR_WTHREADS];
|
|
|
|
EXTERN struct worker_thread sys_worker;
|
|
|
|
EXTERN struct worker_thread dl_worker;
|
2012-04-13 14:50:38 +02:00
|
|
|
EXTERN thread_t invalid_thread_id;
|
2010-01-13 00:08:50 +01:00
|
|
|
EXTERN char mount_label[LABEL_MAX]; /* label of file system to mount */
|
2006-10-25 15:40:36 +02:00
|
|
|
|
2005-04-21 16:53:53 +02:00
|
|
|
/* The following variables are used for returning results to the caller. */
|
|
|
|
EXTERN int err_code; /* temporary storage for error number */
|
|
|
|
|
|
|
|
/* Data initialized elsewhere. */
|
2012-03-24 16:16:34 +01:00
|
|
|
extern int(*call_vec[]) (void);
|
|
|
|
extern int(*pfs_call_vec[]) (void);
|
2011-11-24 13:57:36 +01:00
|
|
|
extern char mode_map[]; /* mapping from O_ACCMODE mask to R_BIT/W_BIT flags */
|
2012-02-13 16:28:04 +01:00
|
|
|
|
|
|
|
#endif
|