Initial revision
This commit is contained in:
		
							parent
							
								
									1194f5f28c
								
							
						
					
					
						commit
						c32da75ccd
					
				
					 154 changed files with 1313 additions and 0 deletions
				
			
		
							
								
								
									
										150
									
								
								mach/sun2/libsys/LIST
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										150
									
								
								mach/sun2/libsys/LIST
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,150 @@ | |||
| libmon_s.a | ||||
| accept.s | ||||
| access.s | ||||
| acct.s | ||||
| adjtime.s | ||||
| alarm.c | ||||
| async_dem.s | ||||
| bind.s | ||||
| cerror.s | ||||
| chdir.s | ||||
| chmod.s | ||||
| chown.s | ||||
| chroot.s | ||||
| cleanup.c | ||||
| close.s | ||||
| connect.s | ||||
| creat.s | ||||
| dup.s | ||||
| dup2.s | ||||
| execl.c | ||||
| execle.c | ||||
| execv.c | ||||
| execve.s | ||||
| exit.c | ||||
| exportfs.s | ||||
| fchmod.s | ||||
| fchown.s | ||||
| fcntl.s | ||||
| flock.s | ||||
| fork.s | ||||
| fstat.s | ||||
| fstatfs.s | ||||
| fsync.s | ||||
| ftime.c | ||||
| ftruncate.s | ||||
| getdirent.s | ||||
| getdomnam.s | ||||
| getdopt.s | ||||
| getdtabsz.s | ||||
| getfh.s | ||||
| getgid.s | ||||
| getgroups.s | ||||
| gethostid.s | ||||
| gethostnam.s | ||||
| getitimer.s | ||||
| getpagesiz.s | ||||
| getpeernam.s | ||||
| getpgrp.s | ||||
| getpid.s | ||||
| getprio.s | ||||
| getrlimit.s | ||||
| getrusage.s | ||||
| getsocknam.s | ||||
| getsockopt.s | ||||
| gettimday.s | ||||
| getuid.s | ||||
| ioctl.s | ||||
| kill.s | ||||
| killpg.s | ||||
| link.s | ||||
| listen.s | ||||
| lseek.s | ||||
| lstat.s | ||||
| madvise.s | ||||
| mincore.s | ||||
| mkdir.s | ||||
| mknod.s | ||||
| mmap.s | ||||
| mount.s | ||||
| mprotect.s | ||||
| mremap.s | ||||
| munmap.s | ||||
| nfssvc.s | ||||
| nice.c | ||||
| open.s | ||||
| pause.c | ||||
| pipe.s | ||||
| profil.s | ||||
| ptrace.s | ||||
| quotactl.s | ||||
| read.s | ||||
| readlink.s | ||||
| readv.s | ||||
| reboot.s | ||||
| recv.s | ||||
| recvfrom.s | ||||
| recvmsg.s | ||||
| rename.s | ||||
| rmdir.s | ||||
| sbrk.s | ||||
| select.s | ||||
| send.s | ||||
| sendmsg.s | ||||
| sendto.s | ||||
| setdomnam.s | ||||
| setdopt.s | ||||
| setgroups.s | ||||
| sethostnam.s | ||||
| setitimer.s | ||||
| setpgrp.s | ||||
| setprio.s | ||||
| setregid.s | ||||
| setreuid.s | ||||
| setrlimit.s | ||||
| setsockopt.s | ||||
| settimday.s | ||||
| shutdown.s | ||||
| sigblock.s | ||||
| signal.c | ||||
| sigpause.s | ||||
| sigsetmask.s | ||||
| sigstack.s | ||||
| sigtramp.s | ||||
| sigvec.c | ||||
| socket.s | ||||
| socketpair.s | ||||
| sstk.s | ||||
| stat.s | ||||
| statfs.s | ||||
| swapon.s | ||||
| symlink.s | ||||
| sync.s | ||||
| syscall.s | ||||
| time.c | ||||
| times.c | ||||
| truncate.s | ||||
| umask.s | ||||
| unlink.s | ||||
| unmount.s | ||||
| utime.c | ||||
| utimes.s | ||||
| vhangup.s | ||||
| wait.s | ||||
| write.s | ||||
| writev.s | ||||
| _exit.s | ||||
| stty.c | ||||
| gtty.c | ||||
| getegid.s | ||||
| geteuid.s | ||||
| getppid.s | ||||
| lockf.c | ||||
| setgid.c | ||||
| setuid.c | ||||
| stime.c | ||||
| tell.c | ||||
| ulimit.c | ||||
| vadvise.s | ||||
| vfork.s | ||||
| wait3.s | ||||
							
								
								
									
										29
									
								
								mach/sun2/libsys/Makefile
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								mach/sun2/libsys/Makefile
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,29 @@ | |||
| # $Header$
 | ||||
