152a38012Sejakowatz /* 252a38012Sejakowatz ** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved. 352a38012Sejakowatz ** Distributed under the terms of the NewOS License. 452a38012Sejakowatz */ 552a38012Sejakowatz #ifndef _KERNEL_SYSCALLS_H 652a38012Sejakowatz #define _KERNEL_SYSCALLS_H 752a38012Sejakowatz 8*b67f1117SAxel Dörfler #include <sys/types.h> 9*b67f1117SAxel Dörfler 10*b67f1117SAxel Dörfler 1152a38012Sejakowatz enum { 1252a38012Sejakowatz SYSCALL_NULL = 0, 1352a38012Sejakowatz SYSCALL_MOUNT, 1452a38012Sejakowatz SYSCALL_UNMOUNT, 1552a38012Sejakowatz SYSCALL_SYNC, 1652a38012Sejakowatz SYSCALL_OPEN, 1752a38012Sejakowatz SYSCALL_CLOSE, 1852a38012Sejakowatz SYSCALL_FSYNC, 1952a38012Sejakowatz SYSCALL_READ, 2052a38012Sejakowatz SYSCALL_WRITE, 2152a38012Sejakowatz SYSCALL_SEEK, 2252a38012Sejakowatz SYSCALL_IOCTL, /* 10 */ 2352a38012Sejakowatz SYSCALL_CREATE, 2452a38012Sejakowatz SYSCALL_UNLINK, 2552a38012Sejakowatz SYSCALL_RENAME, 26ae372703SAxel Dörfler SYSCALL_READ_STAT, 27ae372703SAxel Dörfler SYSCALL_WRITE_STAT, 2852a38012Sejakowatz SYSCALL_SYSTEM_TIME, 2952a38012Sejakowatz SYSCALL_SNOOZE, 3052a38012Sejakowatz SYSCALL_SEM_CREATE, 3152a38012Sejakowatz SYSCALL_SEM_DELETE, 3252a38012Sejakowatz SYSCALL_SEM_ACQUIRE, /* 20 */ 3352a38012Sejakowatz SYSCALL_SEM_ACQUIRE_ETC, 3452a38012Sejakowatz SYSCALL_SEM_RELEASE, 3552a38012Sejakowatz SYSCALL_SEM_RELEASE_ETC, 3652a38012Sejakowatz SYSCALL_GET_CURRENT_THREAD_ID, 3752a38012Sejakowatz SYSCALL_EXIT_THREAD, 383cfbecf1Slillo SYSCALL_CREATE_TEAM, 393cfbecf1Slillo SYSCALL_WAIT_ON_THREAD, 403cfbecf1Slillo SYSCALL_WAIT_ON_TEAM, 4152a38012Sejakowatz SYSCALL_VM_CREATE_ANONYMOUS_REGION, 4252a38012Sejakowatz SYSCALL_VM_CLONE_REGION, /* 30 */ 4352a38012Sejakowatz SYSCALL_VM_MAP_FILE, 4452a38012Sejakowatz SYSCALL_VM_DELETE_REGION, 4552a38012Sejakowatz SYSCALL_VM_GET_REGION_INFO, 4652a38012Sejakowatz SYSCALL_VM_FIND_REGION_BY_NAME, 4752a38012Sejakowatz SYSCALL_SPAWN_THREAD, 4852a38012Sejakowatz SYSCALL_KILL_THREAD, 4952a38012Sejakowatz SYSCALL_SUSPEND_THREAD, 5052a38012Sejakowatz SYSCALL_RESUME_THREAD, 513cfbecf1Slillo SYSCALL_KILL_TEAM, 523cfbecf1Slillo SYSCALL_GET_CURRENT_TEAM_ID, 5352a38012Sejakowatz SYSCALL_GETCWD, /* 40 */ 5452a38012Sejakowatz SYSCALL_SETCWD, 5552a38012Sejakowatz SYSCALL_PORT_CREATE, 5652a38012Sejakowatz SYSCALL_PORT_CLOSE, 5752a38012Sejakowatz SYSCALL_PORT_DELETE, 5852a38012Sejakowatz SYSCALL_PORT_FIND, 5952a38012Sejakowatz SYSCALL_PORT_GET_INFO, 6052a38012Sejakowatz SYSCALL_PORT_GET_NEXT_PORT_INFO, 6152a38012Sejakowatz SYSCALL_PORT_BUFFER_SIZE, 6252a38012Sejakowatz SYSCALL_PORT_BUFFER_SIZE_ETC, 6352a38012Sejakowatz SYSCALL_PORT_COUNT, /* 50 */ 6452a38012Sejakowatz SYSCALL_PORT_READ, 6552a38012Sejakowatz SYSCALL_PORT_READ_ETC, 6652a38012Sejakowatz SYSCALL_PORT_SET_OWNER, 6752a38012Sejakowatz SYSCALL_PORT_WRITE, 6852a38012Sejakowatz SYSCALL_PORT_WRITE_ETC, 6952a38012Sejakowatz SYSCALL_SEM_GET_COUNT, 7052a38012Sejakowatz SYSCALL_SEM_GET_SEM_INFO, 7152a38012Sejakowatz SYSCALL_SEM_GET_NEXT_SEM_INFO, 7252a38012Sejakowatz SYSCALL_SEM_SET_SEM_OWNER, 7352a38012Sejakowatz SYSCALL_FDDUP, /* 60 */ 7452a38012Sejakowatz SYSCALL_FDDUP2, 7552a38012Sejakowatz SYSCALL_GET_PROC_TABLE, 7652a38012Sejakowatz SYSCALL_GETRLIMIT, 7752a38012Sejakowatz SYSCALL_SETRLIMIT, 7852a38012Sejakowatz SYSCALL_ATOMIC_ADD, 7952a38012Sejakowatz SYSCALL_ATOMIC_AND, 8052a38012Sejakowatz SYSCALL_ATOMIC_OR, 8152a38012Sejakowatz SYSCALL_ATOMIC_SET, 8252a38012Sejakowatz SYSCALL_TEST_AND_SET, /* 70 */ 8352a38012Sejakowatz SYSCALL_SYSCTL, 8452a38012Sejakowatz SYSCALL_SOCKET, 85854fc92aSAxel Dörfler SYSCALL_ACCESS, 86854fc92aSAxel Dörfler SYSCALL_READ_STAT_FD, 87f8d76107SAxel Dörfler SYSCALL_READ_DIR, 88f8d76107SAxel Dörfler SYSCALL_REWIND_DIR, 89eba8b6cfSAxel Dörfler SYSCALL_OPEN_DIR, 900ba337c0Slillo SYSCALL_CREATE_DIR, 910ba337c0Slillo SYSCALL_SETENV, 92973b9ee6SAxel Dörfler SYSCALL_GETENV, /* 80 */ 93973b9ee6SAxel Dörfler SYSCALL_OPEN_ENTRY_REF, 94973b9ee6SAxel Dörfler SYSCALL_OPEN_DIR_ENTRY_REF, 95973b9ee6SAxel Dörfler SYSCALL_OPEN_DIR_NODE_REF, 96973b9ee6SAxel Dörfler SYSCALL_CREATE_ENTRY_REF, 97*b67f1117SAxel Dörfler SYSCALL_CREATE_DIR_ENTRY_REF, /* 85 */ 98ae372703SAxel Dörfler SYSCALL_CREATE_SYMLINK, 99ae372703SAxel Dörfler SYSCALL_READ_LINK, 100854c31f8Slillo SYSCALL_GET_THREAD_INFO, 101854c31f8Slillo SYSCALL_GET_NEXT_THREAD_INFO, 102854c31f8Slillo SYSCALL_GET_TEAM_INFO, /* 90 */ 103854c31f8Slillo SYSCALL_GET_NEXT_TEAM_INFO, 1044c405cbdSAxel Dörfler SYSCALL_CREATE_LINK, 1054c405cbdSAxel Dörfler SYSCALL_REMOVE_DIR, 106615a79ccSlillo SYSCALL_SEND_DATA, 107*b67f1117SAxel Dörfler SYSCALL_RECEIVE_DATA, /* 95 */ 108615a79ccSlillo SYSCALL_HAS_DATA, 109*b67f1117SAxel Dörfler SYSCALL_OPEN_ATTR_DIR, 110*b67f1117SAxel Dörfler SYSCALL_CREATE_ATTR, 111*b67f1117SAxel Dörfler SYSCALL_OPEN_ATTR, 112*b67f1117SAxel Dörfler SYSCALL_WRITE_ATTR_STAT, /* 100 */ 113*b67f1117SAxel Dörfler SYSCALL_REMOVE_ATTR, 114*b67f1117SAxel Dörfler SYSCALL_RENAME_ATTR, 11552a38012Sejakowatz }; 11652a38012Sejakowatz 11752a38012Sejakowatz int syscall_dispatcher(unsigned long call_num, void *arg_buffer, uint64 *call_ret); 11852a38012Sejakowatz 119*b67f1117SAxel Dörfler #endif /* _KERNEL_SYSCALLS_H */ 120