Name Date Size

.. 2016-10-18 20:10:15 45

access.c 2010-06-24 23:54:18 3.4 KiB

acctctl.c 2008-12-05 03:16:10 14.5 KiB

acl.c 2007-12-27 20:07:48 9.2 KiB

adjtime.c 2005-06-14 09:00:00 2.9 KiB

alarm.c 2007-06-06 19:48:32 2.6 KiB

auditsys.c 2010-07-27 14:38:47 34.1 KiB

brandsys.c 2006-09-12 07:51:59 1.6 KiB

chdir.c 2010-03-05 22:16:08 5.4 KiB

chmod.c 2010-07-08 02:36:17 2 KiB

chown.c 2010-06-24 23:54:18 2.4 KiB

cladm.c 2005-06-14 09:00:00 2.5 KiB

close.c 2005-06-14 09:00:00 1.5 KiB

corectl.c 2014-08-12 20:36:36 13.4 KiB

exacctsys.c 2005-06-14 09:00:00 9.3 KiB

fcntl.c 2016-10-18 20:10:15 23.6 KiB

fdsync.c 2007-10-26 01:34:29 1.9 KiB

getcwd.c 2005-12-02 22:04:54 2.1 KiB

getdents.c 2010-07-08 02:36:17 6 KiB

getloadavg.c 2014-07-21 16:53:53 1.6 KiB

getpagesizes.c 2007-10-28 18:20:15 2.9 KiB

getpid.c 2005-06-14 09:00:00 1.4 KiB

getrandom.c 2015-04-16 16:43:18 1.8 KiB

gid.c 2008-03-03 16:48:05 6.7 KiB

groups.c 2009-11-20 20:58:43 3.2 KiB

ioctl.c 2007-10-26 01:34:29 3.8 KiB

issetugid.c 2005-06-14 09:00:00 1.2 KiB

lgrpsys.c 2016-01-05 21:38:23 51.4 KiB

link.c 2010-07-08 02:36:17 2.2 KiB

lseek.c 2007-10-26 01:34:29 9.1 KiB

lwp_create.c 2009-04-11 22:54:42 5.6 KiB

lwp_info.c 2005-06-14 09:00:00 2.1 KiB

lwp_self.c 2005-06-14 09:00:00 1.2 KiB

lwp_sobj.c 2016-03-31 01:57:24 87.4 KiB

lwp_timer.c 2009-04-10 16:14:10 6.2 KiB

lwpsys.c 2009-04-18 02:53:07 15 KiB

memcntl.c 2016-03-29 22:55:13 9.9 KiB

mkdir.c 2010-07-08 02:36:17 2.1 KiB

mknod.c 2010-07-08 02:36:17 3.1 KiB

mmapobjsys.c 2008-11-25 02:12:06 5.3 KiB

mount.c 2005-06-14 09:00:00 3.4 KiB

nice.c 2008-03-20 22:44:26 1.9 KiB

ntptime.c 2008-01-09 18:34:46 5.8 KiB

open.c 2013-04-03 23:34:56 7.8 KiB

p_online.c 2010-03-25 23:36:50 5.2 KiB

pathconf.c 2008-07-13 07:20:11 4.1 KiB

pause.c 2005-06-14 09:00:00 1.5 KiB

pgrpsys.c 2006-09-12 07:51:59 4 KiB

pipe.c 2013-04-23 22:38:06 4.6 KiB

poll.c 2015-10-16 20:59:15 78.6 KiB

ppriv.c 2010-04-28 10:01:37 10 KiB

processor_bind.c 2009-03-24 06:10:33 7.6 KiB

processor_info.c 2005-06-14 09:00:00 2 KiB

profil.c 2012-02-03 20:27:13 2.3 KiB

psecflags.c 2016-10-15 06:02:16 2.6 KiB

pset.c 2010-05-26 00:50:45 19 KiB

rctlsys.c 2015-08-27 16:03:43 28.2 KiB

readlink.c 2010-07-08 02:36:17 3.7 KiB

rename.c 2010-07-08 02:36:17 2.1 KiB

resolvepath.c 2005-06-14 09:00:00 1.6 KiB

rlimit.c 2016-01-05 21:38:23 12.2 KiB

rusagesys.c 2008-10-20 22:16:57 6.9 KiB