| MACH=sun2 | ||||
| all:		libmon_o.a head_em.o | ||||
| 
 | ||||
| install: 	all | ||||
| 		../../install head_em.o head_em | ||||
| 		../../install libmon_o.a tail_mon | ||||
| 
 | ||||
| 
 | ||||
| cmp:		all | ||||
| 		-../../compare head_em.o head_em | ||||
| 		-../../compare libmon_o.a tail_mon | ||||
| 
 | ||||
| libmon_o.a:	libmon_s.a | ||||
| 		ASAR=aal ; export ASAR ;\
 | ||||
| 		march . libmon_o.a | ||||
| 
 | ||||
| head_em.o:	head_em.s | ||||
| 		$(MACH) -I../../../h -c head_em.s | ||||
| 
 | ||||
| clean: | ||||
| 		rm -f *.o libmon_o.a | ||||
| 
 | ||||
| opr : | ||||
| 		make pr | opr | ||||
| 
 | ||||
| pr: | ||||
| 		@pr `pwd`/head_em.s | ||||
| 		@arch pv libmon_s.a | pr -h `pwd`/libmon_s.a | ||||
							
								
								
									
										7
									
								
								mach/sun2/libsys/_exit.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								mach/sun2/libsys/_exit.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,7 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define __exit
 | ||||
| __exit: | ||||
| 	pea	SYS_exit | ||||
| 	trap	#0 | ||||
| 	jmp	cerror | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/accept.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/accept.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _accept
 | ||||
| _accept: SYSTEM(SYS_accept) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/access.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/access.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _access
 | ||||
| _access: SYSTEM(SYS_access) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/acct.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/acct.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _acct
 | ||||
| _acct: SYSTEM(SYS_acct) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/adjtime.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/adjtime.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _adjtime
 | ||||
| _adjtime: SYSTEM(SYS_adjtime) | ||||
							
								
								
									
										13
									
								
								mach/sun2/libsys/alarm.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								mach/sun2/libsys/alarm.c
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,13 @@ | |||
| unsigned | ||||
| alarm(n) | ||||
| 	unsigned n; | ||||
| { | ||||
| 	struct { long l1,l2,l3,l4; } t1,t2; | ||||
| 	t1.l1 = 0; | ||||
| 	t1.l2 = 0; | ||||
| 	t1.l4 = 0; | ||||
| 	t1.l3 = n; | ||||
| 	if (setitimer(0,&t1,&t2) < 0) return -1; | ||||
| 	if (t2.l4) t2.l3++; | ||||
| 	return t2.l3; | ||||
| } | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/async_dem.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/async_dem.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _async_daemon
 | ||||
| _async_daemon: SYSTEM(SYS_async_daemon) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/bind.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/bind.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _bind
 | ||||
| _bind: SYSTEM(SYS_bind) | ||||
							
								
								
									
										9
									
								
								mach/sun2/libsys/cerror.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								mach/sun2/libsys/cerror.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,9 @@ | |||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define cerror,_errno | ||||
| cerror: | ||||
| 	move.l	d0,_errno | ||||
| 	move.l	#-1,d0 | ||||
| 	rts | ||||
| 
 | ||||
| .sect .bss | ||||
| _errno:	.space 4 | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/chdir.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/chdir.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _chdir
 | ||||
| _chdir: SYSTEM(SYS_chdir) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/chmod.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/chmod.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _chmod
 | ||||
| _chmod: SYSTEM(SYS_chmod) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/chown.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/chown.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _chown
 | ||||
