2002-07-09 16:24:59 +04:00
|
|
|
/*
|
|
|
|
** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
|
|
|
** Distributed under the terms of the NewOS License.
|
|
|
|
*/
|
|
|
|
#ifndef _KERNEL_SYSCALLS_H
|
|
|
|
#define _KERNEL_SYSCALLS_H
|
|
|
|
|
2002-10-16 20:17:28 +04:00
|
|
|
#include <sys/types.h>
|
|
|
|
|
|
|
|
|
2002-07-09 16:24:59 +04:00
|
|
|
enum {
|
|
|
|
SYSCALL_NULL = 0,
|
|
|
|
SYSCALL_MOUNT,
|
|
|
|
SYSCALL_UNMOUNT,
|
|
|
|
SYSCALL_SYNC,
|
|
|
|
SYSCALL_OPEN,
|
|
|
|
SYSCALL_CLOSE,
|
|
|
|
SYSCALL_FSYNC,
|
|
|
|
SYSCALL_READ,
|
|
|
|
SYSCALL_WRITE,
|
|
|
|
SYSCALL_SEEK,
|
|
|
|
SYSCALL_IOCTL, /* 10 */
|
|
|
|
SYSCALL_CREATE,
|
|
|
|
SYSCALL_UNLINK,
|
|
|
|
SYSCALL_RENAME,
|
2002-10-17 07:04:19 +04:00
|
|
|
SYSCALL_READ_PATH_STAT,
|
|
|
|
SYSCALL_WRITE_PATH_STAT,
|
2002-07-09 16:24:59 +04:00
|
|
|
SYSCALL_SYSTEM_TIME,
|
2003-01-27 05:54:21 +03:00
|
|
|
SYSCALL_SNOOZE_ETC,
|
2002-07-09 16:24:59 +04:00
|
|
|
SYSCALL_SEM_CREATE,
|
|
|
|
SYSCALL_SEM_DELETE,
|
|
|
|
SYSCALL_SEM_ACQUIRE, /* 20 */
|
|
|
|
SYSCALL_SEM_ACQUIRE_ETC,
|
|
|
|
SYSCALL_SEM_RELEASE,
|
|
|
|
SYSCALL_SEM_RELEASE_ETC,
|
|
|
|
SYSCALL_GET_CURRENT_THREAD_ID,
|
|
|
|
SYSCALL_EXIT_THREAD,
|
2002-08-03 04:41:27 +04:00
|
|
|
SYSCALL_CREATE_TEAM,
|
|
|
|
SYSCALL_WAIT_ON_THREAD,
|
|
|
|
SYSCALL_WAIT_ON_TEAM,
|
2003-08-19 18:07:40 +04:00
|
|
|
SYSCALL_CREATE_AREA,
|
2003-08-20 19:47:52 +04:00
|
|
|
SYSCALL_CLONE_AREA, /* 30 */
|
2002-07-09 16:24:59 +04:00
|
|
|
SYSCALL_VM_MAP_FILE,
|
2003-08-19 18:07:40 +04:00
|
|
|
SYSCALL_DELETE_AREA,
|
2003-08-20 19:47:52 +04:00
|
|
|
SYSCALL_GET_AREA_INFO,
|
|
|
|
SYSCALL_FIND_AREA,
|
2002-07-09 16:24:59 +04:00
|
|
|
SYSCALL_SPAWN_THREAD,
|
|
|
|
SYSCALL_KILL_THREAD,
|
|
|
|
SYSCALL_SUSPEND_THREAD,
|
|
|
|
SYSCALL_RESUME_THREAD,
|
2002-08-03 04:41:27 +04:00
|
|
|
SYSCALL_KILL_TEAM,
|
|
|
|
SYSCALL_GET_CURRENT_TEAM_ID,
|
2002-07-09 16:24:59 +04:00
|
|
|
SYSCALL_GETCWD, /* 40 */
|
|
|
|
SYSCALL_SETCWD,
|
|
|
|
SYSCALL_PORT_CREATE,
|
|
|
|
SYSCALL_PORT_CLOSE,
|
|
|
|
SYSCALL_PORT_DELETE,
|
|
|
|
SYSCALL_PORT_FIND,
|
|
|
|
SYSCALL_PORT_GET_INFO,
|
|
|
|
SYSCALL_PORT_GET_NEXT_PORT_INFO,
|
|
|
|
SYSCALL_PORT_BUFFER_SIZE,
|
|
|
|
SYSCALL_PORT_BUFFER_SIZE_ETC,
|
|
|
|
SYSCALL_PORT_COUNT, /* 50 */
|
|
|
|
SYSCALL_PORT_READ,
|
|
|
|
SYSCALL_PORT_READ_ETC,
|
|
|
|
SYSCALL_PORT_SET_OWNER,
|
|
|
|
SYSCALL_PORT_WRITE,
|
|
|
|
SYSCALL_PORT_WRITE_ETC,
|
|
|
|
SYSCALL_SEM_GET_COUNT,
|
|
|
|
SYSCALL_SEM_GET_SEM_INFO,
|
|
|
|
SYSCALL_SEM_GET_NEXT_SEM_INFO,
|
|
|
|
SYSCALL_SEM_SET_SEM_OWNER,
|
2002-10-16 20:17:28 +04:00
|
|
|
SYSCALL_FDDUP, /* 60 */
|
2002-07-09 16:24:59 +04:00
|
|
|
SYSCALL_FDDUP2,
|
|
|
|
SYSCALL_GET_PROC_TABLE,
|
|
|
|
SYSCALL_GETRLIMIT,
|
|
|
|
SYSCALL_SETRLIMIT,
|
2003-08-22 03:02:00 +04:00
|
|
|
SYSCALL_unused_66,
|
|
|
|
SYSCALL_unused_67,
|
|
|
|
SYSCALL_unused_68,
|
|
|
|
SYSCALL_unused_69,
|
|
|
|
SYSCALL_unused_70, /* 70 */
|
2002-07-09 16:24:59 +04:00
|
|
|
SYSCALL_SYSCTL,
|
|
|
|
SYSCALL_SOCKET,
|
2002-08-13 17:51:36 +04:00
|
|
|
SYSCALL_ACCESS,
|
2002-10-17 07:04:19 +04:00
|
|
|
SYSCALL_READ_STAT,
|
2002-07-11 01:46:34 +04:00
|
|
|
SYSCALL_READ_DIR,
|
|
|
|
SYSCALL_REWIND_DIR,
|
2002-07-14 09:08:26 +04:00
|
|
|
SYSCALL_OPEN_DIR,
|
2002-07-18 17:59:03 +04:00
|
|
|
SYSCALL_CREATE_DIR,
|
|
|
|
SYSCALL_SETENV,
|
2002-10-16 20:17:28 +04:00
|
|
|
SYSCALL_GETENV, /* 80 */
|
2002-07-23 18:05:18 +04:00
|
|
|
SYSCALL_OPEN_ENTRY_REF,
|
|
|
|
SYSCALL_OPEN_DIR_ENTRY_REF,
|
|
|
|
SYSCALL_OPEN_DIR_NODE_REF,
|
|
|
|
SYSCALL_CREATE_ENTRY_REF,
|
2002-10-16 20:17:28 +04:00
|
|
|
SYSCALL_CREATE_DIR_ENTRY_REF, /* 85 */
|
2002-08-03 06:03:27 +04:00
|
|
|
SYSCALL_CREATE_SYMLINK,
|
|
|
|
SYSCALL_READ_LINK,
|
2002-08-04 06:04:37 +04:00
|
|
|
SYSCALL_GET_THREAD_INFO,
|
|
|
|
SYSCALL_GET_NEXT_THREAD_INFO,
|
2002-10-16 20:17:28 +04:00
|
|
|
SYSCALL_GET_TEAM_INFO, /* 90 */
|
2002-08-04 06:04:37 +04:00
|
|
|
SYSCALL_GET_NEXT_TEAM_INFO,
|
2002-08-14 00:39:25 +04:00
|
|
|
SYSCALL_CREATE_LINK,
|
|
|
|
SYSCALL_REMOVE_DIR,
|
2002-08-19 12:28:39 +04:00
|
|
|
SYSCALL_SEND_DATA,
|
2002-10-16 20:17:28 +04:00
|
|
|
SYSCALL_RECEIVE_DATA, /* 95 */
|
2002-08-19 12:28:39 +04:00
|
|
|
SYSCALL_HAS_DATA,
|
2002-10-16 20:17:28 +04:00
|
|
|
SYSCALL_OPEN_ATTR_DIR,
|
|
|
|
SYSCALL_CREATE_ATTR,
|
|
|
|
SYSCALL_OPEN_ATTR,
|
2002-10-17 07:04:19 +04:00
|
|
|
SYSCALL_WRITE_STAT, /* 100 */
|
2002-10-16 20:17:28 +04:00
|
|
|
SYSCALL_REMOVE_ATTR,
|
|
|
|
SYSCALL_RENAME_ATTR,
|
2002-10-17 22:52:04 +04:00
|
|
|
SYSCALL_RETURN_FROM_SIGNAL,
|
2003-08-22 03:02:00 +04:00
|
|
|
SYSCALL_unused_104,
|
2002-10-17 22:52:04 +04:00
|
|
|
SYSCALL_SIGACTION, /* 105 */
|
|
|
|
SYSCALL_OPEN_INDEX_DIR,
|
|
|
|
SYSCALL_CREATE_INDEX,
|
|
|
|
SYSCALL_READ_INDEX_STAT,
|
|
|
|
SYSCALL_REMOVE_INDEX,
|
2002-10-26 02:36:08 +04:00
|
|
|
SYSCALL_SEND_SIGNAL, /* 110 */
|
|
|
|
SYSCALL_SET_ALARM,
|
2002-10-30 05:29:05 +03:00
|
|
|
SYSCALL_SELECT,
|
|
|
|
SYSCALL_POLL,
|
2003-01-12 18:59:50 +03:00
|
|
|
SYSCALL_REGISTER_IMAGE,
|
|
|
|
SYSCALL_UNREGISTER_IMAGE, /* 115 */
|
|
|
|
SYSCALL_GET_IMAGE_INFO,
|
|
|
|
SYSCALL_GET_NEXT_IMAGE_INFO,
|
2003-01-18 17:04:22 +03:00
|
|
|
SYSCALL_START_WATCHING,
|
|
|
|
SYSCALL_STOP_WATCHING,
|
|
|
|
SYSCALL_STOP_NOTIFYING, /* 120 */
|
2003-01-27 05:54:21 +03:00
|
|
|
SYSCALL_SET_THREAD_PRIORITY,
|
2003-08-20 19:47:52 +04:00
|
|
|
SYSCALL_GET_NEXT_AREA_INFO,
|
|
|
|
SYSCALL_SET_AREA_PROTECTION,
|
|
|
|
SYSCALL_RESIZE_AREA,
|
|
|
|
SYSCALL_AREA_FOR, /* 125 */
|
2003-08-22 03:02:00 +04:00
|
|
|
SYSCALL_ATOMIC_SET,
|
|
|
|
SYSCALL_ATOMIC_TEST_AND_SET,
|
|
|
|
SYSCALL_ATOMIC_ADD,
|
|
|
|
SYSCALL_ATOMIC_AND,
|
|
|
|
SYSCALL_ATOMIC_OR, /* 130 */
|
2003-08-31 05:21:56 +04:00
|
|
|
SYSCALL_ATOMIC_GET,
|
2003-08-22 03:02:00 +04:00
|
|
|
SYSCALL_ATOMIC_SET64,
|
|
|
|
SYSCALL_ATOMIC_TEST_AND_SET64,
|
|
|
|
SYSCALL_ATOMIC_ADD64,
|
|
|
|
SYSCALL_ATOMIC_AND64, /* 135 */
|
|
|
|
SYSCALL_ATOMIC_OR64,
|
2003-08-31 05:21:56 +04:00
|
|
|
SYSCALL_ATOMIC_GET64,
|
2003-10-28 16:30:10 +03:00
|
|
|
SYSCALL_SET_REAL_TIME_CLOCK,
|
2003-11-14 01:07:36 +03:00
|
|
|
SYSCALL_DEBUG_OUTPUT,
|
2002-07-09 16:24:59 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
int syscall_dispatcher(unsigned long call_num, void *arg_buffer, uint64 *call_ret);
|
|
|
|
|
2002-10-16 20:17:28 +04:00
|
|
|
#endif /* _KERNEL_SYSCALLS_H */
|