Project

General

Profile

Statistics
| Revision:

root / lab4 / .minix-src / include / minix / callnr.h @ 13

History | View | Annotate | Download (4.8 KB)

1 13 up20180614
/* This header file defines the calls to PM and VFS. */
2
#ifndef _MINIX_CALLNR_H
3
#define _MINIX_CALLNR_H
4
5
/*===========================================================================*
6
 *                                Calls to PM                                     *
7
 *===========================================================================*/
8
9
#define PM_BASE                        0x000
10
11
#define IS_PM_CALL(type)        (((type) & ~0xff) == PM_BASE)
12
13
/* Message type 0 is traditionally reserved. */
14
#define PM_EXIT                        (PM_BASE + 1)
15
#define PM_FORK                        (PM_BASE + 2)
16
#define PM_WAIT4                (PM_BASE + 3)
17
#define PM_GETPID                (PM_BASE + 4)
18
#define PM_SETUID                (PM_BASE + 5)
19
#define PM_GETUID                (PM_BASE + 6)
20
#define PM_STIME                (PM_BASE + 7)
21
#define PM_PTRACE                (PM_BASE + 8)
22
#define PM_SETGROUPS                (PM_BASE + 9)
23
#define PM_GETGROUPS                (PM_BASE + 10)
24
#define PM_KILL                        (PM_BASE + 11)
25
#define PM_SETGID                (PM_BASE + 12)
26
#define PM_GETGID                (PM_BASE + 13)
27
#define PM_EXEC                        (PM_BASE + 14)
28
#define PM_SETSID                (PM_BASE + 15)
29
#define PM_GETPGRP                (PM_BASE + 16)
30
#define PM_ITIMER                (PM_BASE + 17)
31
#define PM_GETMCONTEXT                (PM_BASE + 18)
32
#define PM_SETMCONTEXT                (PM_BASE + 19)
33
#define PM_SIGACTION                (PM_BASE + 20)
34
#define PM_SIGSUSPEND                (PM_BASE + 21)
35
#define PM_SIGPENDING                (PM_BASE + 22)
36
#define PM_SIGPROCMASK                (PM_BASE + 23)
37
#define PM_SIGRETURN                (PM_BASE + 24)
38
#define PM_SYSUNAME                (PM_BASE + 25)                /* obsolete */
39
#define PM_GETPRIORITY                (PM_BASE + 26)
40
#define PM_SETPRIORITY                (PM_BASE + 27)
41
#define PM_GETTIMEOFDAY                (PM_BASE + 28)
42
#define PM_SETEUID                (PM_BASE + 29)
43
#define PM_SETEGID                (PM_BASE + 30)
44
#define PM_ISSETUGID                (PM_BASE + 31)
45
#define PM_GETSID                (PM_BASE + 32)
46
#define PM_CLOCK_GETRES                (PM_BASE + 33)
47
#define PM_CLOCK_GETTIME        (PM_BASE + 34)
48
#define PM_CLOCK_SETTIME        (PM_BASE + 35)
49
#define PM_GETRUSAGE                (PM_BASE + 36)
50
#define PM_REBOOT                (PM_BASE + 37)
51
#define PM_SVRCTL                (PM_BASE + 38)
52
#define PM_SPROF                (PM_BASE + 39)
53
#define PM_PROCEVENTMASK        (PM_BASE + 40)
54
#define PM_SRV_FORK                (PM_BASE + 41)
55
#define PM_SRV_KILL                (PM_BASE + 42)
56
#define PM_EXEC_NEW                (PM_BASE + 43)
57
#define PM_EXEC_RESTART                (PM_BASE + 44)
58
#define PM_GETEPINFO                (PM_BASE + 45)
59
#define PM_GETPROCNR                (PM_BASE + 46)
60
#define PM_GETSYSINFO                (PM_BASE + 47)
61
62
#define NR_PM_CALLS                48        /* highest number from base plus one */
63
64
/*===========================================================================*
65
 *                                Calls to VFS                                     *
66
 *===========================================================================*/