rw.c 2015-01-14 22:51:40 38.3 KiB

sem.c 2010-03-05 22:16:08 30.8 KiB

sendfile.c 2010-06-18 02:23:59 31.8 KiB

sidsys.c 2010-03-20 21:03:54 3.3 KiB

sigaction.c 2010-03-12 09:19:46 5 KiB

sigaltstack.c 2005-06-14 09:00:00 3.1 KiB

signotify.c 2009-08-19 05:06:58 6.3 KiB

sigpending.c 2005-06-14 09:00:00 1.9 KiB

sigprocmask.c 2010-03-12 09:19:46 3.1 KiB

sigqueue.c 2013-09-27 17:24:30 5.4 KiB

sigsendset.c 2005-06-14 09:00:00 1.7 KiB

sigsuspend.c 2005-06-14 09:00:00 1.9 KiB

sigtimedwait.c 2009-04-17 00:36:18 5.3 KiB

stat.c 2010-06-24 23:54:18 15.2 KiB

statfs.c 2006-05-24 09:01:59 4.1 KiB

statvfs.c 2006-05-24 09:01:59 8.8 KiB

strcalls.c 2005-06-14 09:00:00 11.9 KiB

symlink.c 2010-07-08 02:36:17 3.1 KiB

sync.c 2005-06-14 09:00:00 1.2 KiB

SYSCALL.README 2005-06-14 09:00:00 9.6 KiB

sysconfig.c 2013-09-27 17:24:30 5.2 KiB

sysfs.c 2005-06-14 09:00:00 3 KiB

systeminfo.c 2009-01-30 09:25:48 7.8 KiB

tasksys.c 2013-07-29 20:46:50 7.4 KiB

time.c 2005-06-14 09:00:00 1.8 KiB

times.c 2009-11-13 10:32:32 2.6 KiB

uadmin.c 2013-08-12 16:57:13 11.2 KiB

ucredsys.c 2010-03-05 22:16:08 4 KiB

uid.c 2010-04-28 10:01:37 9.6 KiB

umask.c 2007-01-19 17:10:06 1.4 KiB

umount.c 2010-03-01 03:42:20 6.3 KiB

uname.c 2005-06-14 09:00:00 1.9 KiB

unlink.c 2010-06-24 23:54:18 2 KiB

utime.c 2010-06-24 23:54:18 4.8 KiB

utssys.c 2016-01-05 21:38:23 23.1 KiB

uucopy.c 2006-09-12 07:51:59 1.3 KiB

yield.c 2005-06-14 09:00:00 1.6 KiB

SYSCALL.README