| _chown: SYSTEM(SYS_chown) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/chroot.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/chroot.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _chroot
 | ||||
| _chroot: SYSTEM(SYS_chroot) | ||||
							
								
								
									
										1
									
								
								mach/sun2/libsys/cleanup.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								mach/sun2/libsys/cleanup.c
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1 @@ | |||
| _cleanup() { } | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/close.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/close.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _close
 | ||||
| _close: SYSTEM(SYS_close) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/compmodule
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/compmodule
									
										
									
									
									
										Executable file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| if sun2 -c -L $1 1>&2 | ||||
| then echo `basename $1 $2`.o | ||||
| else exit 1 | ||||
| fi | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/connect.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/connect.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _connect
 | ||||
| _connect: SYSTEM(SYS_connect) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/creat.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/creat.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _creat
 | ||||
| _creat: SYSTEM(SYS_creat) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/dup.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/dup.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _dup
 | ||||
| _dup: SYSTEM(SYS_dup) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/dup2.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/dup2.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _dup2
 | ||||
| _dup2: SYSTEM(SYS_dup2) | ||||
							
								
								
									
										8
									
								
								mach/sun2/libsys/execl.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								mach/sun2/libsys/execl.c
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,8 @@ | |||
| execl(name,args) | ||||
| 	char *name; | ||||
| 	int args; | ||||
| { | ||||
| 	extern char **environ; | ||||
| 
 | ||||
| 	execve(name,&args,environ); | ||||
| } | ||||
							
								
								
									
										9
									
								
								mach/sun2/libsys/execle.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								mach/sun2/libsys/execle.c
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,9 @@ | |||
| execle(name,args) | ||||
| 	char *name; | ||||
| 	char *args; | ||||
| { | ||||
| 	char **p = &args; | ||||
| 	while (*p++) ; | ||||
| 
 | ||||
| 	execve(name,&args,*p); | ||||
| } | ||||
							
								
								
									
										7
									
								
								mach/sun2/libsys/execv.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								mach/sun2/libsys/execv.c
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,7 @@ | |||
| execv(name,args) | ||||
| 	char *name; | ||||
| 	char **args; | ||||
| { | ||||
| 	extern char **environ; | ||||
| 	execve(name,args,environ); | ||||
| } | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/execve.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/execve.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _execve
 | ||||
| _execve: SYSTEM(SYS_execve) | ||||
							
								
								
									
										5
									
								
								mach/sun2/libsys/exit.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								mach/sun2/libsys/exit.c
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,5 @@ | |||
| exit(n) | ||||
| { | ||||
| 	_cleanup(); | ||||
| 	_exit(n); | ||||
| } | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/exportfs.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/exportfs.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _exportfs
 | ||||
| _exportfs: SYSTEM(SYS_exportfs) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/fchmod.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/fchmod.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _fchmod
 | ||||
| _fchmod: SYSTEM(SYS_fchmod) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/fchown.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/fchown.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _fchown
 | ||||
| _fchown: SYSTEM(SYS_fchown) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/fcntl.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/fcntl.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _fcntl
 | ||||
| _fcntl: SYSTEM(SYS_fcntl) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/flock.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/flock.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _flock
 | ||||
| _flock: SYSTEM(SYS_flock) | ||||
							
								
								
									
										14
									
								
								mach/sun2/libsys/fork.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								mach/sun2/libsys/fork.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,14 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _fork
 | ||||
| _fork: | ||||
| 	pea	SYS_fork | ||||
| 	trap	#0 | ||||
| 	bcs	1f | ||||
| 	tst.l	d1 | ||||
| 	beq	2f | ||||
| 	clr.l	d0 | ||||
| 2: | ||||
| 	rts | ||||
| 1: | ||||
| 	jmp	cerror | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/fstat.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/fstat.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _fstat
 | ||||
| _fstat: SYSTEM(SYS_fstat) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/fstatfs.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/fstatfs.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _fstatfs
 | ||||
| _fstatfs: SYSTEM(SYS_fstatfs) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/fsync.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/fsync.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _fsync
 | ||||
| _fsync: SYSTEM(SYS_fsync) | ||||
							
								
								
									
										15
									
								
								mach/sun2/libsys/ftime.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								mach/sun2/libsys/ftime.c
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| #include <sys/types.h> | ||||
| 
 | ||||
