summaryrefslogtreecommitdiffstats
path: root/src/include/kernel/syscalls.H
blob: 26e2bdf75bc4a56a38d505d44e7a94a2903dae44 (plain)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/** @file syscalls.H
 *  @brief Defines all the system call IDs to be shared between the kernel and
 *         the system libc.
 */

#ifndef __KERNEL_SYSCALLS_H
#define __KERNEL_SYSCALLS_H

namespace Systemcalls
{
    /** @enum SysCalls
     *  @brief List of normal system calls and their IDs.
     *
     *  These are passed by userspace code via r3 when the sc instruction is
     *  executed.  The kernel performs a case statement to switch to the
     *  appropriate system call handler.
     */
    enum SysCalls
    {
            /** task_yield() */
	TASK_YIELD = 0,
            /** task_create() */
	TASK_START,
            /** task_end() */
	TASK_END,
            
            /** msgq_create() */
	MSGQ_CREATE,
            /** msgq_destroy() */
	MSGQ_DESTROY,
            /** VFS internal */
	MSGQ_REGISTER_ROOT,
            /** VFS internal */
	MSGQ_RESOLVE_ROOT,
            
            /** msg_send() */
	MSG_SEND,
            /** msg_sendrecv() */
	MSG_SENDRECV,
            /** msg_respond() */
	MSG_RESPOND,
            /** msg_wait() */
	MSG_WAIT,

            /** mmio_map() */
	MMIO_MAP,
            /** mmio_unmap() */
	MMIO_UNMAP,

            /** nanosleep() */
	TIME_NANOSLEEP,

            /** futex_wait() */
        FUTEX_WAIT,

            /** futex_wake() */
        FUTEX_WAKE,

	SYSCALL_MAX
    };

    /** @enum SysCalls_FastPath
     *  @brief List of fast-path system calls and their IDs.
     *
     *  @note If any of these change, their handling in start.S must also be
     *        updated.  The ASM code relies on these values.
     */
    enum SysCalls_FastPath
    {
            /** mmio_hmer_read() */
        MMIO_HMER_READ = 0x0800,
            /** mmio_hmer_write() */
        MMIO_HMER_WRITE = 0x0801,

        SYSCALL_FASTPATH_MAX
    };
};
#endif
OpenPOWER on IntegriCloud