summaryrefslogtreecommitdiff
path: root/libc/i386sys
diff options
context:
space:
mode:
authorRobert de Bath <rdebath@poboxes.com>2005-01-23 15:31:04 +0100
committerLubomir Rintel <lkundrak@v3.sk>2013-10-23 23:48:50 +0200
commit62c27c1c5cb6257b13dfc9be0394e0d2e86f2735 (patch)
treef702b7e5f80293367e1b6f9812bd45e80378be26 /libc/i386sys
parent6cb598cc5f1c8ae6d14381c2776338584368257e (diff)
downloaddev86-62c27c1c5cb6257b13dfc9be0394e0d2e86f2735.tar.gz
Import Dev86src-0.16.17.tar.gzv0.16.17
Diffstat (limited to 'libc/i386sys')
-rw-r--r--libc/i386sys/Makefile2
-rw-r--r--libc/i386sys/setjmp3.c56
-rw-r--r--libc/i386sys/syscall.dat140
3 files changed, 192 insertions, 6 deletions
diff --git a/libc/i386sys/Makefile b/libc/i386sys/Makefile
index 756ce43..665f71a 100644
--- a/libc/i386sys/Makefile
+++ b/libc/i386sys/Makefile
@@ -12,7 +12,7 @@ DSRC=dirent.c
DOBJ=opendir.o closedir.o readdir.o
ifeq ($(LIB_CPU)-$(LIB_OS),i386-ELKS)
-OBJ=$(LOBJ3) $(LOBJ) $(EOBJ) $(DOBJ)
+OBJ=$(LOBJ3) $(LOBJ) $(EOBJ) $(DOBJ) setjmp3.o
SYSCALLS=syscalls
CFLAGS=$(ARCH) $(CCFLAGS) $(DEFS)
diff --git a/libc/i386sys/setjmp3.c b/libc/i386sys/setjmp3.c
new file mode 100644
index 0000000..160795d
--- /dev/null
+++ b/libc/i386sys/setjmp3.c
@@ -0,0 +1,56 @@
+
+#include <setjmp.h>
+
+#if __AS386_32__
+
+int
+setjmp(env)
+jmp_buf env;
+{
+#asm
+export __setjmp
+__setjmp:
+
+ pop ecx ! PC
+#if __FIRST_ARG_IN_AX__
+ mov ebx,eax
+#else
+ mov ebx,esp
+ mov ebx,[ebx] ! TOS is prt -> env
+#endif
+ mov [ebx+0],ecx ! PC
+ mov [ebx+4],esp ! This registers are all that may be constant.
+ mov [ebx+8],ebp
+ mov [ebx+12],esi ! Is saving these the "right thing" ?
+ mov [ebx+16],edi
+ xor eax,eax
+ jmp ecx
+#endasm
+}
+
+void
+longjmp(env, rv)
+jmp_buf env;
+int rv;
+{
+#asm
+export __longjmp
+__longjmp:
+
+ pop ecx ! pc
+#if __FIRST_ARG_IN_AX__
+ mov ebx,eax ! env->
+#else
+ pop ebx ! env->
+#endif
+ pop eax ! rv
+ mov ecx,[ebx+0] ! PC
+ mov esp,[ebx+4]
+ mov ebp,[ebx+8]
+ mov esi,[ebx+12]
+ mov edi,[ebx+16]
+ jmp ecx
+#endasm
+}
+
+#endif
diff --git a/libc/i386sys/syscall.dat b/libc/i386sys/syscall.dat
index da9ad6c..595e75a 100644
--- a/libc/i386sys/syscall.dat
+++ b/libc/i386sys/syscall.dat
@@ -1,4 +1,3 @@
-
#
# Name No Args Flag, comment
#
@@ -6,6 +5,8 @@
# * = Needs libc code (Prefix __)
# - = Obsolete/not required
#
+# Last updated 2005-01-01
+#
# Name N C
setup 0 X
exit 1 1 *
@@ -60,7 +61,7 @@ signal 48 2
geteuid 49 0
getegid 50 0
acct 51 1
-phys 52 X -
+umount2 52 X -
lock 53 X -
ioctl 54 3
fcntl 55 3
@@ -111,7 +112,7 @@ statfs 99 2
fstatfs 100 2
ioperm 101 3
socketcall 102 2 * This is a lib internal for socket stuff
-klog 103 X
+syslog 103 X
setitimer 104 3
getitimer 105 2
dv32_stat 106 2 * Has correct args for 32 bit dev_t
@@ -121,7 +122,7 @@ olduname 109 X -
iopl 110 1
vhangup 111 0
idle 112 0 - System internal
-vm86 113 1
+vm86 113 1 * WARNING now vm86old
wait4 114 4
swapoff 115 1
sysinfo 116 1
@@ -152,4 +153,133 @@ _llseek 140 X
getdents 141 3 * New style readdir ?
_newselect 142 X
flock 143 2
-syscall_flock 143 X
+msync 144 X
+readv 145 X
+writev 146 X
+getsid 147 X
+fdatasync 148 X
+_sysctl 149 X
+mlock 150 X
+munlock 151 X
+mlockall 152 X
+munlockall 153 X
+sched_setparam 154 X
+sched_getparam 155 X
+sched_setscheduler 156 X
+sched_getscheduler 157 X
+sched_yield 158 X
+sched_get_priority_max 159 X
+sched_get_priority_min 160 X
+sched_rr_get_interval 161 X
+nanosleep 162 2
+mremap 163 X
+setresuid 164 X
+getresuid 165 X
+vm86 166 X
+query_module 167 X
+poll 168 X
+nfsservctl 169 X
+setresgid 170 X
+getresgid 171 X
+prctl 172 X
+rt_sigreturn 173 X
+rt_sigaction 174 X
+rt_sigprocmask 175 X
+rt_sigpending 176 X
+rt_sigtimedwait 177 X
+rt_sigqueueinfo 178 X
+rt_sigsuspend 179 X
+pread64 180 X
+pwrite64 181 X
+chown 182 X
+getcwd 183 X
+capget 184 X
+capset 185 X
+sigaltstack 186 X
+sendfile 187 X
+getpmsg 188 X
+putpmsg 189 X
+vfork 190 X
+ugetrlimit 191 X
+mmap2 192 X
+truncate64 193 X
+ftruncate64 194 X
+stat64 195 X
+lstat64 196 X
+fstat64 197 X
+lchown32 198 X
+getuid32 199 X
+getgid32 200 X
+geteuid32 201 X
+getegid32 202 X
+setreuid32 203 X
+setregid32 204 X
+getgroups32 205 X
+setgroups32 206 X
+fchown32 207 X
+setresuid32 208 X
+getresuid32 209 X
+setresgid32 210 X
+getresgid32 211 X
+chown32 212 X
+setuid32 213 X
+setgid32 214 X
+setfsuid32 215 X
+setfsgid32 216 X
+pivot_root 217 X
+mincore 218 X
+madvise 219 X
+madvise1 219 X
+getdents64 220 X
+fcntl64 221 X
+Unused 223 X - /* is unused */
+gettid 224 X
+readahead 225 X
+setxattr 226 X
+lsetxattr 227 X
+fsetxattr 228 X
+getxattr 229 X
+lgetxattr 230 X
+fgetxattr 231 X
+listxattr 232 X
+llistxattr 233 X
+flistxattr 234 X
+removexattr 235 X
+lremovexattr 236 X
+fremovexattr 237 X
+tkill 238 X
+sendfile64 239 X
+futex 240 X
+sched_setaffinity 241 X
+sched_getaffinity 242 X
+set_thread_area 243 X
+get_thread_area 244 X
+io_setup 245 X
+io_destroy 246 X
+io_getevents 247 X
+io_submit 248 X
+io_cancel 249 X
+fadvise64 250 X
+Unused 251 X - /* is unused */
+exit_group 252 X
+lookup_dcookie 253 X
+epoll_create 254 X
+epoll_ctl 255 X
+epoll_wait 256 X
+remap_file_pages 257 X
+set_tid_address 258 X
+timer_create 259 X
+timer_settime (__NR_timer_create+1) X
+timer_gettime (__NR_timer_create+2) X
+timer_getoverrun (__NR_timer_create+3) X
+timer_delete (__NR_timer_create+4) X
+clock_settime (__NR_timer_create+5) X
+clock_gettime (__NR_timer_create+6) X
+clock_getres (__NR_timer_create+7) X
+clock_nanosleep (__NR_timer_create+8) X
+statfs64 268 X
+fstatfs64 269 X
+tgkill 270 X
+utimes 271 X
+fadvise64_64 272 X
+vserver 273 X