| ftime(p) | ||||
| 	struct { time_t time; unsigned short millitm; | ||||
| 		 short timezone; short dstflag; } *p; | ||||
| { | ||||
| 	struct { long l1,l2; } t1,t2; | ||||
| 
 | ||||
| 	if (gettimeofday(&t1,&t2) < 0) return -1; | ||||
| 	p->time = t1.l1; | ||||
| 	p->millitm = t1.l2/1000; | ||||
| 	p->dstflag = t2.l2; | ||||
| 	p->timezone = t2.l1; | ||||
| 	return 0; | ||||
| } | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/ftruncate.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/ftruncate.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _ftruncate
 | ||||
| _ftruncate: SYSTEM(SYS_ftruncate) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/getdirent.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/getdirent.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _getdirentries
 | ||||
| _getdirentries: SYSTEM(SYS_getdirentries) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/getdomnam.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/getdomnam.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _getdomainname
 | ||||
| _getdomainname: SYSTEM(SYS_getdomainname) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/getdopt.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/getdopt.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _getdopt
 | ||||
| _getdopt: SYSTEM(SYS_getdopt) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/getdtabsz.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/getdtabsz.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _getdtablesize
 | ||||
| _getdtablesize: SYSTEM(SYS_getdtablesize) | ||||
							
								
								
									
										8
									
								
								mach/sun2/libsys/getegid.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								mach/sun2/libsys/getegid.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,8 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _getegid
 | ||||
| _getegid: | ||||
| 	pea	SYS_getgid | ||||
| 	trap	#0 | ||||
| 	move.l	d1,d0 | ||||
| 	rts | ||||
							
								
								
									
										8
									
								
								mach/sun2/libsys/geteuid.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								mach/sun2/libsys/geteuid.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,8 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _geteuid
 | ||||
| _geteuid: | ||||
| 	pea	SYS_getuid | ||||
| 	trap	#0 | ||||
| 	move.l	d1,d0 | ||||
| 	rts | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/getfh.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/getfh.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _getfh
 | ||||
| _getfh: SYSTEM(SYS_getfh) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/getgid.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/getgid.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _getgid
 | ||||
| _getgid: SYSTEM(SYS_getgid) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/getgroups.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/getgroups.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _getgroups
 | ||||
| _getgroups: SYSTEM(SYS_getgroups) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/gethostid.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/gethostid.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _gethostid
 | ||||
| _gethostid: SYSTEM(SYS_gethostid) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/gethostnam.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/gethostnam.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _gethostname
 | ||||
| _gethostname: SYSTEM(SYS_gethostname) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/getitimer.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/getitimer.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _getitimer
 | ||||
| _getitimer: SYSTEM(SYS_getitimer) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/getpagesiz.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/getpagesiz.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _getpagesize
 | ||||
| _getpagesize: SYSTEM(SYS_getpagesize) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/getpeernam.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/getpeernam.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _getpeername
 | ||||
| _getpeername: SYSTEM(SYS_getpeername) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/getpgrp.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/getpgrp.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _getpgrp
 | ||||
| _getpgrp: SYSTEM(SYS_getpgrp) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/getpid.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/getpid.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _getpid
 | ||||
| _getpid: SYSTEM(SYS_getpid) | ||||
							
								
								
									
										8
									
								
								mach/sun2/libsys/getppid.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								mach/sun2/libsys/getppid.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,8 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _getppid
 | ||||
| _getppid: | ||||
| 	pea	SYS_getpid | ||||
| 	trap	#0 | ||||
| 	move.l	d1,d0 | ||||
| 	rts | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/getprio.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/getprio.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _getpriority
 | ||||
| _getpriority: SYSTEM(SYS_getpriority) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/getrlimit.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/getrlimit.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _getrlimit
 | ||||
| _getrlimit: SYSTEM(SYS_getrlimit) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/getrusage.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/getrusage.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _getrusage
 | ||||
| _getrusage: SYSTEM(SYS_getrusage) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/getsocknam.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/getsocknam.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _getsockname
 | ||||
