root / Whitix / branches / network / kernel / sys.c

Revision 192, 2.2 kB (checked in by mwhitworth, 9 months ago)

Add new system calls.

Line 
1/*  This file is part of Whitix.
2 *
3 *  Whitix is free software; you can redistribute it and/or modify
4 *  it under the terms of the GNU General Public License as published by
5 *  the Free Software Foundation; either version 2 of the License, or
6 *  (at your option) any later version.
7 *
8 *  Whitix is distributed in the hope that it will be useful,
9 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 *  GNU General Public License for more details.
12 *
13 *  You should have received a copy of the GNU General Public License
14 *  along with Whitix; if not, write to the Free Software
15 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
16 *
17 */
18
19#include <sys.h>
20#include <console.h>
21#include <i386/virtual.h>
22
23DWORD sysCallTable[]={
24        /* Filesystem syscalls */
25        (DWORD)&SysOpen,
26        (DWORD)&SysCreateDir,
27        (DWORD)&SysClose,
28        (DWORD)&SysRemove,
29        (DWORD)&SysRemoveDir,
30        (DWORD)&SysFileAccess,
31        (DWORD)&SysFileDup,
32        (DWORD)&SysFileSync,
33        (DWORD)&SysFileSystemSync,
34        (DWORD)&SysTruncate,
35        (DWORD)&SysMove,
36        (DWORD)&SysWrite,
37        (DWORD)&SysRead,
38        (DWORD)&SysSeek,
39        (DWORD)&SysChangeDir,
40        (DWORD)&SysChangeRoot,
41        (DWORD)&SysMount,
42        (DWORD)&SysUnmount,
43        (DWORD)&SysGetDirEntries,
44        (DWORD)&SysGetCurrDir,
45        (DWORD)&SysStat,
46        (DWORD)&SysStatFd,
47        (DWORD)&SysIoCtl,
48        (DWORD)&SysPoll,
49        (DWORD)&SysPipe,
50
51        /* Memory syscalls */
52        (DWORD)&SysMoreCore,
53        (DWORD)&SysMemoryMap,
54        (DWORD)&SysMemoryProtect,
55        (DWORD)&SysMemoryUnmap,
56        (DWORD)&SysSharedMemoryGet,
57        (DWORD)&SysSharedMemoryAttach,
58        (DWORD)&SysSharedMemoryControl,
59        (DWORD)&SysSharedMemoryDetach,
60
61        /* Process syscalls */
62        (DWORD)&SysCreateProcess,
63        (DWORD)&SysCreateThread,
64        (DWORD)&SysGetCurrentThreadId,
65        (DWORD)&SysGetCurrentProcessId,
66        (DWORD)&SysExitThread,
67        (DWORD)&SysExit,
68        (DWORD)&SysWaitForProcessFinish,
69        (DWORD)&SysYield,
70
71        /* Time syscalls */
72        (DWORD)&SysGetTime,
73
74        /* Network syscalls */
75        (DWORD)&SysSocketCreate,
76        (DWORD)&SysSocketBind,
77        (DWORD)&SysSocketConnect,
78        (DWORD)&SysSocketListen,
79        (DWORD)&SysSocketAccept,
80        (DWORD)&SysSocketSend,
81        (DWORD)&SysSocketReceive,
82        (DWORD)&SysSocketIoCtl,
83        (DWORD)&SysSocketClose,
84
85        /* Other syscalls */
86        (DWORD)&SysShutdown,
87        (DWORD)&SysIoAccess,
88};
89
90DWORD numSysCalls=(sizeof(sysCallTable)/sizeof(DWORD));
Note: See TracBrowser for help on using the browser.