|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| SYSCALL.README | H A D | 14-Jun-2005 | 9.6 KiB | 307 | 206 |
| access.c | H A D | 19-Aug-2010 | 3.4 KiB | 153 | 97 |
| acctctl.c | H A D | 05-Dec-2008 | 14.5 KiB | 642 | 447 |
| acl.c | H A D | 26-Dec-2019 | 9.1 KiB | 360 | 256 |
| adjtime.c | H A D | 19-Sep-2022 | 2.8 KiB | 107 | 58 |
| alarm.c | H A D | 23-Dec-2022 | 2.5 KiB | 97 | 45 |
| auditsys.c | H A D | 26-Feb-2022 | 34.4 KiB | 1,469 | 1,054 |
| brandsys.c | H A D | 23-Dec-2022 | 1.5 KiB | 55 | 18 |
| chdir.c | H A D | 05-Mar-2010 | 5.4 KiB | 246 | 155 |
| chmod.c | H A D | 26-Jan-2022 | 1.9 KiB | 83 | 40 |
| chown.c | H A D | 19-Aug-2010 | 2.4 KiB | 99 | 56 |
| cladm.c | H A D | 09-Feb-2023 | 2.4 KiB | 99 | 44 |
| close.c | H A D | 14-Jun-2005 | 1.5 KiB | 59 | 17 |
| corectl.c | H A D | 26-Feb-2022 | 13.4 KiB | 562 | 402 |
| exacctsys.c | H A D | 21-Oct-2018 | 9.2 KiB | 405 | 299 |
| fcntl.c | H A D | 23-Jul-2024 | 24.4 KiB | 976 | 651 |
| fdsync.c | H A D | 13-Jul-2024 | 2 KiB | 80 | 36 |
| getcwd.c | H A D | 27-Feb-2021 | 2.8 KiB | 97 | 36 |
| getdents.c | H A D | 19-Aug-2010 | 6 KiB | 239 | 151 |
| getloadavg.c | H A D | 16-Jul-2014 | 1.6 KiB | 59 | 23 |
| getpagesizes.c | H A D | 23-Dec-2022 | 2.9 KiB | 121 | 82 |
| getpid.c | H A D | 23-Dec-2022 | 1.4 KiB | 54 | 21 |
| getrandom.c | H A D | 13-Dec-2018 | 1.9 KiB | 81 | 46 |
| gid.c | H A D | 23-Dec-2022 | 6.6 KiB | 297 | 206 |
| groups.c | H A D | 20-Nov-2009 | 3.2 KiB | 147 | 93 |
| ioctl.c | H A D | 23-Dec-2022 | 3.7 KiB | 167 | 101 |
| issetugid.c | H A D | 23-Dec-2022 | 1.2 KiB | 39 | 6 |
| lgrpsys.c | H A D | 26-Dec-2019 | 51.4 KiB | 2,129 | 1,233 |
| link.c | H A D | 19-Aug-2010 | 2.2 KiB | 86 | 43 |
| lseek.c | H A D | 23-Dec-2022 | 9 KiB | 378 | 240 |
| lwp_create.c | H A D | 30-May-2021 | 5.4 KiB | 209 | 108 |
| lwp_info.c | H A D | 23-Dec-2022 | 2.1 KiB | 78 | 38 |
| lwp_self.c | H A D | 14-Jun-2005 | 1.2 KiB | 40 | 11 |
| lwp_sobj.c | H A D | 12-Sep-2021 | 87.4 KiB | 3,233 | 2,122 |
| lwp_timer.c | H A D | 10-Apr-2009 | 6.2 KiB | 227 | 146 |
| lwpsys.c | H A D | 26-Dec-2019 | 15.1 KiB | 641 | 428 |
| memcntl.c | H A D | 26-Dec-2019 | 9.9 KiB | 411 | 264 |
| mkdir.c | H A D | 19-Aug-2010 | 2.1 KiB | 85 | 43 |
| mknod.c | H A D | 19-Aug-2010 | 3.1 KiB | 116 | 61 |
| mmapobjsys.c | H A D | 25-Nov-2008 | 5.3 KiB | 214 | 148 |
| mount.c | H A D | 23-Dec-2022 | 3.3 KiB | 136 | 63 |
| nice.c | H A D | 23-Dec-2022 | 1.9 KiB | 70 | 31 |
| ntptime.c | H A D | 15-Dec-2021 | 6.3 KiB | 237 | 110 |
| open.c | H A D | 23-Jul-2024 | 8 KiB | 350 | 217 |
| p_online.c | H A D | 20-May-2019 | 5.5 KiB | 277 | 161 |
| pathconf.c | H A D | 23-Dec-2022 | 4.1 KiB | 157 | 79 |
| pause.c | H A D | 23-Dec-2022 | 1.4 KiB | 54 | 19 |
| pgrpsys.c | H A D | 23-Dec-2022 | 3.9 KiB | 172 | 123 |
| pipe.c | H A D | 23-Jul-2024 | 4.8 KiB | 222 | 125 |
| poll.c | H A D | 10-Oct-2022 | 79.9 KiB | 3,100 | 1,843 |
| ppriv.c | H A D | 28-Apr-2010 | 10 KiB | 422 | 256 |
| processor_bind.c | H A D | 24-Mar-2009 | 7.6 KiB | 380 | 277 |
| processor_info.c | H A D | 14-Jun-2005 | 2 KiB | 72 | 31 |
| profil.c | H A D | 03-Feb-2012 | 2.3 KiB | 95 | 46 |
| psecflags.c | H A D | 26-Dec-2019 | 2.6 KiB | 123 | 84 |
| pset.c | H A D | 25-Sep-2023 | 19 KiB | 878 | 683 |
| rctlsys.c | H A D | 26-Feb-2022 | 28.2 KiB | 1,058 | 678 |
| readlink.c | H A D | 19-Aug-2010 | 3.7 KiB | 145 | 91 |
| rename.c | H A D | 19-Aug-2010 | 2.1 KiB | 81 | 39 |
| resolvepath.c | H A D | 14-Jun-2005 | 1.6 KiB | 61 | 30 |
| rlimit.c | H A D | 21-Dec-2015 | 12.2 KiB | 486 | 302 |
| rusagesys.c | H A D | 20-Oct-2008 | 6.9 KiB | 264 | 194 |
| rw.c | H A D | 24-Jan-2017 | 40.4 KiB | 1,729 | 1,274 |
| sem.c | H A D | 05-Mar-2010 | 30.8 KiB | 1,218 | 811 |
| sendfile.c | H A D | 04-Jul-2022 | 32.2 KiB | 1,383 | 1,035 |
| sidsys.c | H A D | 20-Mar-2010 | 3.3 KiB | 169 | 108 |
| sigaction.c | H A D | 12-Mar-2010 | 5 KiB | 227 | 156 |
| sigaltstack.c | H A D | 23-Dec-2022 | 3 KiB | 119 | 68 |
| signotify.c | H A D | 19-Aug-2009 | 6.3 KiB | 282 | 197 |
| sigpending.c | H A D | 23-Dec-2022 | 1.8 KiB | 70 | 37 |
| sigprocmask.c | H A D | 12-Mar-2010 | 3.1 KiB | 133 | 78 |
| sigqueue.c | H A D | 24-Jun-2013 | 5.4 KiB | 209 | 127 |
| sigsendset.c | H A D | 23-Dec-2022 | 1.7 KiB | 66 | 29 |
| sigsuspend.c | H A D | 23-Dec-2022 | 1.8 KiB | 65 | 31 |
| sigtimedwait.c | H A D | 17-Apr-2009 | 5.3 KiB | 209 | 140 |
| stat.c | H A D | 26-Feb-2022 | 15.2 KiB | 631 | 465 |
| statfs.c | H A D | 23-Dec-2022 | 4 KiB | 164 | 102 |
| statvfs.c | H A D | 23-Dec-2022 | 8.8 KiB | 369 | 256 |
| strcalls.c | H A D | 23-Dec-2022 | 11.9 KiB | 535 | 425 |
| symlink.c | H A D | 19-Aug-2010 | 3.1 KiB | 119 | 77 |
| sync.c | H A D | 23-Dec-2022 | 1.1 KiB | 38 | 11 |
| sysconfig.c | H A D | 09-Nov-2016 | 5.4 KiB | 234 | 132 |
| sysfs.c | H A D | 23-Dec-2022 | 3 KiB | 136 | 73 |
| systeminfo.c | H A D | 01-May-2020 | 8 KiB | 374 | 258 |
| tasksys.c | H A D | 18-Apr-2013 | 7.4 KiB | 299 | 176 |
| time.c | H A D | 23-Dec-2022 | 1.7 KiB | 78 | 40 |
| times.c | H A D | 13-Nov-2009 | 2.6 KiB | 101 | 51 |
| uadmin.c | H A D | 18-Apr-2024 | 12 KiB | 497 | 312 |
| ucredsys.c | H A D | 05-Mar-2010 | 4 KiB | 207 | 136 |
| uid.c | H A D | 28-Apr-2010 | 9.6 KiB | 408 | 270 |
| umask.c | H A D | 23-Dec-2022 | 1.3 KiB | 51 | 16 |
| umount.c | H A D | 01-Mar-2010 | 6.3 KiB | 195 | 68 |
| uname.c | H A D | 23-Dec-2022 | 1.8 KiB | 60 | 28 |
| unlink.c | H A D | 19-Aug-2010 | 2 KiB | 83 | 41 |
| utime.c | H A D | 19-Aug-2010 | 4.8 KiB | 212 | 156 |
| utssys.c | H A D | 21-Dec-2015 | 23.1 KiB | 953 | 560 |
| uucopy.c | H A D | 23-Dec-2022 | 1.3 KiB | 58 | 22 |
| yield.c | H A D | 23-Dec-2022 | 1.5 KiB | 59 | 22 |
SYSCALL.README
1
2CDDL HEADER START
3
4The contents of this file are subject to the terms of the
5Common Development and Distribution License, Version 1.0 only
6(the "License"). You may not use this file except in compliance
7with the License.
8
9You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10or http://www.opensolaris.org/os/licensing.
11See the License for the specific language governing permissions
12and limitations under the License.
13
14When distributing Covered Code, include this CDDL HEADER in each
15file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16If applicable, add the following below this CDDL HEADER, with the
17fields enclosed by brackets "[]" replaced with your own identifying
18information: Portions Copyright [yyyy] [name of copyright owner]
19
20CDDL HEADER END
21
22Copyright 2000 Sun Microsystems, Inc. All rights reserved.
23Use is subject to license terms.
24
25ident "%Z%%M% %I% %E% SMI"
26
27System Call Files
28------ ---- -----
29
30The universal dumping grounds for system calls in Solaris 2.x,
31common/os/scalls.c and common/fs/vncalls.c, have been sub-divided into
32smaller files.
33
34The old files had become quite large, and contained much completely
35unrelated code. From a software engineering standpoint, it didn't seem
36like a good idea to permit system calls or underlying routines
37to be cognizant of the internal interfaces and underlying routines
38of unrelated system calls.
39
40From a practical standpoint, recompiling all of scalls.c or vncalls.c
41after making only a small change in one system call seemed like
42cruel and unusual punishment. Also, running "bringover" after
43changing scalls.c or vncalls.c in one's own environment had a
44high probability of encountering a conflict.
45
46In an attempt to improve maintainability, we have split these files
47and created new directories to hold the results. One hopes that this
48new organization will prove easier to maintain and change.
49
50The principles listed below guided the split-up. Please try to adhere
51to them if you add new system calls.
52
53
541) System calls now live in directories called "syscall". Architecture
55 independant system calls live in common/syscall and architecture
56 dependant system calls live in sparc/syscall or i86/syscall.
57
582) Most system calls have their own separate file. We try to keep
59 these files as small as possible.
60
613) Unrelated system calls should NEVER be put in the same file. Do
62 not consider any of these files "dumping grounds" for new system
63 call work.
64
654) Some files DO contain more than one system call. This occurs
66 under the following restricted conditions:
67
68 o System calls that are internally related, either because
69 they alone call a set of static functions to do the dirty
70 work, or because they access locally-defined static data.
71 The system calls in sigqueue.c and lwpsys.c are examples
72 of the first case; lwp_sobj.c is an example of the second.
73
74 o Fairly trivial pairs of "get-" and "set-" operation system
75 calls. The file rlimit.c, containing getrlimit() and
76 setrlimit() is a case in point.
77
78 o System calls that are basically "variations on a theme,"
79 such as the the different forms of stat in stat.c.
80
815) If a number of system calls make use of a local function, or,
82 if a function is used more widely than in a few system calls,
83 then perhaps this function needs to be moved to one of the
84 kernel-implementation files in common/os or common/fs. For
85 example, this was done with the functions namesetattr and
86 fdsetattr, which were used by several different system calls.
87 These functions were moved into common/os/fio.c, where they
88 seemed to fit better.
89
90-------------------------------------------------------------------
91System Call Reorganization
92------ ---- --------------
93
94The system calls in common/os/scalls.c, common/fs/vncalls.c
95have been broken up into smaller files. In addition, system
96calls that previously resided in <arch>/os/archdep.c have
97been removed from that file. The table below describes the
98manner in which the files have been split up.
99
100The original syscall files have not been deleted, but have been
101renamed to reflect their diminished contents. The file scalls.c
102has been renamed to ssig.c, and vncalls.c has been renamed to
103poll.c.
104
105
106Syscall Entry Point Old File New File
107------------------- --- ---- --- ----
108gtime scalls.c common/syscall/time.c
109stime scalls.c common/syscall/time.c
110
111adjtime scalls.c common/syscall/adjtime.c
112
113times scalls.c common/syscall/times.c
114
115sysconfig scalls.c common/syscall/sysconfig.c
116
117setuid scalls.c common/syscall/uid.c
118getuid scalls.c common/syscall/uid.c
119seteuid scalls.c common/syscall/uid.c
120
121setgid scalls.c common/syscall/gid.c
122getgid scalls.c common/syscall/gid.c
123setegid scalls.c common/syscall/gid.c
124
125getpid scalls.c common/syscall/getpid.c
126
127setgroups scalls.c common/syscall/groups.c
128getgroups scalls.c common/syscall/groups.c
129
130setpgrp scalls.c common/syscall/pgrpsys.c
131
132pause scalls.c common/syscall/pause.c
133
134ssig scalls.c common/syscall/ssig.c
135
136sigtimedwait scalls.c common/syscall/sigtimedwait.c
137
138sigsuspend scalls.c common/syscall/sigsuspend.c
139
140sigaltstack scalls.c common/syscall/sigaltstack.c
141
142sigpending scalls.c common/syscall/sigpending.c
143
144sigprocmask scalls.c common/syscall/sigprocmask.c
145
146sigaction scalls.c common/syscall/sigaction.c
147
148kill scalls.c common/syscall/sigqueue.c
149sigqueue scalls.c common/syscall/sigqueue.c
150
151sigsendsys scalls.c common/syscall/sigsendset.c
152
153profil scalls.c common/syscall/profil.c
154
155alarm scalls.c common/syscall/alarm.c
156
157umask scalls.c common/syscall/umask.c
158
159ulimit scalls.c common/syscall/rlimit.c
160getrlimit scalls.c common/syscall/rlimit.c
161setrlimit scalls.c common/syscall/rlimit.c
162
163utssys scalls.c common/syscall/utssys.c
164
165uname scalls.c common/syscall/uname.c
166
167uadmin scalls.c common/syscall/uadmin.c
168
169systeminfo scalls.c common/syscall/systeminfo.c
170
171syslwp_create scalls.c common/syscall/lwp_create.c
172syslwp_exit scalls.c common/syscall/lwp_create.c
173
174syslwp_syspend scalls.c common/syscall/lwpsys.c
175syslwp_continue scalls.c common/syscall/lwpsys.c
176lwp_kill scalls.c common/syscall/lwpsys.c
177lwp_wait scalls.c common/syscall/lwpsys.c
178
179yield scalls.c common/syscall/yield.c
180
181lwp_self scalls.c common/syscall/lwp_self.c
182
183lwp_info scalls.c common/syscall/lwp_info.c
184
185lwp_mutex_lock scalls.c common/syscall/lwp_sobj.c
186lwp_mutex_unlock scalls.c common/syscall/lwp_sobj.c
187lwp_cond_wait scalls.c common/syscall/lwp_sobj.c
188lwp_cond_signal scalls.c common/syscall/lwp_sobj.c
189lwp_cond_broadcast scalls.c common/syscall/lwp_sobj.c
190lwp_sema_p scalls.c common/syscall/lwp_sobj.c
191lwp_sema_v scalls.c common/syscall/lwp_sobj.c
192
193open vncalls.c common/syscall/open.c
194creat vncalls.c common/syscall/open.c
195
196close vncalls.c common/syscall/close.c
197
198read vncalls.c common/syscall/rw.c
199write vncalls.c common/syscall/rw.c
200pread vncalls.c common/syscall/rw.c
201pwrite vncalls.c common/syscall/rw.c
202readv vncalls.c common/syscall/rw.c
203writev vncalls.c common/syscall/rw.c
204
205chdir vncalls.c common/syscall/chdir.c
206fchdir vncalls.c common/syscall/chdir.c
207chroot vncalls.c common/syscall/chdir.c
208fchroot vncalls.c common/syscall/chdir.c
209
210mknod vncalls.c common/syscall/mknod.c
211xmknod vncalls.c common/syscall/mknod.c
212
213mkdir vncalls.c common/syscall/mkdir.c
214
215link vncalls.c common/syscall/link.c
216
217rename vncalls.c common/syscall/rename.c
218
219symlink vncalls.c common/syscall/symlink.c
220
221unlink vncalls.c common/syscall/unlink.c
222
223rmdir vncalls.c common/syscall/rmdir.c
224
225getdents vncalls.c common/syscall/getdents.c
226
227lseek vncalls.c common/syscall/lseek.c
228llseek vncalls.c common/syscall/lseek.c
229
230access vncalls.c common/syscall/access.c
231
232stat vncalls.c common/syscall/stat.c
233lstat vncalls.c common/syscall/stat.c
234fstat vncalls.c common/syscall/stat.c
235xstat vncalls.c common/syscall/stat.c
236lxstat vncalls.c common/syscall/stat.c
237fxstat vncalls.c common/syscall/stat.c
238
239fpathconf vncalls.c common/syscall/pathconf.c
240pathconf vncalls.c common/syscall/pathconf.c
241
242readlink vncalls.c common/syscall/readlink.c
243
244chmod vncalls.c common/syscall/chmod.c
245fchmod vncalls.c common/syscall/chmod.c
246
247chown vncalls.c common/syscall/chown.c
248lchown vncalls.c common/syscall/chown.c
249fchown vncalls.c common/syscall/chown.c
250
251utime vncalls.c common/syscall/utime.c
252utimes vncalls.c common/syscall/utime.c
253
254fdsync vncalls.c common/syscall/fdsync.c
255
256fcntl vncalls.c common/syscall/fcntl.c
257
258dup vncalls.c common/syscall/dup.c
259
260ioctl vncalls.c common/syscall/ioctl.c
261stty vncalls.c common/syscall/ioctl.c
262gtty vncalls.c common/syscall/ioctl.c
263
264poll vncalls.c common/syscall/poll.c
265
266acl vncalls.c common/syscall/acl.c
267facl vncalls.c common/syscall/acl.c
268
269mount vfs.c common/syscall/mount.c
270
271statfs vfs.c common/syscall/statfs.c
272fstatfs vfs.c common/syscall/statfs.c
273
274statvfs vfs.c common/syscall/statvfs.c
275fstatvfs vfs.c common/syscall/statvfs.c
276
277sync vfs.c common/syscall/sync.c
278
279sysfs vfs.c common/syscall/sysfs.c
280
281umount vfs.c common/syscall/umount.c
282
283nice priocntl.c common/syscall/nice.c
284
285pipe os/pipe.c common/syscall/pipe.c
286
287msgsys os/msg.c common/syscall/msg.c
288
289semsys os/sem.c common/syscall/sem.c
290
291shmsys os/shm.c common/syscall/shm.c
292
293getcontext sparc/archdep.c sparc/syscall/getcontext.c
294lwp_getprivate sparc/archdep.c sparc/syscall/lwp_private.c
295lwp_setprivate sparc/archdep.c sparc/syscall/lwp_private.c
296
297getcontext i86/archdep.c i86/syscall/getcontext.c
298lwp_getprivate i86/archdep.c i86/syscall/lwp_private.c
299lwp_setprivate i86/archdep.c i86/syscall/lwp_private.c
300
301-----------------------------------------------------------------
302
303Most of the system calls in this directory have been converted
304to use C-style argument passing, instead of the old uap-pointer
305method. This usually makes the system calls faster and more
306"natural" in implementation.
307