| _getsockname: SYSTEM(SYS_getsockname) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/getsockopt.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/getsockopt.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _getsockopt
 | ||||
| _getsockopt: SYSTEM(SYS_getsockopt) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/gettimday.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/gettimday.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _gettimeofday
 | ||||
| _gettimeofday: SYSTEM(SYS_gettimeofday) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/getuid.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/getuid.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _getuid
 | ||||
| _getuid: SYSTEM(SYS_getuid) | ||||
							
								
								
									
										7
									
								
								mach/sun2/libsys/gtty.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								mach/sun2/libsys/gtty.c
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,7 @@ | |||
| #include <sgtty.h> | ||||
| int gtty(fildes,argp) | ||||
| 	int fildes ; | ||||
| 	struct sgttyb *argp ; | ||||
| { | ||||
| 	return ioctl(fildes,TIOCGETP,argp) ; | ||||
| } | ||||
							
								
								
									
										65
									
								
								mach/sun2/libsys/head_em.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										65
									
								
								mach/sun2/libsys/head_em.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,65 @@ | |||
| .define .lino,.filn | ||||
| .define EXIT
 | ||||
| .define	begtext,begdata,begbss | ||||
| .define	EARRAY,ERANGE,ESET,EIDIVZ,EHEAP,EILLINS,ECASE,EBADGTO | ||||
| .define	hol0,.reghp,.limhp,.trpim,.trppc | ||||
| .sect .text | ||||
| .sect .rom | ||||
| .sect .data | ||||
| .sect .bss | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| ! runtime startof for 68020 machine | ||||
| 
 | ||||
| 
 | ||||
| LINO_AD	= 0 | ||||
| FILN_AD	= 4 | ||||
| 
 | ||||
| EARRAY	= 0 | ||||
| ERANGE	= 1 | ||||
| ESET	= 2 | ||||
| EIDIVZ	= 6 | ||||
| EHEAP	= 17 | ||||
| EILLINS	= 18 | ||||
| ECASE	= 20 | ||||
| EBADGTO = 27 | ||||
| 
 | ||||
| 	.sect .text | ||||
| begtext: | ||||
| 	move.l	(sp),d2 | ||||
| 	lea	4(sp),a0 | ||||
| 	move.l	d2,d1 | ||||
| 	add.l	#1,d1 | ||||
| 	asl.l	#2,d1 | ||||
| 	move.l	a0,a1 | ||||
| 	add.l	d1,a1 | ||||
| 	pea	(a1) | ||||
| 	pea	(a0) | ||||
| 	move.l	d2,-(sp) | ||||
| 	move.l	#0,a6 | ||||
| 	jsr	_m_a_i_n | ||||
| 	move.l	d0,(sp)		! no stack cleanup needed | ||||
| EXIT: | ||||
| 	jsr	_exit | ||||
| 
 | ||||
| 	.sect .data | ||||
| begdata: | ||||
| 	.data4 0		! may be at virtual address 0 with no problem | ||||
| hol0: | ||||
| .lino: | ||||
| 	.data4	0	! lino | ||||
| .filn: | ||||
| 	.data4	0	! filn | ||||
| .reghp: | ||||
| 	.data4	endbss
 | ||||
| .limhp: | ||||
| 	.data4	endbss
 | ||||
| .trppc: | ||||
| 	.data4	0
 | ||||
| .trpim: | ||||
| 	.data4	0	! USED TO BE 2 BYTES; IS THIS RIGHT?
 | ||||
| 
 | ||||
| 
 | ||||
| 	.sect .bss | ||||
| begbss: !initialization is not needed because ALL entries are in zero space! | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/ioctl.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/ioctl.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _ioctl
 | ||||
| _ioctl: SYSTEM(SYS_ioctl) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/kill.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/kill.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _kill
 | ||||
| _kill: SYSTEM(SYS_kill) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/killpg.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/killpg.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _killpg
 | ||||
| _killpg: SYSTEM(SYS_killpg) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/link.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/link.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _link
 | ||||
| _link: SYSTEM(SYS_link) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/listen.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/listen.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _listen
 | ||||
