minix/servers/sched/schedproc.h
Thomas Cort 9f23acf410 kernel: spelling fixes
Change-Id: I73c759bdef98be35be77130895ae0ec497e1b954
2013-10-09 20:24:17 -04:00

39 lines
1.1 KiB
C

/* This table has one slot per process. It contains scheduling information
* for each process.
*/
#include <limits.h>
#include <minix/bitmap.h>
/* EXTERN should be extern except in main.c, where we want to keep the struct */
#ifdef _MAIN
#undef EXTERN
#define EXTERN
#endif
#ifndef CONFIG_SMP
#define CONFIG_MAX_CPUS 1
#endif
/**
* We might later want to add more information to this table, such as the
* process owner, process group or cpumask.
*/
EXTERN struct schedproc {
endpoint_t endpoint; /* process endpoint id */
endpoint_t parent; /* parent endpoint id */
unsigned flags; /* flag bits */
/* User space scheduling */
unsigned max_priority; /* this process' highest allowed priority */
unsigned priority; /* the process' current priority */
unsigned time_slice; /* this process's time slice */
unsigned cpu; /* what CPU is the process running on */
bitchunk_t cpu_mask[BITMAP_CHUNKS(CONFIG_MAX_CPUS)]; /* what CPUs is the
process allowed
to run on */
} schedproc[NR_PROCS];
/* Flag values */
#define IN_USE 0x00001 /* set when 'schedproc' slot in use */