From: Tomas Hruby Date: Tue, 10 Nov 2009 09:14:50 +0000 (+0000) Subject: kernel/proc.h can be included in kernel assembky files X-Git-Tag: v3.1.6~210 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/Bv9ARM.html?a=commitdiff_plain;h=9ba3b53de82837d9eadf6da691704c9667845cf0;p=minix.git kernel/proc.h can be included in kernel assembky files - the gnu .S are compiled with __ASSEMBLY__ macro set which allows us to conditionaly remove C stuff from the proc.h file when included in assembly files --- diff --git a/kernel/proc.h b/kernel/proc.h index a3ba52b15..6cb26900a 100644 --- a/kernel/proc.h +++ b/kernel/proc.h @@ -1,6 +1,8 @@ #ifndef PROC_H #define PROC_H +#ifndef __ASSEMBLY__ + /* Here is the declaration of the process table. It contains all process * data, including registers, flags, scheduling priority, memory map, * accounting, message passing (IPC) information, and so on. @@ -104,6 +106,8 @@ struct proc { #endif }; +#endif /* __ASSEMBLY__ */ + /* Bits for the runtime flags. A process is runnable iff p_rts_flags == 0. */ #define RTS_SLOT_FREE 0x01 /* process slot is free */ #define RTS_PROC_STOP 0x02 /* process has been stopped */ @@ -242,6 +246,8 @@ struct proc { #define isuserp(p) isusern((p) >= BEG_USER_ADDR) #define isusern(n) ((n) >= 0) +#ifndef __ASSEMBLY__ + /* The process table and pointers to process table slots. The pointers allow * faster access because now a process entry can be found by indexing the * pproc_addr array, while accessing an element i requires a multiplication @@ -251,4 +257,6 @@ EXTERN struct proc proc[NR_TASKS + NR_PROCS]; /* process table */ EXTERN struct proc *rdy_head[NR_SCHED_QUEUES]; /* ptrs to ready list headers */ EXTERN struct proc *rdy_tail[NR_SCHED_QUEUES]; /* ptrs to ready list tails */ +#endif /* __ASSEMBLY__ */ + #endif /* PROC_H */