| _listen: SYSTEM(SYS_listen) | ||||
							
								
								
									
										43
									
								
								mach/sun2/libsys/lockf.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								mach/sun2/libsys/lockf.c
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,43 @@ | |||
| #include <errno.h> | ||||
| lockf(fildes, mode, size) | ||||
| 	long size; | ||||
| { | ||||
| 	struct { | ||||
| 		short type, whence; long start, end; short pid; | ||||
| 	} x; | ||||
| 	int i = 8; | ||||
| 	extern int errno; | ||||
| 
 | ||||
| 	x.type = 2; | ||||
| 	x.whence = 1; | ||||
| 	x.start = 0; | ||||
| 	x.end = size; | ||||
| 	switch(mode) { | ||||
| 	case 0: | ||||
| 		x.type = 3; | ||||
| 		break; | ||||
| 	case 1: | ||||
| 		i = 9; | ||||
| 		break; | ||||
| 	case 2: | ||||
| 		break; | ||||
| 	case 3: | ||||
| 		if (fcntl(fildes,7,&x) == -1) { | ||||
| 			return -1; | ||||
| 		} | ||||
| 		if (x.type == 3) { | ||||
| 			return 0; | ||||
| 		} | ||||
| 		errno = EACCES; | ||||
| 		return -1; | ||||
| 	default: | ||||
| 		errno = EINVAL; | ||||
| 		return -1; | ||||
| 	} | ||||
| 	if (fcntl(fildes,i,&x) == -1) { | ||||
| 		if (errno = 79) { | ||||
| 			errno = 78; | ||||
| 		} | ||||
| 		return -1; | ||||
| 	} | ||||
| } | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/lseek.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/lseek.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _lseek
 | ||||
| _lseek: SYSTEM(SYS_lseek) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/lstat.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/lstat.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _lstat
 | ||||
| _lstat: SYSTEM(SYS_lstat) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/madvise.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/madvise.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _madvise
 | ||||
| _madvise: SYSTEM(SYS_madvise) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/mincore.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/mincore.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _mincore
 | ||||
| _mincore: SYSTEM(SYS_mincore) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/mkdir.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/mkdir.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _mkdir
 | ||||
| _mkdir: SYSTEM(SYS_mkdir) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/mknod.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/mknod.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _mknod
 | ||||
| _mknod: SYSTEM(SYS_mknod) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/mmap.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/mmap.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _mmap
 | ||||
| _mmap: SYSTEM(SYS_mmap) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/mount.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/mount.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _mount
 | ||||
| _mount: SYSTEM(SYS_mount) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/mprotect.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/mprotect.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _mprotect
 | ||||
| _mprotect: SYSTEM(SYS_mprotect) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/mremap.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/mremap.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _mremap
 | ||||
| _mremap: SYSTEM(SYS_mremap) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/munmap.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/munmap.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _munmap
 | ||||
| _munmap: SYSTEM(SYS_munmap) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/nfssvc.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/nfssvc.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _nfssvc
 | ||||
| _nfssvc: SYSTEM(SYS_nfssvc) | ||||
							
								
								
									
										13
									
								
								mach/sun2/libsys/nice.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								mach/sun2/libsys/nice.c
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,13 @@ | |||
| nice(incr) | ||||
| { | ||||
| 	extern int errno; | ||||
| 	int sav = errno; | ||||
| 	int prio; | ||||
| 
 | ||||
| 	errno = 0; | ||||
| 	prio = getpriority(0,0); | ||||
| 	if (prio == -1 && errno) return -1; | ||||
| 	if (setpriority(0,0,prio+incr) < 0) return -1; | ||||
| 	errno = sav; | ||||
| 	return 0; | ||||
| } | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/open.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/open.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _open
 | ||||
| _open: SYSTEM(SYS_open) | ||||
							
								
								
									
										3
									
								
								mach/sun2/libsys/pause.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								mach/sun2/libsys/pause.c
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,3 @@ | |||
| pause() { | ||||
| 	sigpause(sigblock()); | ||||
| } | ||||
							
								
								
									
										14
									
								
								mach/sun2/libsys/pipe.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								mach/sun2/libsys/pipe.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,14 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _pipe
 | ||||