CDDL HEADER START
The contents of this file are subject to the terms of the
Common Development and Distribution License, Version 1.0 only
(the "License"). You may not use this file except in compliance
with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
or http://www.opensolaris.org/os/licensing.
See the License for the specific language governing permissions
and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each
file and include the License file at usr/src/OPENSOLARIS.LICENSE.
If applicable, add the following below this CDDL HEADER, with the
fields enclosed by brackets "[]" replaced with your own identifying
information: Portions Copyright [yyyy] [name of copyright owner]
CDDL HEADER END
Copyright 2000 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
ident "%Z%%M% %I% %E% SMI"
System Call Files
------ ---- -----
The universal dumping grounds for system calls in Solaris 2.x,
common/os/scalls.c and common/fs/vncalls.c, have been sub-divided into
smaller files.
The old files had become quite large, and contained much completely
unrelated code. From a software engineering standpoint, it didn't seem
like a good idea to permit system calls or underlying routines
to be cognizant of the internal interfaces and underlying routines
of unrelated system calls.
From a practical standpoint, recompiling all of scalls.c or vncalls.c
after making only a small change in one system call seemed like
cruel and unusual punishment. Also, running "bringover" after
changing scalls.c or vncalls.c in one's own environment had a
high probability of encountering a conflict.
In an attempt to improve maintainability, we have split these files
and created new directories to hold the results. One hopes that this
new organization will prove easier to maintain and change.
The principles listed below guided the split-up. Please try to adhere
to them if you add new system calls.
1) System calls now live in directories called "syscall". Architecture
independant system calls live in common/syscall and architecture
dependant system calls live in sparc/syscall or i86/syscall.
2) Most system calls have their own separate file. We try to keep
these files as small as possible.
3) Unrelated system calls should NEVER be put in the same file. Do
not consider any of these files "dumping grounds" for new system
call work.
4) Some files DO contain more than one system call. This occurs
under the following restricted conditions:
o System calls that are internally related, either because
they alone call a set of static functions to do the dirty
work, or because they access locally-defined static data.
The system calls in sigqueue.c and lwpsys.c are examples
of the first case; lwp_sobj.c is an example of the second.
o Fairly trivial pairs of "get-" and "set-" operation system
calls. The file rlimit.c, containing getrlimit() and
setrlimit() is a case in point.
o System calls that are basically "variations on a theme,"
such as the the different forms of stat in stat.c.
5) If a number of system calls make use of a local function, or,
if a function is used more widely than in a few system calls,
then perhaps this function needs to be moved to one of the
kernel-implementation files in common/os or common/fs. For
example, this was done with the functions namesetattr and
fdsetattr, which were used by several different system calls.
These functions were moved into common/os/fio.c, where they
seemed to fit better.
-------------------------------------------------------------------
System Call Reorganization
------ ---- --------------
The system calls in common/os/scalls.c, common/fs/vncalls.c
have been broken up into smaller files. In addition, system
calls that previously resided in <arch>/os/archdep.c have
been removed from that file. The table below describes the
manner in which the files have been split up.
The original syscall files have not been deleted, but have been
renamed to reflect their diminished contents. The file scalls.c
has been renamed to ssig.c, and vncalls.c has been renamed to
poll.c.
Syscall Entry Point Old File New File
------------------- --- ---- --- ----
gtime scalls.c common/syscall/time.c
stime scalls.c common/syscall/time.c
adjtime scalls.c common/syscall/adjtime.c
times scalls.c common/syscall/times.c
sysconfig scalls.c common/syscall/sysconfig.c
setuid scalls.c common/syscall/uid.c
getuid scalls.c common/syscall/uid.c
seteuid scalls.c common/syscall/uid.c
setgid scalls.c common/syscall/gid.c
getgid scalls.c common/syscall/gid.c
setegid scalls.c common/syscall/gid.c
getpid scalls.c common/syscall/getpid.c
setgroups scalls.c common/syscall/groups.c
getgroups scalls.c common/syscall/groups.c
setpgrp scalls.c common/syscall/pgrpsys.c
pause scalls.c common/syscall/pause.c
ssig scalls.c common/syscall/ssig.c
sigtimedwait scalls.c common/syscall/sigtimedwait.c
sigsuspend scalls.c common/syscall/sigsuspend.c
sigaltstack scalls.c common/syscall/sigaltstack.c
sigpending scalls.c common/syscall/sigpending.c
sigprocmask scalls.c common/syscall/sigprocmask.c
sigaction scalls.c common/syscall/sigaction.c
kill scalls.c common/syscall/sigqueue.c
sigqueue scalls.c common/syscall/sigqueue.c
sigsendsys scalls.c common/syscall/sigsendset.c
profil scalls.c common/syscall/profil.c
alarm scalls.c common/syscall/alarm.c
umask scalls.c common/syscall/umask.c
ulimit scalls.c common/syscall/rlimit.c
getrlimit scalls.c common/syscall/rlimit.c
setrlimit scalls.c common/syscall/rlimit.c
utssys scalls.c common/syscall/utssys.c
uname scalls.c common/syscall/uname.c
uadmin scalls.c common/syscall/uadmin.c
systeminfo scalls.c common/syscall/systeminfo.c
syslwp_create scalls.c common/syscall/lwp_create.c
syslwp_exit scalls.c common/syscall/lwp_create.c
syslwp_syspend scalls.c common/syscall/lwpsys.c
syslwp_continue scalls.c common/syscall/lwpsys.c
lwp_kill scalls.c common/syscall/lwpsys.c
lwp_wait scalls.c common/syscall/lwpsys.c
yield scalls.c common/syscall/yield.c
lwp_self scalls.c common/syscall/lwp_self.c
lwp_info scalls.c common/syscall/lwp_info.c
lwp_mutex_lock scalls.c common/syscall/lwp_sobj.c
lwp_mutex_unlock scalls.c common/syscall/lwp_sobj.c
lwp_cond_wait scalls.c common/syscall/lwp_sobj.c
lwp_cond_signal scalls.c common/syscall/lwp_sobj.c
lwp_cond_broadcast scalls.c common/syscall/lwp_sobj.c
lwp_sema_p scalls.c common/syscall/lwp_sobj.c
lwp_sema_v scalls.c common/syscall/lwp_sobj.c
open vncalls.c common/syscall/open.c
creat vncalls.c common/syscall/open.c
close vncalls.c common/syscall/close.c
read vncalls.c common/syscall/rw.c
write vncalls.c common/syscall/rw.c
pread vncalls.c common/syscall/rw.c
pwrite vncalls.c common/syscall/rw.c
readv vncalls.c common/syscall/rw.c
writev vncalls.c common/syscall/rw.c
chdir vncalls.c common/syscall/chdir.c
fchdir vncalls.c common/syscall/chdir.c
chroot vncalls.c common/syscall/chdir.c
fchroot vncalls.c common/syscall/chdir.c
mknod vncalls.c common/syscall/mknod.c
xmknod vncalls.c common/syscall/mknod.c
mkdir vncalls.c common/syscall/mkdir.c
link vncalls.c common/syscall/link.c
rename vncalls.c common/syscall/rename.c
symlink vncalls.c common/syscall/symlink.c
unlink vncalls.c common/syscall/unlink.c
rmdir vncalls.c common/syscall/rmdir.c
getdents vncalls.c common/syscall/getdents.c
lseek vncalls.c common/syscall/lseek.c
llseek vncalls.c common/syscall/lseek.c
access vncalls.c common/syscall/access.c
stat vncalls.c common/syscall/stat.c
lstat vncalls.c common/syscall/stat.c
fstat vncalls.c common/syscall/stat.c
xstat vncalls.c common/syscall/stat.c
lxstat vncalls.c common/syscall/stat.c
fxstat vncalls.c common/syscall/stat.c
fpathconf vncalls.c common/syscall/pathconf.c
pathconf vncalls.c common/syscall/pathconf.c
readlink vncalls.c common/syscall/readlink.c
chmod vncalls.c common/syscall/chmod.c
fchmod vncalls.c common/syscall/chmod.c
chown vncalls.c common/syscall/chown.c
lchown vncalls.c common/syscall/chown.c
fchown vncalls.c common/syscall/chown.c
utime vncalls.c common/syscall/utime.c
utimes vncalls.c common/syscall/utime.c
fdsync vncalls.c common/syscall/fdsync.c
fcntl vncalls.c common/syscall/fcntl.c
dup vncalls.c common/syscall/dup.c
ioctl vncalls.c common/syscall/ioctl.c
stty vncalls.c common/syscall/ioctl.c
gtty vncalls.c common/syscall/ioctl.c
poll vncalls.c common/syscall/poll.c
acl vncalls.c common/syscall/acl.c
facl vncalls.c common/syscall/acl.c
mount vfs.c common/syscall/mount.c
statfs vfs.c common/syscall/statfs.c
fstatfs vfs.c common/syscall/statfs.c
statvfs vfs.c common/syscall/statvfs.c
fstatvfs vfs.c common/syscall/statvfs.c
sync vfs.c common/syscall/sync.c
sysfs vfs.c common/syscall/sysfs.c
umount vfs.c common/syscall/umount.c
nice priocntl.c common/syscall/nice.c
pipe os/pipe.c common/syscall/pipe.c
msgsys os/msg.c common/syscall/msg.c
semsys os/sem.c common/syscall/sem.c
shmsys os/shm.c common/syscall/shm.c
getcontext sparc/archdep.c sparc/syscall/getcontext.c
lwp_getprivate sparc/archdep.c sparc/syscall/lwp_private.c
lwp_setprivate sparc/archdep.c sparc/syscall/lwp_private.c
getcontext i86/archdep.c i86/syscall/getcontext.c
lwp_getprivate i86/archdep.c i86/syscall/lwp_private.c
lwp_setprivate i86/archdep.c i86/syscall/lwp_private.c
-----------------------------------------------------------------
Most of the system calls in this directory have been converted
to use C-style argument passing, instead of the old uap-pointer
method. This usually makes the system calls faster and more
"natural" in implementation.