This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: FreeBSD port (60): system calls


Roland McGrath writes:
> > - The syscalls list includes some FreeBSD syscalls which are not used
> >   in libc but which are provided so that some specific programs can
> >   use them, in case they need them.
> 
> We like to avoid implicit parts of the ABI.

I don't agree. A libc should provide access to all system calls,
whether they are useful to many programs or to just one. Only
redundant syscalls like old_stat need not be exported to userland.

> Since you didn't include a version script, these will only be
> available to static programs but that is probably not what you had
> in mind.

The version definitions will come in the last patch of the series. The
exported nonstandard syscalls are all prefixed with __ in there.

> Are these syscalls not declared anywhere at all in FreeBSD?

Some of them are not declared, indeed.

> > - sysdep.h is different from the Linux one because FreeBSD system
> > - fork, vfork, rfork are special because they return two words in two
> 
> This is all as BSD has always been, and the libc code supported systems
> with BSD style syscalls before it supported Linux.  Why can't you just use
> sysdeps/unix/i386/{v,}fork.S?

The difference between the existing sysdeps/unix/i386/fork.S and the
freebsd/i386/fork.S is that the latter defines the function under the
primary name __libc_fork. This is needed for linuxthreads (which
overrides __fork).

You can move freebsd/i386/fork.S to sysdeps/unix/i386/fork.S; this is
probably not going to harm anyone.

About vfork.S: I don't understand sysdeps/unix/i386/vfork.S; if you
want to replace it with freebsd/i386/vfork.S, I see no problem.

> And then add a sysdeps/unix/alpha/{v,}fork.S
> as well, for benefit of any other port that might need it.
> (unix/bsd/osf/alpha/fork.S should be consolidated with yours to
> unix/alpha/fork.S, likewise vfork).

I agree, you can move freebsd/alpha/fork.S to
sysdeps/unix/alpha/fork.S, and ditch
sysdeps/unix/bsd/osf/alpha/fork.S.

> Don't put these syscalls in your syscalls.list so it won't override
> the other sources.

'fork' and 'vfork' are already removed from syscalls.list.

> In cases like */rfork.S and alpha/vfork.S where it's identical but for the
> names, I would rather see a file that did some #define's and an #include.

The vfork functions must be implemented in different code, so as not
to use the stack. The alpha/vfork.S is therefore wrong; I withdraw it.

And rfork should not be unified with fork, because one has a __libc_
primary name, and the other one doesn't.

> sysdep.S should not be defining errno any more, it's probably a multiple
> definition error if you build with current sources.

OK, I'm applying your last week's change also to this new sysdep.S. I
would have noticed during rebuilding later...

> For sys_lseek.S, I would introduce another intermediate macro used by
> sysdep.h so that you can just redefine the part for storing -1 and not
> duplicate all the code.  Then e.g. if you change sysdep.h to use TLS later,
> you won't have to update sys_lseek.S too.

OK, find it attached.

> We should move the SYSCALL_ERROR_HANDLER defn from
> sysdeps/unix/sysv/linux/i386/sysdep.h to sysdeps/unix/i386/sysdep.h so you
> don't have to duplicate it.

Doesn't work: we cannot reuse the Linux SYSCALL_ERROR_HANDLER for
FreeBSD, because after syscall return, on Linux %eax contains the
negated errno value, whereas on BSD %eax contains the positive errno
value.

> In alpha/sysdep.h the INLINE_SYSCALL redefinition should not be necessary,
> that should be the generic definition you get from sysdeps/unix/sysdep.h.

The generic definition is overridden by the one in
sysdeps/unix/alpha/sysdep.h, which uses __NR_ prefix for syscall
numbers. Whereas BSD uses the prefix SYS_. So removing the
INLINE_SYSCALL redefinition will cause a compilation failure.

I don't have an Alpha machine handy for experimentation; when someone
can test the Alpha port, we will think about reusing the inline
syscalls from sysdeps/unix/alpha/sysdep.h for FreeBSD. But that's
premature for now. Therefore I leave the FIXME in.

Here's the updated patch. Not taking into account any file moves that
you might want to do.

Bruno


2002-10-18  Bruno Haible  <bruno@clisp.org>

	* sysdeps/unix/bsd/bsd4.4/freebsd/syscalls.list: New file.
	* sysdeps/unix/bsd/bsd4.4/freebsd/sys/syscall.h: New file.
	* sysdeps/unix/bsd/bsd4.4/freebsd/i386/syscalls.list: New file.
	* sysdeps/unix/bsd/bsd4.4/freebsd/i386/sysdep.h: New file.
	* sysdeps/unix/bsd/bsd4.4/freebsd/i386/sysdep.S: New file.
	* sysdeps/unix/bsd/bsd4.4/freebsd/i386/syscall.S: New file.
	* sysdeps/unix/bsd/bsd4.4/freebsd/i386/sys_lseek.S: New file.
	* sysdeps/unix/bsd/bsd4.4/freebsd/i386/fork.S: New file.
	* sysdeps/unix/bsd/bsd4.4/freebsd/i386/vfork.S: New file.
	* sysdeps/unix/bsd/bsd4.4/freebsd/i386/rfork.S: New file.
	* sysdeps/unix/bsd/bsd4.4/freebsd/alpha/syscalls.list: New file.
	* sysdeps/unix/bsd/bsd4.4/freebsd/alpha/sysdep.h: New file.
	* sysdeps/unix/bsd/bsd4.4/freebsd/alpha/syscall.S: New file.
	* sysdeps/unix/bsd/bsd4.4/freebsd/alpha/fork.S: New file.
	* sysdeps/unix/bsd/bsd4.4/freebsd/alpha/vfork.S: New file.