| _pipe: | ||||
| 	pea	SYS_pipe | ||||
| 	trap	#0 | ||||
| 	bcs	1f | ||||
| 	move.l	4(sp),a0 | ||||
| 	move.l	d0,(a0)+ | ||||
| 	move.l	d1,(a0) | ||||
| 	clr.l	d0 | ||||
| 	rts | ||||
| 1: | ||||
| 	jmp	cerror | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/profil.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/profil.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _profil
 | ||||
| _profil: SYSTEM(SYS_profil) | ||||
							
								
								
									
										7
									
								
								mach/sun2/libsys/ptrace.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								mach/sun2/libsys/ptrace.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,7 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _ptrace
 | ||||
| .extern _errno
 | ||||
| _ptrace: | ||||
| 	clr.l	_errno | ||||
| 	SYSTEM(SYS_ptrace) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/quotactl.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/quotactl.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _quotactl
 | ||||
| _quotactl: SYSTEM(SYS_quotactl) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/read.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/read.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _read
 | ||||
| _read: SYSTEM(SYS_read) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/readlink.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/readlink.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _readlink
 | ||||
| _readlink: SYSTEM(SYS_readlink) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/readv.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/readv.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _readv
 | ||||
| _readv: SYSTEM(SYS_readv) | ||||
							
								
								
									
										10
									
								
								mach/sun2/libsys/reboot.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								mach/sun2/libsys/reboot.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,10 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _reboot
 | ||||
| _reboot: | ||||
| 	pea	SYS_reboot | ||||
| 	trap	#0 | ||||
| 	bcs	1f | ||||
| 	stop	#0 | ||||
| 1: | ||||
| 	jmp	cerror | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/recv.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/recv.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _recv
 | ||||
| _recv: SYSTEM(SYS_recv) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/recvfrom.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/recvfrom.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _recvfrom
 | ||||
| _recvfrom: SYSTEM(SYS_recvfrom) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/recvmsg.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/recvmsg.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _recvmsg
 | ||||
| _recvmsg: SYSTEM(SYS_recvmsg) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/rename.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/rename.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _rename
 | ||||
| _rename: SYSTEM(SYS_rename) | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/rmdir.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/rmdir.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _rmdir
 | ||||
| _rmdir: SYSTEM(SYS_rmdir) | ||||
							
								
								
									
										39
									
								
								mach/sun2/libsys/sbrk.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								mach/sun2/libsys/sbrk.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,39 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _sbrk,_brk | ||||
| _sbrk: | ||||
| 	move.l	4(sp),d0 | ||||
| 	add.l	#3,d0 | ||||
| 	move.l	#~3,d1 | ||||
| 	and.l	d1,d0 | ||||
| 	move.l	d0,a0 | ||||
| 	move.l	curbrk,d0 | ||||
| 	add.l	#3,d0 | ||||
| 	and.l	d1,d0 | ||||
| 	move.l	d0,curbrk | ||||
| 	add.l	d0,a0 | ||||
| 	move.l	a0,4(sp) | ||||
| 	pea	17	! not SYS_sbrk | ||||
| 	trap	#0 | ||||
| 	bcs	1f | ||||
| 	move.l	curbrk,d0 | ||||
| 	move.l	4(sp),curbrk | ||||
| 	rts | ||||
| 1: | ||||
| 	jmp	cerror | ||||
| 
 | ||||
| _brk: | ||||
| 	move.l	4(sp),d0 | ||||
| 	add.l	#3,d0 | ||||
| 	move.l	#~3,d1 | ||||
| 	and.l	d1,d0 | ||||
| 	move.l	d0,4(sp) | ||||
| 	pea	17 | ||||
| 	trap	#0 | ||||
| 	bcs	1b | ||||
| 	move.l	4(sp),curbrk | ||||
| 	clr.l	d0 | ||||
| 	rts | ||||
| 
 | ||||
| .sect .data | ||||
| curbrk:	.data4 endbss | ||||
							
								
								
									
										4
									
								
								mach/sun2/libsys/select.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sun2/libsys/select.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| #include "syscall.h" | ||||
| .sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
 | ||||
| .define _select
 | ||||
| _select: SYSTEM(SYS_select) | ||||
Some files were not shown because too many files have changed in this diff Show more
		Loading…
	
	Add table
		
		Reference in a new issue