diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2021-02-19 12:14:36 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gustav@sornas.net> | 2021-02-19 12:15:29 +0100 |
| commit | 495d3cf2bdf5e1ce0654f37a3d983d55e098964d (patch) | |
| tree | d150e97c258e079eccd3fef4b5a92f622974550d /src/lib/pid_t.h | |
| parent | 3ed3ba31adb9c84bcca000a5f31c5278211bd3ae (diff) | |
| download | pintos-495d3cf2bdf5e1ce0654f37a3d983d55e098964d.tar.gz | |
prepare for lab 3
Diffstat (limited to 'src/lib/pid_t.h')
| -rw-r--r-- | src/lib/pid_t.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/lib/pid_t.h b/src/lib/pid_t.h new file mode 100644 index 0000000..c6d8e31 --- /dev/null +++ b/src/lib/pid_t.h @@ -0,0 +1,15 @@ +#ifndef LIB_PID_T_H +#define LIB_PID_T_H + +/* Process identifier. + Moved from lib/user/syscall.h since both kernel- + and user-space want the same definition. */ +typedef int pid_t; + +#define PID_ERROR ((pid_t) -1) + +/* Format specifier for printf(), e.g.: + printf ("pid=%"PRPTd"\n", pid); */ +#define PRPTd d + +#endif /* lib/pid_t.h */ |