*** /dev/null	Wed Apr 26 16:41:04 2000
--- sysdeps/unix/bsd/bsd4.4/freebsd/syscalls.list	Mon Sep 16 01:53:00 2002
***************
*** 0 ****
--- 1,132 ----
+ # File name	Caller	Syscall name		# args	Strong name	Weak names
+ 
+ acl_aclcheck_fd	-	acl_aclcheck_fd		i:iip	__acl_aclcheck_fd
+ acl_aclcheck_file -	acl_aclcheck_file	i:sip	__acl_aclcheck_file
+ acl_delete_fd	-	acl_delete_fd		i:ii	__acl_delete_fd
+ acl_delete_file	-	acl_delete_file		i:si	__acl_delete_file
+ acl_get_fd	-	acl_get_fd		i:iip	__acl_get_fd
+ acl_get_file	-	acl_get_file		i:sip	__acl_get_file
+ acl_set_fd	-	acl_set_fd		i:iip	__acl_set_fd
+ acl_set_file	-	acl_set_file		i:sip	__acl_set_file
+ sys_aio_cancel	-	aio_cancel		i:ip	__syscall_aio_cancel
+ sys_aio_error	-	aio_error		i:p	__syscall_aio_error
+ sys_aio_read	-	aio_read		i:p	__syscall_aio_read
+ sys_aio_return	-	aio_return		i:p	__syscall_aio_return
+ sys_aio_suspend	-	aio_suspend		i:bnP	__syscall_aio_suspend
+ sys_aio_waitcomplete -	aio_waitcomplete	i:pp	__syscall_aio_waitcomplete
+ sys_aio_write	-	aio_write		i:p	__syscall_aio_write
+ sys_clock_getres -	clock_getres		i:ip	__syscall_clock_getres
+ sys_clock_gettime -	clock_gettime		i:ip	__syscall_clock_gettime
+ sys_clock_settime -	clock_settime		i:ip	__syscall_clock_settime
+ extattrctl	-	extattrctl		i:sisI	extattrctl
+ extattr_delete_file -	extattr_delete_file	i:ss	extattr_delete_file
+ extattr_get_file -	extattr_get_file	i:ssbn	extattr_get_file
+ extattr_set_file -	extattr_set_file	i:ssbn	extattr_set_file
+ fhopen		-	fhopen			i:pi	fhopen
+ sys_fhstat	-	fhstat			i:pp	__syscall_fhstat
+ fhstatfs	-	fhstatfs		i:pp	__fhstatfs	fhstatfs
+ sys_fstat	-	fstat			i:ip	__syscall_fstat
+ sys_ftruncate	-	ftruncate		i:iii	__syscall_ftruncate
+ futimes		-	futimes			i:ip	__futimes	futimes
+ sys_getcwd	-	getcwd			i:bn	__syscall_getcwd
+ sys_getdents	-	getdents		i:ibn	__syscall_getdents
+ sys_getdirentries -	getdirentries		i:ibnP	__syscall_getdirentries
+ getfh		-	getfh			i:sp	getfh
+ getfsstat	-	getfsstat		i:pii	__getfsstat	getfsstat
+ sys_getlogin	-	getlogin		i:bn	__syscall_getlogin
+ getpgid		-	getpgid			i:i	__getpgid	__getpgid_internal getpgid
+ getpgrp		-	getpgrp			i:	getpgrp
+ getresgid	-	getresgid		i:ppp	getresgid
+ getresuid	-	getresuid		i:ppp	getresuid
+ getrlimit	-	getrlimit		i:ip	__getrlimit	getrlimit getrlimit64
+ getsid		-	getsid			i:i	getsid
+ issetugid	-	issetugid		i:	issetugid
+ jail		-	jail			i:p	jail
+ kldfind		-	kldfind			i:s	kldfind
+ kldfirstmod	-	kldfirstmod		i:i	kldfirstmod
+ kldload		-	kldload			i:s	kldload
+ kldnext		-	kldnext			i:i	kldnext
+ kldstat		-	kldstat			i:ip	kldstat
+ kldsym		-	kldsym			i:iip	kldsym
+ kldunload	-	kldunload		i:i	kldunload
+ ktrace		-	ktrace			i:siii	ktrace
+ lchmod		-	lchmod			i:si	lchmod
+ lchown		-	lchown			i:sii	__lchown	lchown
+ sys_lio_listio	-	lio_listio		i:ibnP	__syscall_lio_listio
+ sys_lseek	-	lseek			i:iiii	__syscall_lseek
+ sys_lstat	-	lstat			i:sp	__syscall_lstat
+ lutimes		-	lutimes			i:sp	__lutimes	lutimes
+ madvise		-	madvise			i:pii	posix_madvise	madvise
+ minherit	-	minherit		i:aii	minherit
+ mincore		-	mincore			i:anV	mincore
+ mlock		-	mlock			i:bn	mlock
+ mlockall	-	mlockall		i:i	mlockall
+ mkfifo		-	mkfifo			i:si	__mkfifo	mkfifo
+ sys_mknod	-	mknod			i:sii	__syscall_mknod
+ sys_mmap	-	mmap			b:aniiiii __syscall_mmap
+ modfind		-	modfind			i:s	modfind
+ modfnext	-	modfnext		i:i	modfnext
+ modnext		-	modnext			i:i	modnext
+ modstat		-	modstat			i:ip	modstat
+ mount		-	mount			i:ssiP	mount
+ msgctl		-	msgctl			i:iip	msgctl
+ msgget		-	msgget			i:ii	msgget
+ msgrcv		-	msgrcv			i:ibnii	__libc_msgrcv	msgrcv
+ msgsnd		-	msgsnd			i:ibni	__libc_msgsnd	msgsnd
+ munlock		-	munlock			i:ai	munlock
+ munlockall	-	munlockall		i:	munlockall
+ nanosleep	-	nanosleep		i:pp	__libc_nanosleep __nanosleep nanosleep
+ sys_nfstat	-	nfstat			i:ip	__syscall_nfstat
+ sys_nlstat	-	nlstat			i:sp	__syscall_nlstat
+ sys_nstat	-	nstat			i:sp	__syscall_nstat
+ ntp_adjtime	-	ntp_adjtime		i:p	ntp_adjtime
+ obreak		-	obreak			i:a	__syscall_obreak
+ sys_open	-	open			i:siv	__syscall_open
+ poll		-	poll			i:pii	__poll		poll
+ sys_pread	-	pread			i:ibnii	__syscall_pread
+ sys_ptrace	-	ptrace			i:iipi	__syscall_ptrace
+ sys_pwrite	-	pwrite			i:ibnii	__syscall_pwrite
+ quotactl	-	quotactl		i:siip	quotactl
+ sys_readv	-	readv			i:ipi	__syscall_readv
+ rtprio		-	rtprio			i:iip	__rtprio	rtprio
+ sys_sched_getp	-	sched_getparam		i:ip	__syscall_sched_getparam
+ sys_sched_gets	-	sched_getscheduler	i:i	__syscall_sched_getscheduler
+ sched_primax	-	sched_get_priority_max	i:i	__sched_get_priority_max sched_get_priority_max
+ sched_primin	-	sched_get_priority_min	i:i	__sched_get_priority_min sched_get_priority_min
+ sched_rr_gi	-	sched_rr_get_interval	i:ip	__sched_rr_get_interval sched_rr_get_interval
+ sched_setp	-	sched_setparam		i:ip	__sched_setparam sched_setparam
+ sched_sets	-	sched_setscheduler	i:iip	__sched_setscheduler sched_setscheduler
+ sched_yield	-	sched_yield		i:	__sched_yield sched_yield
+ semctl		-	semctl			i:iiiv	semctl
+ semget		-	semget			i:iii	semget
+ semop		-	semop			i:ipi	semop
+ bsd_sendfile	-	sendfile		i:iiiippi bsd_sendfile
+ setegid		-	setegid			i:i	setegid
+ seteuid		-	seteuid			i:i	seteuid
+ setgid		-	setgid			i:i	__setgid	setgid
+ sys_setlogin	-	setlogin		i:s	__syscall_setlogin
+ setpgid		-	setpgid			i:ii	__setpgid	setpgid
+ setresgid	-	setresgid		i:iii	setresgid
+ setresuid	-	setresuid		i:iii	setresuid
+ setrlimit	-	setrlimit		i:ip	__setrlimit	setrlimit setrlimit64
+ setsid		-	setsid			i:	__setsid	setsid
+ setuid		-	setuid			i:i	__setuid	setuid
+ shmat		-	shmat			i:iai	shmat
+ shmctl		-	shmctl			i:iip	shmctl
+ shmdt		-	shmdt			i:a	shmdt
+ shmget		-	shmget			i:iii	shmget
+ sigaction	-	sigaction		i:iPP	__libc_sigaction __sigaction sigaction
+ sigpending	-	sigpending		i:p	sigpending
+ sigprocmask	-	sigprocmask		i:iPP	__sigprocmask	sigprocmask
+ sigsuspend	-	sigsuspend		i:p	__sigsuspend	sigsuspend
+ sys_stat	-	stat			i:sp	__syscall_stat
+ sysarch		-	sysarch			i:ip	__sysarch	sysarch
+ sysctl		-	sysctl			i:pibNbn __sysctl	sysctl
+ thr_sleep	-	thr_sleep		i:p	__syscall_thr_sleep
+ thr_wakeup	-	thr_wakeup		i:i	__syscall_thr_wakeup
+ sys_truncate	-	truncate		i:sii	__syscall_truncate
+ undelete	-	undelete		i:s	undelete
+ unmount		-	unmount			i:si	unmount
+ utrace		-	utrace			i:bn	utrace
+ sys_writev	-	writev			i:ipi	__syscall_writev
+ yield		-	yield			i:	__syscall_yield
*** /dev/null	Wed Apr 26 16:41:04 2000
--- sysdeps/unix/bsd/bsd4.4/freebsd/sys/syscall.h	Sun Jul  7 17:14:53 2002
***************
*** 0 ****
--- 1,304 ----
+ /* Copyright (C) 2002 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+    The GNU C Library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+ 
+    The GNU C Library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+    You should have received a copy of the GNU Lesser General Public
+    License along with the GNU C Library; if not, write to the Free
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+ 
+ #ifndef _SYSCALL_H
+ #define _SYSCALL_H	1
+ 
+ #define SYS_exit			1
+ #define SYS_fork			2
+ #define SYS_read			3
+ #define SYS_write			4
+ #define SYS_open			5
+ #define SYS_close			6
+ #define SYS_wait4			7
+ /*#define SYS_creat			8	obsoleted */
+ #define SYS_link			9
+ #define SYS_unlink			10
+ /*#define SYS_execv			11 	removed syscall */
+ #define SYS_chdir			12
+ #define SYS_fchdir			13
+ #define SYS_mknod			14
+ #define SYS_chmod			15
+ #define SYS_chown			16
+ #define SYS_obreak			17
+ #define SYS_getfsstat			18
+ /*#define SYS_lseek			19	new 64-bit variant at 199 */
+ #define SYS_getpid			20
+ #define SYS_mount			21
+ #define SYS_unmount			22
+ #define SYS_setuid			23
+ #define SYS_getuid			24
+ #define SYS_geteuid			25
+ #define SYS_ptrace			26
+ #define SYS_recvmsg			27
+ #define SYS_sendmsg			28
+ #define SYS_recvfrom			29
+ #define SYS_accept			30
+ #define SYS_getpeername			31
+ #define SYS_getsockname			32
+ #define SYS_access			33
+ #define SYS_chflags			34
+ #define SYS_fchflags			35
+ #define SYS_sync			36
+ #define SYS_kill			37
+ /*#define SYS_stat			38	new 32-bit variant at 188 */
+ #define SYS_getppid			39
+ /*#define SYS_lstat			40	new 32-bit variant at 190 */
+ #define SYS_dup				41
+ #define SYS_pipe			42
+ #define SYS_getegid			43
+ #define SYS_profil			44
+ #define SYS_ktrace			45
+ /*#define SYS_sigaction			46	new 128-sigs variant at 342 */
+ #define SYS_getgid			47
+ /*#define SYS_sigprocmask		48	new 128-sigs variant at 340 */
+ #define SYS_getlogin			49
+ #define SYS_setlogin			50
+ #define SYS_acct			51
+ /*#define SYS_sigpending		52	new 128-sigs variant at 343 */
+ #define SYS_sigaltstack			53
+ #define SYS_ioctl			54
+ #define SYS_reboot			55
+ #define SYS_revoke			56
+ #define SYS_symlink			57
+ #define SYS_readlink			58
+ #define SYS_execve			59
+ #define SYS_umask			60
+ #define SYS_chroot			61
+ /*#define SYS_fstat			62	new 32-bit variant at 189 */
+ /*#define SYS_getkerninfo		63	obsoleted by uname, sysctl */
+ /*#define SYS_getpagesize		64	obsoleted by sysctl CTL_HW HW_PAGESIZE */
+ #define SYS_msync			65	/* also at 277 */
+ #define SYS_vfork			66
+ /*#define SYS_vread			67 	removed syscall */
+ /*#define SYS_vwrite			68 	removed syscall */
+ /*#define SYS_sbrk			69	stub returning EOPNOTSUPP */
+ /*#define SYS_sstk			70	stub returning EOPNOTSUPP */
+ /*#define SYS_mmap			71	new 64-bit variant at 197 */
+ /*#define SYS_ovadvise			72	stub returning EINVAL */
+ #define SYS_munmap			73
+ #define SYS_mprotect			74
+ #define SYS_madvise			75
+ /*#define SYS_vhangup			76 	removed syscall */
+ /*#define SYS_vlimit			77 	removed syscall */
+ #define SYS_mincore			78
+ #define SYS_getgroups			79
+ #define SYS_setgroups			80
+ #define SYS_getpgrp			81
+ #define SYS_setpgid			82
+ #define SYS_setitimer			83
+ /*#define SYS_wait			84	obsoleted by wait4 */
+ #define SYS_swapon			85
+ #define SYS_getitimer			86
+ /*#define SYS_gethostname		87	obsoleted by sysctl CTL_KERN KERN_HOSTNAME */
+ /*#define SYS_sethostname		88	obsoleted by sysctl CTL_KERN KERN_HOSTNAME */
+ #define SYS_getdtablesize		89
+ #define SYS_dup2			90
+ #define SYS_fcntl			92
+ #define SYS_select			93
+ #define SYS_fsync			95
+ #define SYS_setpriority			96
+ #define SYS_socket			97
+ #define SYS_connect			98
+ /*#define SYS_accept			99	new socket variant at 30 */
+ #define SYS_getpriority			100
+ /*#define SYS_send			101	old socket ABI, obsoleted */
+ /*#define SYS_recv			102	old socket ABI, obsoleted */
+ /*#define SYS_sigreturn			103	new 128-sigs variant at 344 */
+ #define SYS_bind			104
+ #define SYS_setsockopt			105
+ #define SYS_listen			106
+ /*#define SYS_vtimes			107 	removed syscall */
+ /*#define SYS_sigvec			108	old 32-sigs ABI, obsoleted */
+ /*#define SYS_sigblock			109	old 32-sigs ABI, obsoleted */
+ /*#define SYS_sigsetmask		110	old 32-sigs ABI, obsoleted */
+ /*#define SYS_sigsuspend		111	new 128-sigs variant at 341 */
+ /*#define SYS_sigstack			112     obsoleted by sigaltstack */
+ /*#define SYS_recvmsg			113	new socket variant at 27 */
+ /*#define SYS_sendmsg			114	new socket variant at 28 */
+ /*#define SYS_vtrace			115 	removed syscall */
+ #define SYS_gettimeofday		116
+ #define SYS_getrusage			117
+ #define SYS_getsockopt			118
+ #define SYS_readv			120
+ #define SYS_writev			121
+ #define SYS_settimeofday		122
+ #define SYS_fchown			123
+ #define SYS_fchmod			124
+ /*#define SYS_recvfrom			125	new socket variant at 29 */
+ #define SYS_setreuid			126
+ #define SYS_setregid			127
+ #define SYS_rename			128
+ /*#define SYS_truncate			129	new 64-bit variant at 200 */
+ /*#define SYS_ftruncate			130	new 64-bit variant at 201 */
+ #define SYS_flock			131
+ #define SYS_mkfifo			132
+ #define SYS_sendto			133
+ #define SYS_shutdown			134
+ #define SYS_socketpair			135
+ #define SYS_mkdir			136
+ #define SYS_rmdir			137
+ #define SYS_utimes			138
+ /*#define SYS_sigreturn			139 	removed syscall */
+ #define SYS_adjtime			140
+ /*#define SYS_getpeername		141	new socket variant at 31 */
+ /*#define SYS_gethostid			142	obsoleted by sysctl CTL_KERN KERN_HOSTID */
+ /*#define SYS_sethostid			143	obsoleted by sysctl CTL_KERN KERN_HOSTID */
+ /*#define SYS_getrlimit			144	new 64-bit variant at 194 */
+ /*#define SYS_setrlimit			145	new 64-bit variant at 195 */
+ /*#define SYS_killpg			146	obsoleted by kill(sig,-pid) */
+ #define SYS_setsid			147
+ #define SYS_quotactl			148
+ /*#define SYS_quota			149	obsolete */
+ /*#define SYS_getsockname		150	new socket variant at 32 */
+ /*#define SYS_getdirentries		156	new variant w. d_type at 196 */
+ #define SYS_statfs			157
+ #define SYS_fstatfs			158
+ #define SYS_getfh			161
+ #define SYS_getdomainname		162
+ #define SYS_setdomainname		163
+ #define SYS_uname			164
+ #define SYS_sysarch			165
+ #define SYS_rtprio			166
+ #define SYS_semsys			169	/* redundant, see at 220-223 */
+ #define SYS_msgsys			170	/* redundant, see at 224-227 */
+ #define SYS_shmsys			171	/* redundant, see at 228-231 */
+ #define SYS_pread			173
+ #define SYS_pwrite			174
+ #define SYS_ntp_adjtime			176
+ #define SYS_setgid			181
+ #define SYS_setegid			182
+ #define SYS_seteuid			183
+ /*#define SYS_lfs_bmapv			184	obsolete */
+ /*#define SYS_lfs_markv			185	obsolete */
+ /*#define SYS_lfs_segclean		186	obsolete */
+ /*#define SYS_lfs_segwait		187	obsolete */
+ #define SYS_stat			188	/* takes a 'struct stat' */
+ #define SYS_fstat			189	/* takes a 'struct stat' */
+ #define SYS_lstat			190	/* takes a 'struct stat' */
+ #define SYS_pathconf			191
+ #define SYS_fpathconf			192
+ #define SYS_getrlimit			194	/* takes a 'struct rlimit' */
+ #define SYS_setrlimit			195	/* takes a 'struct rlimit' */
+ #define SYS_getdirentries		196
+ #define SYS_mmap			197	/* takes a 64-bit off_t ! */
+ #define SYS_lseek			199	/* takes a 64-bit off_t ! */
+ #define SYS_truncate			200	/* takes a 64-bit off_t ! */
+ #define SYS_ftruncate			201	/* takes a 64-bit off_t ! */
+ #define SYS_sysctl			202
+ #define SYS_mlock			203
+ #define SYS_munlock			204
+ #define SYS_undelete			205
+ #define SYS_futimes			206
+ #define SYS_getpgid			207
+ #define SYS_poll			209
+ #define SYS_semctl			220
+ #define SYS_semget			221
+ #define SYS_semop			222
+ /*#define SYS_semconfig			223	removed in FreeBSD 4.6 */
+ #define SYS_msgctl			224
+ #define SYS_msgget			225
+ #define SYS_msgsnd			226
+ #define SYS_msgrcv			227
+ #define SYS_shmat			228
+ #define SYS_shmctl			229
+ #define SYS_shmdt			230
+ #define SYS_shmget			231
+ #define SYS_clock_gettime		232
+ #define SYS_clock_settime		233
+ #define SYS_clock_getres		234
+ #define SYS_nanosleep			240
+ #define SYS_minherit			250
+ #define SYS_rfork			251
+ /*#define SYS_openbsd_poll		252	OpenBSD duplicate of 209 */
+ #define SYS_issetugid			253
+ #define SYS_lchown			254	/* also at 275 */
+ #define SYS_getdents			272
+ #define SYS_lchmod			274
+ /*#define SYS_lchown			275	NetBSD duplicate of 254 */
+ #define SYS_lutimes			276
+ /*#define SYS_msync			277	NetBSD duplicate of 65 */
+ #define SYS_nstat			278	/* takes a 'struct nstat' */
+ #define SYS_nfstat			279	/* takes a 'struct nstat' */
+ #define SYS_nlstat			280	/* takes a 'struct nstat' */
+ #define SYS_fhstatfs			297
+ #define SYS_fhopen			298
+ #define SYS_fhstat			299	/* takes a 'struct stat' */
+ #define SYS_modnext			300
+ #define SYS_modstat			301
+ #define SYS_modfnext			302
+ #define SYS_modfind			303
+ #define SYS_kldload			304
+ #define SYS_kldunload			305
+ #define SYS_kldfind			306
+ #define SYS_kldnext			307
+ #define SYS_kldstat			308
+ #define SYS_kldfirstmod			309
+ #define SYS_getsid			310
+ #define SYS_setresuid			311
+ #define SYS_setresgid			312
+ /*#define SYS_signanosleep		313 	removed syscall */
+ #define SYS_aio_return			314
+ #define SYS_aio_suspend			315
+ #define SYS_aio_cancel			316
+ #define SYS_aio_error			317
+ #define SYS_aio_read			318
+ #define SYS_aio_write			319
+ #define SYS_lio_listio			320
+ #define SYS_yield			321
+ #define SYS_thr_sleep			322
+ #define SYS_thr_wakeup			323
+ #define SYS_mlockall			324
+ #define SYS_munlockall			325
+ #define SYS_getcwd			326
+ #define SYS_sched_setparam		327
+ #define SYS_sched_getparam		328
+ #define SYS_sched_setscheduler		329
+ #define SYS_sched_getscheduler		330
+ #define SYS_sched_yield			331
+ #define SYS_sched_get_priority_max	332
+ #define SYS_sched_get_priority_min	333
+ #define SYS_sched_rr_get_interval	334
+ #define SYS_utrace			335
+ #define SYS_sendfile			336
+ #define SYS_kldsym			337
+ #define SYS_jail			338
+ #define SYS_sigprocmask			340
+ #define SYS_sigsuspend			341
+ #define SYS_sigaction			342
+ #define SYS_sigpending			343
+ #define SYS_sigreturn			344
+ #define SYS_acl_get_file		347
+ #define SYS_acl_set_file		348
+ #define SYS_acl_get_fd			349
+ #define SYS_acl_set_fd			350
+ #define SYS_acl_delete_file		351
+ #define SYS_acl_delete_fd		352
+ #define SYS_acl_aclcheck_file		353
+ #define SYS_acl_aclcheck_fd		354
+ #define SYS_extattrctl			355
+ #define SYS_extattr_set_file		356
+ #define SYS_extattr_get_file		357
+ #define SYS_extattr_delete_file		358
+ #define SYS_aio_waitcomplete		359
+ #define SYS_getresuid			360
+ #define SYS_getresgid			361
+ #define SYS_kqueue			362	/* new in FreeBSD 4.6 */
+ #define SYS_kevent			363	/* new in FreeBSD 4.6 */
+ 
+ #endif
*** /dev/null	Wed Apr 26 16:41:04 2000
--- sysdeps/unix/bsd/bsd4.4/freebsd/i386/syscalls.list	Mon Jun 24 20:09:57 2002
***************
*** 0 ****
--- 1,2 ----
+ # File name	Caller	Syscall name	# args	Strong name	Weak names
+ 
*** /dev/null	Wed Apr 26 16:41:04 2000
--- sysdeps/unix/bsd/bsd4.4/freebsd/i386/sysdep.h	Fri Oct 18 23:24:27 2002
***************
*** 0 ****
--- 1,98 ----
+ /* Copyright (C) 1991-1993, 1995-2000, 2002 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+    The GNU C Library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+ 
+    The GNU C Library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+    You should have received a copy of the GNU Lesser General Public
+    License along with the GNU C Library; if not, write to the Free
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+ 
+ #ifndef _FREEBSD_I386_SYSDEP_H
+ #define _FREEBSD_I386_SYSDEP_H 1
+ 
+ /* There is some commonality.  */
+ #include <sysdeps/unix/i386/sysdep.h>
+ #include <bp-sym.h>
+ #include <bp-asm.h>
+ 
+ #ifdef __ASSEMBLER__
+ 
+ /* We don't want the label for the error handler to be global when we define
+    it here.  */
+ #ifdef PIC
+ # define SYSCALL_ERROR_LABEL 0f
+ #else
+ # define SYSCALL_ERROR_LABEL syscall_error
+ #endif
+ 
+ #undef	PSEUDO
+ #define	PSEUDO(name, syscall_name, args)				      \
+   .text;								      \
+   ENTRY (name)								      \
+     DO_CALL (syscall_name, args);					      \
+     jb SYSCALL_ERROR_LABEL;
+ 
+ #undef	PSEUDO_END
+ #define	PSEUDO_END(name)						      \
+   SYSCALL_ERROR_HANDLER							      \
+   END (name)
+ 
+ #ifndef PIC
+ #define SYSCALL_ERROR_HANDLER	/* Nothing here; code in sysdep.S is used.  */
+ #else
+ /* Store %eax into errno through the GOT.  */
+ #ifdef _LIBC_REENTRANT
+ #define SYSCALL_ERROR_HANDLER						      \
+ 0:pushl %ebx;								      \
+   call 1f;								      \
+   .subsection 1;							      \
+ 1:movl (%esp), %ebx;							      \
+   ret;									      \
+   .previous;								      \
+   addl $_GLOBAL_OFFSET_TABLE_, %ebx;					      \
+   pushl %eax;								      \
+   PUSH_ERRNO_LOCATION_RETURN;						      \
+   call BP_SYM (__errno_location)@PLT;					      \
+   POP_ERRNO_LOCATION_RETURN;						      \
+   popl %ecx;								      \
+   popl %ebx;								      \
+   movl %ecx, (%eax);							      \
+   SET_RETVAL_MINUS1;							      \
+   ret;
+ /* A quick note: it is assumed that the call to `__errno_location' does
+    not modify the stack!  */
+ #else
+ #define SYSCALL_ERROR_HANDLER						      \
+ 0:call 1f;								      \
+   .subsection 1;							      \
+ 1:movl (%esp), %ecx;							      \
+   ret;									      \
+   .previous;								      \
+   addl $_GLOBAL_OFFSET_TABLE_, %ecx;					      \
+   movl errno@GOT(%ecx), %ecx;						      \
+   movl %eax, (%ecx);							      \
+   SET_RETVAL_MINUS1;							      \
+   ret;
+ #endif	/* _LIBC_REENTRANT */
+ #define SET_RETVAL_MINUS1						      \
+   movl $-1, %eax
+ #endif	/* PIC */
+ 
+ /* FreeBSD expects the system call arguments on the stack.  */
+ #undef DO_CALL
+ #define DO_CALL(syscall_name, args)					      \
+   movl $SYS_ify (syscall_name), %eax;					      \
+   int $0x80
+ 
+ #endif	/* __ASSEMBLER__ */
+ 
+ #endif /* freebsd/i386/sysdep.h */
*** /dev/null	Wed Apr 26 16:41:04 2000
--- sysdeps/unix/bsd/bsd4.4/freebsd/i386/sysdep.S	Fri Oct 18 23:16:35 2002
***************
*** 0 ****
--- 1,38 ----
+ /* Copyright (C) 1995-1998, 2002 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+    The GNU C Library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+ 
+    The GNU C Library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+    You should have received a copy of the GNU Lesser General Public
+    License along with the GNU C Library; if not, write to the Free
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+ 
+ #include <sysdep.h>
+ 
+ /* The following code is only used in the shared library when we
+    compile the reentrant version.  Otherwise each system call defines
+    its own version.  */
+ 
+ #ifndef PIC
+ 
+ /* The syscall stubs jump here when they detect an error.
+    The code for FreeBSD is identical to the canonical Unix/i386 code.  */
+ 
+ #undef CALL_MCOUNT
+ #define CALL_MCOUNT /* Don't insert the profiling call, it clobbers %eax.  */
+ 
+ 	.text
+ ENTRY (__syscall_error)
+ #define __syscall_error __syscall_error_1
+ #include <sysdeps/unix/i386/sysdep.S>
+ 
+ #endif	/* !PIC */
*** /dev/null	Wed Apr 26 16:41:04 2000
--- sysdeps/unix/bsd/bsd4.4/freebsd/i386/syscall.S	Fri Jun 28 00:43:27 2002
***************
*** 0 ****
--- 1,29 ----
+ /* Copyright (C) 1993, 1995-1998, 2002 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+    The GNU C Library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+ 
+    The GNU C Library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+    You should have received a copy of the GNU Lesser General Public
+    License along with the GNU C Library; if not, write to the Free
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+ 
+ #include <sysdep.h>
+ 
+ ENTRY (syscall)
+ 	popl %ecx		/* Pop return address into %ecx.  */
+ 	popl %eax		/* Pop syscall number into %eax.  */
+ 	pushl %ecx		/* Push back return address.  */
+ 	int $0x80		/* Do the system call.  */
+ 	jb SYSCALL_ERROR_LABEL	/* Jump to error handler if error.  */
+ 	ret			/* Return to caller.  */
+ 
+ PSEUDO_END (syscall)
*** /dev/null	Wed Apr 26 16:41:04 2000
--- sysdeps/unix/bsd/bsd4.4/freebsd/i386/sys_lseek.S	Fri Oct 18 23:26:24 2002
***************
*** 0 ****
--- 1,59 ----
+ /* Copyright (C) 2002 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+    The GNU C Library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+ 
+    The GNU C Library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+    You should have received a copy of the GNU Lesser General Public
+    License along with the GNU C Library; if not, write to the Free
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+ 
+ #include <sysdep.h>
+ 
+ /* lseek returns a 64-bit result in %eax, %edx.  This means that in the
+    error case we have to set both %eax and %edx to -1.  */
+ 
+ #undef SYSCALL_ERROR_LABEL
+ #define SYSCALL_ERROR_LABEL 0f
+ 
+ #ifndef PIC
+ #undef SYSCALL_ERROR_HANDLER
+ #ifdef _LIBC_REENTRANT
+ #define SYSCALL_ERROR_HANDLER						      \
+ 0:pushl %eax;								      \
+   PUSH_ERRNO_LOCATION_RETURN;						      \
+   call BP_SYM (__errno_location);					      \
+   POP_ERRNO_LOCATION_RETURN;						      \
+   popl %ecx;								      \
+   movl $-1, %edx;							      \
+   movl %ecx, (%eax);							      \
+   movl %edx, %eax;							      \
+   ret;
+ /* A quick note: it is assumed that the call to `__errno_location' does
+    not modify the stack!  */
+ #else
+ #define SYSCALL_ERROR_HANDLER						      \
+ 0:movl $-1, %edx;							      \
+   movl %eax, errno;							      \
+   movl %edx, %eax;							      \
+   ret;
+ #endif	/* _LIBC_REENTRANT */
+ #else
+ /* Use the SYSCALL_ERROR_HANDLER defined in sysdep.h.  */
+ #undef SET_RETVAL_MINUS1
+ #define SET_RETVAL_MINUS1						      \
+   movl $-1, %edx;							      \
+   movl %edx, %eax
+ #endif	/* PIC */
+ 
+ PSEUDO (__syscall_lseek, lseek, 4)
+ 	ret
+ PSEUDO_END(__syscall_lseek)
*** /dev/null	Wed Apr 26 16:41:04 2000
--- sysdeps/unix/bsd/bsd4.4/freebsd/i386/fork.S	Tue Jul  9 02:47:09 2002
***************
*** 0 ****
--- 1,32 ----
+ /* Copyright (C) 1991-1992, 1994-1995, 1997, 2002 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+    The GNU C Library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+ 
+    The GNU C Library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+    You should have received a copy of the GNU Lesser General Public
+    License along with the GNU C Library; if not, write to the Free
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+ 
+ #include <sysdep.h>
+ 
+ PSEUDO (__libc_fork, fork, 0)
+ 	/* R1 is now 0 for the parent and 1 for the child.  Decrement it to
+ 	   make it -1 (all bits set) for the parent, and 0 (no bits set)
+ 	   for the child.  Then AND it with R0, so the parent gets
+ 	   R0&-1==R0, and the child gets R0&0==0.  */
+ 	decl r1
+ 	andl r1, r0
+ 	ret
+ PSEUDO_END (__libc_fork)
+ 
+ weak_alias (__libc_fork, __fork)
+ weak_alias (__fork, fork)
*** /dev/null	Wed Apr 26 16:41:04 2000
--- sysdeps/unix/bsd/bsd4.4/freebsd/i386/vfork.S	Fri Jun 28 00:42:19 2002
***************
*** 0 ****
--- 1,54 ----
+ /* Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+    The GNU C Library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+ 
+    The GNU C Library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+    You should have received a copy of the GNU Lesser General Public
+    License along with the GNU C Library; if not, write to the Free
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+ 
+ #include <sysdep.h>
+ 
+ /* Clone the calling process, but without copying the whole address space.
+    The calling process is suspended until the new process exits or is
+    replaced by a call to `execve'.  Return -1 for errors, 0 to the new process,
+    and the process ID of the new process to the old process.  */
+ 
+ ENTRY (__vfork)
+ 
+ 	/* Pop the return PC value into ECX.  */
+ 	popl	%ecx
+ 
+ 	/* Perform the system call.  */
+ 	DO_CALL (vfork, 0)
+ 	jb	L(error)	/* Branch forward if it failed.  */
+ 
+ 	/* In the parent process, %edx == 0, %eax == child pid.  */
+ 	/* In the child process, %edx == 1, %eax == parent pid.  */
+ 
+ 	/* Change %eax to be 0 in the child process.  */
+ 	decl	%edx
+ 	andl	%edx, %eax
+ 
+ 	/* Jump to the return PC.  */
+ 	jmp	*%ecx
+ 
+ L(error):
+ 	/* Push back the return PC.  */
+ 	pushl	%ecx
+ 
+ 	/* Branch to the error handler, hidden in PSEUDO_END.  */
+ 	jmp	SYSCALL_ERROR_LABEL
+ 
+ PSEUDO_END (__vfork)
+ 
+ weak_alias (__vfork, vfork)
*** /dev/null	Wed Apr 26 16:41:04 2000
--- sysdeps/unix/bsd/bsd4.4/freebsd/i386/rfork.S	Wed Jun 26 00:26:11 2002
***************
*** 0 ****
--- 1,31 ----
+ /* Copyright (C) 1991-1992, 1994-1995, 1997, 2002 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+    The GNU C Library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+ 
+    The GNU C Library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+    You should have received a copy of the GNU Lesser General Public
+    License along with the GNU C Library; if not, write to the Free
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+ 
+ #include <sysdep.h>
+ 
+ SYSCALL__ (rfork, 1)
+ 	/* R1 is now 0 for the parent and 1 for the child.  Decrement it to
+ 	   make it -1 (all bits set) for the parent, and 0 (no bits set)
+ 	   for the child.  Then AND it with R0, so the parent gets
+ 	   R0&-1==R0, and the child gets R0&0==0.  */
+ 	decl r1
+ 	andl r1, r0
+ 	ret
+ PSEUDO_END (__rfork)
+ 
+ weak_alias (__rfork, rfork)
*** /dev/null	Wed Apr 26 16:41:04 2000
--- sysdeps/unix/bsd/bsd4.4/freebsd/alpha/syscalls.list	Sun Jul  7 12:59:49 2002
***************
*** 0 ****
--- 1,7 ----
+ # File name	Caller	Syscall name	# args	Strong name	Weak names
+ 
+ fhstatfs	-	fhstatfs	i:pp	__fhstatfs	fhstatfs fhstatfs64
+ fstatfs		-	fstatfs		i:ip	__fstatfs	fstatfs __fstatfs64 fstatfs64
+ getfsstat	-	getfsstat	i:pii	__getfsstat	getfsstat __getfsstat64 getfsstat64
+ sys_poll	-	poll		i:pii	__syscall_poll
+ statfs		-	statfs		i:sp	__statfs	statfs statfs64
*** /dev/null	Wed Apr 26 16:41:04 2000
--- sysdeps/unix/bsd/bsd4.4/freebsd/alpha/sysdep.h	Tue Jul  2 02:37:28 2002
***************
*** 0 ****
--- 1,32 ----
+ /* Copyright (C) 1993, 1995, 1997, 2002 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+    The GNU C Library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+ 
+    The GNU C Library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+    You should have received a copy of the GNU Lesser General Public
+    License along with the GNU C Library; if not, write to the Free
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+ 
+ #ifndef _FREEBSD_ALPHA_SYSDEP_H
+ #define _FREEBSD_ALPHA_SYSDEP_H 1
+ 
+ #ifdef __ASSEMBLER__
+ #include <machine/pal.h>		/* get PAL_callsys */
+ #endif
+ 
+ #include <sysdeps/unix/alpha/sysdep.h>
+ 
+ /* FIXME: Is this necessary?  */
+ #undef INLINE_SYSCALL
+ #define INLINE_SYSCALL(name, nr, args...) __syscall_##name(args)
+ 
+ #endif /* freebsd/alpha/sysdep.h */
*** /dev/null	Wed Apr 26 16:41:04 2000
--- sysdeps/unix/bsd/bsd4.4/freebsd/alpha/syscall.S	Tue Jul  2 02:52:30 2002
***************
*** 0 ****
--- 1 ----
+ #include <sysdeps/unix/sysv/linux/alpha/syscall.S>
*** /dev/null	Wed Apr 26 16:41:04 2000
--- sysdeps/unix/bsd/bsd4.4/freebsd/alpha/fork.S	Tue Jul  9 02:39:26 2002
***************
*** 0 ****
--- 1,30 ----
+ /* Copyright (C) 1993, 1995, 1997, 2002 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+    The GNU C Library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+ 
+    The GNU C Library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+    You should have received a copy of the GNU Lesser General Public
+    License along with the GNU C Library; if not, write to the Free
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+ 
+ #include <sysdep.h>
+ 
+ PSEUDO (__libc_fork, fork, 0)
+ 	/* In the parent process, a4 == 0, v0 == child pid.  */
+ 	/* In the child process, a4 == 1, v0 == parent pid.  */
+ 	cmovne a4, zero, v0
+ 	ret
+ 
+ PSEUDO_END (__libc_fork)
+ 
+ weak_alias (__libc_fork, __fork)
+ weak_alias (__fork, fork)
*** /dev/null	Wed Apr 26 16:41:04 2000
--- sysdeps/unix/bsd/bsd4.4/freebsd/alpha/vfork.S	Tue Jul  2 00:24:12 2002
***************
*** 0 ****
--- 1,29 ----
+ /* Copyright (C) 1993, 1995, 1997, 2002 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+    The GNU C Library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+ 
+    The GNU C Library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+ 
+    You should have received a copy of the GNU Lesser General Public
+    License along with the GNU C Library; if not, write to the Free
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+ 
+ #include <sysdep.h>
+ 
+ SYSCALL__ (vfork, 0)
+ 	/* In the parent process, a4 == 0, v0 == child pid.  */
+ 	/* In the child process, a4 == 1, v0 == parent pid.  */
+ 	cmovne a4, zero, v0
+ 	ret
+ 
+ PSEUDO_END (__vfork)
+ 
+ weak_alias (__vfork, vfork)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]