-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpdx.h
38 lines (29 loc) · 790 Bytes
/
pdx.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* This file contains types and definitions for Portland State University.
* The contents are intended to be visible in both user and kernel space.
*/
#ifndef PDX_INCLUDE
#define PDX_INCLUDE
#define TRUE 1
#define FALSE 0
#define RETURN_SUCCESS 0
#define RETURN_FAILURE -1
#define NUL 0
#ifndef NULL
#define NULL NUL
#endif // NULL
#define TPS 1000 // ticks-per-second
#define SCHED_INTERVAL (TPS/100) // see trap.c
#ifdef CS333_P2
#define DEFAULT_UID 0
#define DEFAULT_GID 0
#endif // CS333_P2
#define NPROC 64 // maximum number of processes -- normally in param.h
#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))
#ifdef CS333_P4
#define MAXPRIO 2
#define TICKS_TO_PROMOTE 200
#define DEFAULT_BUDGET 500
#endif
#endif // PDX_INCLUDE