67
68
#define VFS_BASE                0x100
69
70
#define IS_VFS_CALL(type)        (((type) & ~0xff) == VFS_BASE)
71
72
#define VFS_READ                (VFS_BASE + 0)
73
#define VFS_WRITE                (VFS_BASE + 1)
74
#define VFS_LSEEK                (VFS_BASE + 2)
75
#define VFS_OPEN                (VFS_BASE + 3)
76
#define VFS_CREAT                (VFS_BASE + 4)
77
#define VFS_CLOSE                (VFS_BASE + 5)
78
#define VFS_LINK                (VFS_BASE + 6)
79
#define VFS_UNLINK                (VFS_BASE + 7)
80
#define VFS_CHDIR                (VFS_BASE + 8)
81
#define VFS_MKDIR                (VFS_BASE + 9)
82
#define VFS_MKNOD                (VFS_BASE + 10)
83
#define VFS_CHMOD                (VFS_BASE + 11)
84
#define VFS_CHOWN                (VFS_BASE + 12)
85
#define VFS_MOUNT                (VFS_BASE + 13)
86
#define VFS_UMOUNT                (VFS_BASE + 14)
87
#define VFS_ACCESS                (VFS_BASE + 15)
88
#define VFS_SYNC                (VFS_BASE + 16)
89
#define VFS_RENAME                (VFS_BASE + 17)
90
#define VFS_RMDIR                (VFS_BASE + 18)
91
#define VFS_SYMLINK                (VFS_BASE + 19)
92
#define VFS_READLINK                (VFS_BASE + 20)
93
#define VFS_STAT                (VFS_BASE + 21)
94
#define VFS_FSTAT                (VFS_BASE + 22)
95
#define VFS_LSTAT                (VFS_BASE + 23)
96
#define VFS_IOCTL                (VFS_BASE + 24)
97
#define VFS_FCNTL                (VFS_BASE + 25)
98
#define VFS_PIPE2                (VFS_BASE + 26)
99
#define VFS_UMASK                (VFS_BASE + 27)
100
#define VFS_CHROOT                (VFS_BASE + 28)
101
#define VFS_GETDENTS                (VFS_BASE + 29)
102
#define VFS_SELECT                (VFS_BASE + 30)
103
#define VFS_FCHDIR                (VFS_BASE + 31)
104
#define VFS_FSYNC                (VFS_BASE + 32)
105
#define VFS_TRUNCATE                (VFS_BASE + 33)
106
#define VFS_FTRUNCATE                (VFS_BASE + 34)
107
#define VFS_FCHMOD                (VFS_BASE + 35)
108
#define VFS_FCHOWN                (VFS_BASE + 36)
109
#define VFS_UTIMENS                (VFS_BASE + 37)
110
#define VFS_VMCALL                (VFS_BASE + 38)
111
#define VFS_GETVFSSTAT                (VFS_BASE + 39)
112
#define VFS_STATVFS1                  (VFS_BASE + 40)
113
#define VFS_FSTATVFS1                (VFS_BASE + 41)
114
#define VFS_GETRUSAGE                (VFS_BASE + 42)                /* obsolete */
115
#define VFS_SVRCTL                (VFS_BASE + 43)
116
#define VFS_GCOV_FLUSH                (VFS_BASE + 44)
117
#define VFS_MAPDRIVER                (VFS_BASE + 45)
118
#define VFS_COPYFD                (VFS_BASE + 46)
119
#define VFS_SOCKETPATH                (VFS_BASE + 47)
120
#define VFS_GETSYSINFO                (VFS_BASE + 48)
121
#define VFS_SOCKET                (VFS_BASE + 49)
122
#define VFS_SOCKETPAIR                (VFS_BASE + 50)
123
#define VFS_BIND                (VFS_BASE + 51)
124
#define VFS_CONNECT                (VFS_BASE + 52)
125
#define VFS_LISTEN                (VFS_BASE + 53)
126
#define VFS_ACCEPT                (VFS_BASE + 54)
127
#define VFS_SENDTO                (VFS_BASE + 55)
128
#define VFS_SENDMSG                (VFS_BASE + 56)
129
#define VFS_RECVFROM                (VFS_BASE + 57)
130
#define VFS_RECVMSG                (VFS_BASE + 58)
131
#define VFS_SETSOCKOPT                (VFS_BASE + 59)
132
#define VFS_GETSOCKOPT                (VFS_BASE + 60)
133
#define VFS_GETSOCKNAME                (VFS_BASE + 61)
134
#define VFS_GETPEERNAME                (VFS_BASE + 62)
135
#define VFS_SHUTDOWN                (VFS_BASE + 63)
136
137
#define NR_VFS_CALLS                64        /* highest number from base plus one */
138
139
#endif /* !_MINIX_CALLNR_H */