A system call is the “tool” used by a software in the userspace to request a “service” to the kernel. The FreeBSD Operating System provides over 400 system calls. They are defined in syscalls.master, this file is processed by makesyscalls.lua to create: init_sysent.c, syscall.h, and so on.
The system calls list has 588 entries (15: unimplemented, 53: nosys/lkmnosys, 46: compat and 72: old/obsolete) for 15-CURRENT at the time of writing. The entry point of a system call is sys_{name}, except syscall and __syscall described below.
This table is partially auto-generated by scanning init_sysent.c and manually filled, indeed its purpose is just a personal study of the FreeBSD kernel.
Number | Name (and manual link) | Short Description | Implementation |
---|---|---|---|
0 | syscall | Indirect system call | kern/subr_syscall.c |
1 | exit | Terminate the calling process | kern/kern_exit.c |
2 | fork | Create a new process | kern/kern_fork.c |
3 | read | Read input | kern/sys_generic.c |
4 | write | Write output | kern/sys_generic.c |
5 | open | Open or create a file for reading, writing or executing | kern/vfs_syscalls.c |
6 | close | Delete a descriptor | kern/kern_descrip.c |
7 | wait4 | Wait for processes to change status | kern/kern_exit.c |
8 | [old] creat | ||
9 | link | Make a hard file link | kern/vfs_syscalls.c |
10 | unlink | Remove directory entry | kern/vfs_syscalls.c |
11 | [obsolete] execv | ||
12 | chdir | Change current working directory | kern/vfs_syscalls.c |
13 | fchdir | Change current working directory | kern/vfs_syscalls.c |
14 | [freebsd11] mknod | ||
15 | chmod | Change mode of file | kern/vfs_syscalls.c |
16 | chown | Change owner and group of a file | kern/vfs_syscalls.c |
17 | break | (no manual) | vm/vm_unix.c |
18 | [freebsd4] getfsstat | ||
19 | [old] lseek | ||
20 | getpid | Get parent or calling process identification | kern/kern_prot.c |
21 | mount | Mount or dismount a file system | kern/vfs_mount.c |
22 | unmount | Mount or dismount a file system | kern/vfs_mount.c |
23 | setuid | Set user and group ID | kern/kern_prot.c |
24 | getuid | Get user identification | kern/kern_prot.c |
25 | geteuid | Get user identification | kern/kern_prot.c |
26 | ptrace | Process tracing and debugging | kern/sys_process.c |
27 | recvmsg | Receive message(s) from a socket | kern/uipc_syscalls.c |
28 | sendmsg | Send message(s) from a socket | kern/uipc_syscalls.c |
29 | recvfrom | Receive message(s) from a socket | kern/uipc_syscalls.c |
30 | accept | Accept a connection on a socket | kern/uipc_syscalls.c |
31 | getpeername | Get name of connected peer | kern/uipc_syscalls.c |
32 | getsockname | Get socket name | kern/uipc_syscalls.c |
33 | access | Check accessibility of a file | kern/vfs_syscalls.c |
34 | chflags | Set file flags | kern/vfs_syscalls.c |
35 | fchflags | Set file flags | kern/vfs_syscalls.c |
36 | sync | Schedule file system updates | kern/vfs_syscalls.c |
37 | kill | Send signal to a process | kern/kern_sig.c |
38 | [old] stat | ||
39 | getppid | Get parent or calling process identification | kern/kern_prot.c |
40 | [old] lstat | ||
41 | dup | Duplicate an existing file descriptor | kern/kern_descrip.c |
42 | [freebsd10] pipe | ||
43 | getegid | Get group process identification | kern/kern_prot.c |
44 | profil | Control process profiling | kern/subr_prof.c |
45 | ktrace | Process tracing | kern/kern_ktrace.c |
46 | [old] sigaction | ||
47 | getgid | Get group process identification | kern/kern_prot.c |
48 | [old] sigprocmask | ||
49 | getlogin | Get login name | kern/kern_prot.c |
50 | setlogin | Set login name | kern/kern_prot.c |
51 | acct | Enable or disable process accounting | kern/kern_acct.c |
52 | [old] sigpending | ||
53 | sigaltstack | Set and/or get signal stack context | kern/kern_sig.c |
54 | ioctl | Control device | kern/sys_generic.c |
55 | reboot | Reboot system or halt processor | kern/kern_shutdown.c |
56 | revoke | Revoke file access | kern/vfs_syscalls.c |
57 | symlink | Make symbolic link to a file | kern/vfs_syscalls.c |
58 | readlink | Read value of a symbolic link | kern/vfs_syscalls.c |
59 | execve | Execute a file | kern/kern_exec.c |
60 | umask | Set file creation mode mask | kern/vfs_syscalls.c |
61 | chroot | Change root directory | kern/vfs_syscalls.c |
62 | [old] fstat | ||
63 | [old] getkerninfo | ||
64 | [old] getpagesize | ||
65 | msync | Synchronize a mapped region | vm/vm_mmap.c |
66 | vfork | Create a new process without copying the address space | kern/kern_fork.c |
67 | [obsolete] vread | ||
68 | [obsolete] vwrite | ||
69 | sbrk | change data segment size - EOPNOTSUPP | vm/vm_mmap.c |
70 | sstk | EOPNOTSUPP | vm/vm_mmap.c |
71 | [old] mmap | ||
72 | [freebsd11] vadvise | ||
73 | munmap | Remove a mapping | vm/vm_mmap.c |
74 | mprotect | Control the protection of pages | vm/vm_mmap.c |
75 | madvise | Give advice about use of memory | vm/vm_mmap.c |
76 | [obsolete] vhangup | ||
77 | [obsolete] vlimit | ||
78 | mincore | Determine residency of memory pages | vm/vm_mmap.c |
79 | getgroups | Get group access list | kern/kern_prot.c |
80 | setgroups | Set group access list | kern/kern_prot.c |
81 | getpgrp | Get process group | kern/kern_prot.c |
82 | setpgid | Set process group | kern/kern_prot.c |
83 | setitimer | Set value of interval timer | kern/kern_time.c |
84 | [old] wait | ||
85 | swapon | Control devices for interleaved paging/swapping | vm/swap_pager.c |
86 | getitimer | Get value of interval timer | kern/kern_time.c |
87 | [old] gethostname | ||
88 | [old] sethostname | ||
89 | getdtablesize | Get file descriptor limit | kern/kern_descrip.c |
90 | dup2 | Duplicate an existing file descriptor | kern/kern_descrip.c |
91 | [unimplemented] getdopt | ||
92 | fcntl | File control | kern/kern_descrip.c |
93 | select | Synchronous I/O multiplexing | kern/sys_generic.c |
94 | [unimplemented] setdopt | ||
95 | fsync | Synchronise changes to a file | kern/vfs_syscalls.c |
96 | setpriority | Set program scheduling priority | kern/kern_resource.c |
97 | socket | Create an endpoint for communication | kern/uipc_syscalls.c |
98 | connect | Initiate a connection on a socket | kern/uipc_syscalls.c |
99 | [old] accept | ||
100 | getpriority | Get program scheduling priority | kern/kern_resource.c |
101 | [old] send | ||
102 | [old] recv | ||
103 | [old] sigreturn | ||
104 | bind | Assign a local protocol address to a socket | kern/uipc_syscalls.c |
105 | setsockopt | Get and set options on sockets | kern/uipc_syscalls.c |
106 | listen | Listen for connections on a socket | kern/uipc_syscalls.c |
107 | [obsolete] vtimes | ||
108 | [old] sigvec | ||
109 | [old] sigblock | ||
110 | [old] sigsetmask | ||
111 | [old] sigsuspend | ||
112 | [old] sigstack | ||
113 | [old] recvmsg | ||
114 | [old] sendmsg | ||
115 | [obsolete] vtrace | ||
116 | gettimeofday | Get date and time | kern/kern_time.c |
117 | getrusage | Get information about resource utilization | kern/kern_resource.c |
118 | getsockopt | Get and set options on sockets | kern/uipc_syscalls.c |
119 | [unimplemented] resuba | ||
120 | readv | Read input | kern/sys_generic.c |
121 | writev | Write output | kern/sys_generic.c |
122 | settimeofday | Set date and time | kern/kern_time.c |
123 | fchown | Change owner and group of a file | kern/vfs_syscalls.c |
124 | fchmod | Change mode of file | kern/vfs_syscalls.c |
125 | [old] recvfrom | ||
126 | setreuid | Set real and effective user ID’s | kern/kern_prot.c |
127 | setregid | Set real and effective group ID | kern/kern_prot.c |
128 | rename | Change the name of a file | kern/vfs_syscalls.c |
129 | [old] truncate | ||
130 | [old] ftruncate | ||
131 | flock | Apply or remove an advisory lock on an open file | kern/kern_descrip.c |
132 | mkfifo | Make a fifo file | kern/vfs_syscalls.c |
133 | sendto | Send message(s) from a socket | kern/uipc_syscalls.c |
134 | shutdown | Disable sends and/or receives on a socket | kern/uipc_syscalls.c |
135 | socketpair | Create a pair of connected sockets | kern/uipc_syscalls.c |
136 | mkdir | Make a directory file | kern/vfs_syscalls.c |
137 | rmdir | Remove a directory file | kern/vfs_syscalls.c |
138 | utimes | Set file access and modification times | kern/vfs_syscalls.c |
139 | [obsolete] 4.2 sigreturn | ||
140 | adjtime | Correct the time to allow synchronization of the system clock | kern/kern_ntptime.c |
141 | [old] getpeername | ||
142 | [old] gethostid | ||
143 | [old] sethostid | ||
144 | [old] getrlimit | ||
145 | [old] setrlimit | ||
146 | [old] killpg | ||
147 | setsid | Create session and set process group ID | kern/kern_prot.c |
148 | quotactl | Manipulate file system quotas | kern/vfs_syscalls.c |
149 | [old] quota | ||
150 | [old] getsockname | ||
151 | [unimplemented] sem_lock | ||
152 | [unimplemented] sem_wakeup | ||
153 | [unimplemented] asyncdaemon | ||
154 | nlm_syscall | (no manual) | nlm/nlm_prot_impl.c |
155 | nfssvc | NFS services | nfs/nfs_nfssvc.c |
156 | [old] getdirentries | ||
157 | [freebsd4] statfs | ||
158 | [freebsd4] fstatfs | ||
159 | [nosys] | ||
160 | lgetfh | Get file handle | kern/vfs_syscalls.c |
161 | getfh | Get file handle | kern/vfs_syscalls.c |
162 | [freebsd4] getdomainname | ||
163 | [freebsd4] setdomainname | ||
164 | [freebsd4] uname | ||
165 | sysarch | Architecture-dependent system call | sys/ {arch}/ {arch}/ sys_machdep.c |
166 | rtprio | Examine or modify realtime or idle priority | kern/kern_resource.c |
167 | [nosys] | ||
168 | [nosys] | ||
169 | semsys | (no manual) | kern/sysv_sem.c |
170 | msgsys | (no manual) | kern/sysv_msg.c |
171 | shmsys | (no manual) | kern/sysv_shm.c |
172 | [nosys] | ||
173 | [freebsd6] pread | ||
174 | [freebsd6] pwrite | ||
175 | setfib | Set the default FIB (routing table) for the calling process | net/route/route_tables.c |
176 | ntp_adjtime | Network Time Protocol (NTP) daemon interface | kern/kern_ntptime.c |
177 | [unimplemented] sfork | ||
178 | [unimplemented] getdescriptor | ||
179 | [unimplemented] setdescriptor | ||
180 | [nosys] | ||
181 | setgid | Set user and group ID | kern/kern_prot.c |
182 | setegid | Set user and group ID | kern/kern_prot.c |
183 | seteuid | Set user and group ID | kern/kern_prot.c |
184 | [obsolete] lfs_bmapv | ||
185 | [obsolete] lfs_markv | ||
186 | [obsolete] lfs_segclean | ||
187 | [obsolete] lfs_segwait | ||
188 | [freebsd11] stat | ||
189 | [freebsd11] fstat | ||
190 | [freebsd11] lstat | ||
191 | pathconf | Get configurable pathname variables | kern/vfs_syscalls.c |
192 | fpathconf | Get configurable pathname variables | kern/kern_descrip.c |
193 | [nosys] | ||
194 | getrlimit | Control maximum system resource consumption | kern/kern_resource.c |
195 | setrlimit | Control maximum system resource consumption | kern/kern_resource.c |
196 | [freebsd11] getdirentries | ||
197 | [freebsd6] mmap | ||
198 | __syscall | Indirect system call for 64-bit args | kern/subr_syscall.c |
199 | [freebsd6] lseek | ||
200 | [freebsd6] truncate | ||
201 | [freebsd6] ftruncate | ||
202 | sysctl | Get or set system state | kern/kern_sysctl.c |
203 | mlock | Lock physical pages in memory | vm/vm_mmap.c |
204 | munlock | Unlock physical pages in memory | vm/vm_mmap.c |
205 | undelete | Attempt to recover a deleted file | kern/vfs_syscalls.c |
206 | futimes | Set file access and modification | kern/vfs_syscalls.c |
207 | getpgid | Get process group | kern/kern_prot.c |
208 | [nosys] | ||
209 | poll | Synchronous I/O multiplexing | kern/sys_generic.c |
210 | [lkmnosys] | ||
211 | [lkmnosys] | ||
212 | [lkmnosys] | ||
213 | [lkmnosys] | ||
214 | [lkmnosys] | ||
215 | [lkmnosys] | ||
216 | [lkmnosys] | ||
217 | [lkmnosys] | ||
218 | [lkmnosys] | ||
219 | [lkmnosys] | ||
220 | [freebsd7] __semctl | ||
221 | semget | Obtain a semaphore id | kern/sysv_sem.c |
222 | semop | Atomic array of operations on a semaphore set | kern/sysv_sem.c |
223 | [obsolete] semconfig | ||
224 | [freebsd7] msgctl | ||
225 | msgget | Get message queue | kern/sysv_msg.c |
226 | msgsnd | Send a message to a message queue | kern/sysv_msg.c |
227 | msgrcv | Receive a message from a message queue | kern/sysv_msg.c |
228 | shmat | Attach or detach shared memory | kern/sysv_shm.c |
229 | [freebsd7] shmctl | ||
230 | shmdt | Attach or detach shared memory | kern/sysv_shm.c |
231 | shmget | Obtain a shared memory identifier | kern/sysv_shm.c |
232 | clock_gettime | Get date and time | kern/kern_time.c |
233 | clock_settime | Set date and time | kern/kern_time.c |
234 | clock_getres | Calibrate date and time | kern/kern_time.c |
235 | ktimer_create | (no manual) | kern/kern_time.c |
236 | ktimer_delete | (no manual) | kern/kern_time.c |
237 | ktimer_settime | (no manual) | kern/kern_time.c |
238 | ktimer_gettime | (no manual) | kern/kern_time.c |
239 | ktimer_getoverrun | (no manual) | kern/kern_time.c |
240 | nanosleep | High resolution sleep | kern/kern_time.c |
241 | ffclock_getcounter | Retrieve feed-forward counter | kern/kern_ffclock.c |
242 | ffclock_setestimate | Set feed-forward clock estimates | kern/kern_ffclock.c |
243 | ffclock_getestimate | Get feed-forward clock estimates | kern/kern_ffclock.c |
244 | clock_nanosleep | High resolution sleep | kern/kern_time.c |
245 | [nosys] | ||
246 | [nosys] | ||
247 | clock_getcpuclockid2 | (no manual) | kern/kern_time.c |
248 | ntp_gettime | Network Time Protocol (NTP) daemon interface system calls | kern/kern_ntptime.c |
249 | [nosys] | ||
250 | minherit | Control the inheritance of pages | vm/vm_mmap.c |
251 | rfork | Manipulate process resources | kern/kern_fork.c |
252 | [obsolete] openbsd_poll | ||
253 | issetugid | Is current process tainted by uid or gid changes | kern/kern_prot.c |
254 | lchown | Change owner and group of a file | kern/vfs_syscalls.c |
255 | aio_read | Asynchronous read from a file (realtime) | kern/vfs_aio.c |
256 | aio_write | Asynchronous write to a file (realtime) | kern/vfs_aio.c |
257 | lio_listio | List directed I/O (realtime) | kern/vfs_aio.c |
258 | [nosys] | ||
259 | [nosys] | ||
260 | [nosys] | ||
261 | [nosys] | ||
262 | [nosys] | ||
263 | [nosys] | ||
264 | [nosys] | ||
265 | [nosys] | ||
266 | [nosys] | ||
267 | [nosys] | ||
268 | [nosys] | ||
269 | [nosys] | ||
270 | [nosys] | ||
271 | [nosys] | ||
272 | [freebsd11] getdents | ||
273 | [nosys] | ||
274 | lchmod | Change mode of file | kern/vfs_syscalls.c |
275 | [obsolete] netbsd_lchown | ||
276 | lutimes | Set file access and modification times | kern/vfs_syscalls.c |
277 | [obsolete] netbsd_msync | ||
278 | [freebsd11] nstat | ||
279 | [freebsd11] nfstat | ||
280 | [freebsd11] nlstat | ||
281 | [nosys] | ||
282 | [nosys] | ||
283 | [nosys] | ||
284 | [nosys] | ||
285 | [nosys] | ||
286 | [nosys] | ||
287 | [nosys] | ||
288 | [nosys] | ||
289 | preadv | Read input | kern/sys_generic.c |
290 | pwritev | Write output | kern/sys_generic.c |
291 | [nosys] | ||
292 | [nosys] | ||
293 | [nosys] | ||
294 | [nosys] | ||
295 | [nosys] | ||
296 | [nosys] | ||
297 | [freebsd4] fhstatfs | ||
298 | fhopen | Access file via file handle | kern/vfs_syscalls.c |
299 | [freebsd11] fhstat | ||
300 | modnext | Return the modid of the next kernel module | kern/kern_module.c |
301 | modstat | Get status of kernel module | kern/kern_module.c |
302 | modfnext | Return the modid of the next kernel module | kern/kern_module.c |
303 | modfind | Returns the modid of a kernel module | kern/kern_module.c |
304 | kldload | Load KLD files into the kernel | kern/kern_linker.c |
305 | kldunload | Unload kld files | kern/kern_linker.c |
306 | kldfind | Returns the fileid of a kld file | kern/kern_linker.c |
307 | kldnext | Return the fileid of the next kld file | kern/kern_linker.c |
308 | kldstat | Get status of kld file | kern/kern_linker.c |
309 | kldfirstmod | Return first module id from the kld file specified | kern/kern_linker.c |
310 | getsid | Get process session | kern/kern_prot.c |
311 | setresuid | Set real, effective and saved user or group ID | kern/kern_prot.c |
312 | setresgid | Set real, effective and saved user or group ID | kern/kern_prot.c |
313 | [obsolete] signanosleep | ||
314 | aio_return | Retrieve return status of asynchronous I/O operation (realtime) | kern/vfs_aio.c |
315 | aio_suspend | Suspend until asynchronous I/O operations or timeout complete (realtime) | kern/vfs_aio.c |
316 | aio_cancel | Cancel an outstanding asynchronous I/O operation (realtime) | kern/vfs_aio.c |
317 | aio_error | Retrieve error status of asynchronous I/O operation (realtime) | kern/vfs_aio.c |
318 | [freebsd6] aio_read | ||
319 | [freebsd6] aio_write | ||
320 | [freebsd6] lio_listio | ||
321 | yield | (no manual) | kern/kern_synch.c |
322 | [obsolete] thr_sleep | ||
323 | [obsolete] thr_wakeup | ||
324 | mlockall | Lock (unlock) the address space of a process | vm/vm_mmap.c |
325 | munlockall | Lock (unlock) the address space of a process | vm/vm_mmap.c |
326 | __getcwd | (getcwd(3) Get working directory pathname) | kern/vfs_cache.c |
327 | sched_setparam | Set scheduling parameters | kern/p1003_1b.c |
328 | sched_getparam | Get scheduling parameters | kern/p1003_1b.c |
329 | sched_setscheduler | Set scheduling policy and scheduler parameters | kern/p1003_1b.c |
330 | sched_getscheduler | Get scheduling policy and scheduler parameters | kern/p1003_1b.c |
331 | sched_yield | yield processor | kern/p1003_1b.c |
332 | sched_get_priority_max | Get scheduling parameter limits | kern/p1003_1b.c |
333 | sched_get_priority_min | Get scheduling parameter limits | kern/p1003_1b.c |
334 | sched_rr_get_interval | Get scheduling parameter limits | kern/p1003_1b.c |
335 | utrace | Insert user record in ktrace log | kern/kern_ktrace.c |
336 | [freebsd4] sendfile | ||
337 | kldsym | Look up address by symbol name in a KLD | kern/kern_linker.c |
338 | jail | Create and manage system jails | kern/kern_jail.c |
339 | nnpfs_syscall | (no manual) | |
340 | sigprocmask | Manipulate current signal mask | kern/kern_sig.c |
341 | sigsuspend | Atomically release blocked signals and wait for interrupt | kern/kern_sig.c |
342 | [freebsd4] sigaction | ||
343 | sigpending | Get pending signals | kern/kern_sig.c |
344 | [freebsd4] sigreturn | ||
345 | sigtimedwait | Wait for queued signals (realtime) | kern/kern_sig.c |
346 | sigwaitinfo | Wait for queued signals (realtime) | kern/kern_sig.c |
347 | __acl_get_file | (acl_get_file(3)) | kern/vfs_acl.c |
348 | __acl_set_file | (acl_set_file(3)) | kern/vfs_acl.c |
349 | __acl_get_fd | (acl_get_fd(3)) | kern/vfs_acl.c |
350 | __acl_set_fd | (acl_set_fd(3)) | kern/vfs_acl.c |
351 | __acl_delete_file | (acl_delete(3)) | kern/vfs_acl.c |
352 | __acl_delete_fd | (acl_delete(3)) | kern/vfs_acl.c |
353 | __acl_aclcheck_file | (no manual) | kern/vfs_acl.c |
354 | __acl_aclcheck_fd | (no manual) | kern/vfs_acl.c |
355 | extattrctl | (no manual) | kern/vfs_extattr.c |
356 | extattr_set_file | Manipulate VFS extended attributes | kern/vfs_extattr.c |
357 | extattr_get_file | Manipulate VFS extended attributes | kern/vfs_extattr.c |
358 | extattr_delete_file | Manipulate VFS extended attributes | kern/vfs_extattr.c |
359 | aio_waitcomplete | Wait for the next completion of an aio request | kern/vfs_aio.c |
360 | getresuid | Get real, effective and saved user or group ID | kern/kern_prot.c |
361 | getresgid | Get real, effective and saved user or group ID | kern/kern_prot.c |
362 | kqueue | Kernel event notification mechanism | kern/kern_event.c |
363 | [freebsd11] kevent | ||
364 | [obsolete] __cap_get_proc | ||
365 | [obsolete] __cap_set_proc | ||
366 | [obsolete] __cap_get_fd | ||
367 | [obsolete] __cap_get_file | ||
368 | [obsolete] __cap_set_fd | ||
369 | [obsolete] __cap_set_file | ||
370 | [nosys] | ||
371 | extattr_set_fd | Manipulate VFS extended attributes | kern/vfs_extattr.c |
372 | extattr_get_fd | Manipulate VFS extended attributes | kern/vfs_extattr.c |
373 | extattr_delete_fd | Manipulate VFS extended attributes | kern/vfs_extattr.c |
374 | __setugid | (no manual) | kern/kern_prot.c |
375 | [obsolete] nfsclnt | ||
376 | eaccess | Check accessibility of a file | kern/vfs_syscalls.c |
377 | afs3_syscall | (no manual) | |
378 | nmount | Mount or dismount a file system | kern/vfs_mount.c |
379 | [obsolete] kse_exit | ||
380 | [obsolete] kse_wakeup | ||
381 | [obsolete] kse_create | ||
382 | [obsolete] kse_thr_interrupt | ||
383 | [obsolete] kse_release | ||
384 | __mac_get_proc | (mac_get_proc(3)) | security/mac/mac_syscalls.c |
385 | __mac_set_proc | (mac_set_proc(3)) | security/mac/mac_syscalls.c |
386 | __mac_get_fd | (mac_get_fd(3)) | security/mac/mac_syscalls.c |
387 | __mac_get_file | (mac_get_file(3)) | security/mac/mac_syscalls.c |
388 | __mac_set_fd | (mac_set_fd(3)) | security/mac/mac_syscalls.c |
389 | __mac_set_file | (mac_set_file(3)) | security/mac/mac_syscalls.c |
390 | kenv | kernel environment | kern/kern_environment.c |
391 | lchflags | Set file flags | kern/vfs_syscalls.c |
392 | uuidgen | Generate universally unique identifiers | kern/kern_uuid.c |
393 | sendfile | Send a file to a socket | kern/kern_sendfile.c |
394 | mac_syscall | (no manual) | security/mac/mac_syscalls.c |
395 | [freebsd11] getfsstat | ||
396 | [freebsd11] statfs | ||
397 | [freebsd11] fstatfs | ||
398 | [freebsd11] fhstatfs | ||
399 | [nosys] | ||
400 | ksem_close | (no manual) | kern/uipc_sem.c |
401 | ksem_post | (no manual) | kern/uipc_sem.c |
402 | ksem_wait | (no manual) | kern/uipc_sem.c |
403 | ksem_trywait | (no manual) | kern/uipc_sem.c |
404 | ksem_init | (no manual) | kern/uipc_sem.c |
405 | ksem_open | (no manual) | kern/uipc_sem.c |
406 | ksem_unlink | (no manual) | kern/uipc_sem.c |
407 | ksem_getvalue | (no manual) | kern/uipc_sem.c |
408 | ksem_destroy | (no manual) | kern/uipc_sem.c |
409 | __mac_get_pid | (mac_get_pid(3)) | security/mac/mac_syscalls.c |
410 | __mac_get_link | (mac_get_link(3)) | security/mac/mac_syscalls.c |
411 | __mac_set_link | (mac_set_link(3)) | security/mac/mac_syscalls.c |
412 | extattr_set_link | Manipulate VFS extended attributes | kern/vfs_extattr.c |
413 | extattr_get_link | Manipulate VFS extended attributes | kern/vfs_extattr.c |
414 | extattr_delete_link | Manipulate VFS extended attributes | kern/vfs_extattr.c |
415 | __mac_execve | (no manual) | kern/kern_exec.c |
416 | sigaction | Software signal facilities | kern/kern_sig.c |
417 | sigreturn | Return from signal | sys/ {arch}/ {arch}/ sys_machdep.c |
418 | [unimplemented] __xstat | ||
419 | [unimplemented] __xfstat | ||
420 | [unimplemented] __xlstat | ||
421 | getcontext | Get user thread context | kern/kern_context.c |
422 | setcontext | Set user thread context | kern/kern_context.c |
423 | swapcontext | Modify and exchange user thread contexts | kern/kern_context.c |
424 | [freebsd13] swapoff | ||
425 | __acl_get_link | (acl_get(3)) | kern/vfs_acl.c |
426 | __acl_set_link | (acl_set(3)) | kern/vfs_acl.c |
427 | __acl_delete_link | (acl_delete(3)) | kern/vfs_acl.c |
428 | __acl_aclcheck_link | (no manual) | kern/vfs_acl.c |
429 | sigwait | Select a set of signals | kern/kern_sig.c |
430 | thr_create | (no manual) | kern/kern_thr.c |
431 | thr_exit | Terminate current thread | kern/kern_thr.c |
432 | thr_self | Return thread identifier for the calling thread | kern/kern_thr.c |
433 | thr_kill | Send signal to thread | kern/kern_thr.c |
434 | [freebsd10] _umtx_lock | ||
435 | [freebsd10] _umtx_unlock | ||
436 | jail_attach | Create and manage system jails | kern/kern_jail.c |
437 | extattr_list_fd | Manipulate VFS extended attributes | kern/vfs_extattr.c |
438 | extattr_list_file | Manipulate VFS extended attributes | kern/vfs_extattr.c |
439 | extattr_list_link | Manipulate VFS extended attributes | kern/vfs_extattr.c |
440 | [obsolete] kse_switchin | ||
441 | ksem_timedwait | (no manual) | kern/uipc_sem.c |
442 | thr_suspend | Suspend the calling thread | kern/kern_thr.c |
443 | thr_wake | Wake up the suspended thread | kern/kern_thr.c |
444 | kldunloadf | Unload kld files | kern/kern_linker.c |
445 | audit | Commit BSM audit record to audit log | security/audit/audit_syscalls.c |
446 | auditon | Configure system audit parameters | security/audit/audit_syscalls.c |
447 | getauid | Retrieve audit session ID | security/audit/audit_syscalls.c |
448 | setauid | Set audit session ID | security/audit/audit_syscalls.c |
449 | getaudit | Retrieve audit session state | security/audit/audit_syscalls.c |
450 | setaudit | Set audit session state | security/audit/audit_syscalls.c |
451 | getaudit_addr | Retrieve audit session state | security/audit/audit_syscalls.c |
452 | setaudit_addr | Set audit session state | security/audit/audit_syscalls.c |
453 | auditctl | Configure system audit parameters | security/audit/audit_syscalls.c |
454 | _umtx_op | Interface for implementation of userspace threading synchronization primitives | kern/kern_umtx.c |
455 | thr_new | Create new thread of execution | kern/kern_thr.c |
456 | sigqueue | Queue a signal to a process (realtime) | kern/kern_sig.c |
457 | kmq_open | (no manual) | kern/uipc_mqueue.c |
458 | kmq_setattr | (no manual) | kern/uipc_mqueue.c |
459 | kmq_timedreceive | (no manual) | kern/uipc_mqueue.c |
460 | kmq_timedsend | (no manual) | kern/uipc_mqueue.c |
461 | kmq_notify | (no manual) | kern/uipc_mqueue.c |
462 | kmq_unlink | (no manual) | kern/uipc_mqueue.c |
463 | abort2 | Abort process with diagnostics | kern/kern_exit.c |
464 | thr_set_name | Set user-visible thread name | kern/kern_thr.c |
465 | aio_fsync | Asynchronous file synchronization (realtime) | kern/vfs_aio.c |
466 | rtprio_thread | Examine or modify realtime or idle priority | kern/kern_resource.c |
467 | [nosys] | ||
468 | [nosys] | ||
469 | [unimplemented] __getpath_fromfd | ||
470 | [unimplemented] __getpath_fromaddr | ||
471 | sctp_peeloff | Detach an association from a one-to-many socket to its own fd | netinet/sctp_syscalls.c |
472 | sctp_generic_sendmsg | Send data to a peer | netinet/sctp_syscalls.c |
473 | sctp_generic_sendmsg_iov | Send data to a peer | netinet/sctp_syscalls.c |
474 | sctp_generic_recvmsg | Receive data from a peer | netinet/sctp_syscalls.c |
475 | pread | Read input | kern/sys_generic.c |
476 | pwrite | Write output | kern/sys_generic.c |
477 | mmap | Allocate memory, or map files or devices into memory | vm/vm_mmap.c |
478 | lseek | Reposition read/write file offset | kern/vfs_syscalls.c |
479 | truncate | Truncate or extend a file to a specified length | kern/vfs_syscalls.c |
480 | ftruncate | Truncate or extend a file to a specified length | kern/sys_generic.c |
481 | thr_kill2 | Send signal to thread | kern/kern_thr.c |
482 | [freebsd12] shm_open | ||
483 | shm_unlink | Shared memory object operations | kern/uipc_shm.c |
484 | cpuset | Manage CPU affinity sets | kern/kern_cpuset.c |
485 | cpuset_setid | Manage CPU affinity sets | kern/kern_cpuset.c |
486 | cpuset_getid | Manage CPU affinity sets | kern/kern_cpuset.c |
487 | cpuset_getaffinity | Manage CPU affinity | kern/kern_cpuset.c |
488 | cpuset_setaffinity | Manage CPU affinity | kern/kern_cpuset.c |
489 | faccessat | Check accessibility of a file | kern/vfs_syscalls.c |
490 | fchmodat | Change mode of file | kern/vfs_syscalls.c |
491 | fchownat | Change owner and group of a file | kern/vfs_syscalls.c |
492 | fexecve | Execute a file | kern/kern_exec.c |
493 | [freebsd11] fstatat | ||
494 | futimesat | Set file access and modification | kern/vfs_syscalls.c |
495 | linkat | Make a hard file link | kern/vfs_syscalls.c |
496 | mkdirat | Make a directory file | kern/vfs_syscalls.c |
497 | mkfifoat | Make a fifo file | kern/vfs_syscalls.c |
498 | [freebsd11] mknodat | Make a special file node | |
499 | openat | Open or create a file for reading, writing or executing | kern/vfs_syscalls.c |
500 | readlinkat | Read value of a symbolic link | kern/vfs_syscalls.c |
501 | renameat | Change the name of a file | kern/vfs_syscalls.c |
502 | symlinkat | Make symbolic link to a file | kern/vfs_syscalls.c |
503 | unlinkat | Remove directory entry | kern/vfs_syscalls.c |
504 | posix_openpt | Open a pseudo-terminal device | kern/tty_pts.c |
505 | gssd_syscall | (no manual) | kgssapi/gss_impl.c |
506 | jail_get | Create and manage system jails | kern/kern_jail.c |
507 | jail_set | Create and manage system jails | kern/kern_jail.c |
508 | jail_remove | Create and manage system jails | kern/kern_jail.c |
509 | [freebsd12] closefrom | ||
510 | __semctl | Control operations on a semaphore set | kern/sysv_sem.c |
511 | msgctl | Message control operations | kern/sysv_msg.c |
512 | shmctl | Shared memory control | kern/sysv_shm.c |
513 | lpathconf | Get configurable pathname variables | kern/vfs_syscalls.c |
514 | [obsolete] cap_new | ||
515 | __cap_rights_get | (cap_rights_get(3)) | kern/sys_capability.c |
516 | cap_enter | Capability mode system calls | kern/sys_capability.c |
517 | cap_getmode | Capability mode system calls | kern/sys_capability.c |
518 | pdfork | System calls to manage process descriptors | kern/kern_fork.c |
519 | pdkill | System calls to manage process descriptors | kern/kern_sig.c |
520 | pdgetpid | System calls to manage process descriptors | kern/sys_procdesc.c |
521 | [unimplemented] pdwait4 | ||
522 | pselect | Synchronous I/O multiplexing a la POSIX.1g | kern/sys_generic.c |
523 | getloginclass | Get login class | kern/kern_loginclass.c |
524 | setloginclass | Set login class | kern/kern_loginclass.c |
525 | rctl_get_racct | Manipulate and query the resource limits database | kern/kern_rctl.c |
526 | rctl_get_rules | Manipulate and query the resource limits database | kern/kern_rctl.c |
527 | rctl_get_limits | Manipulate and query the resource limits database | kern/kern_rctl.c |
528 | rctl_add_rule | Manipulate and query the resource limits database | kern/kern_rctl.c |
529 | rctl_remove_rule | Manipulate and query the resource limits database | kern/kern_rctl.c |
530 | posix_fallocate | Pre-allocate storage for a range in a file | kern/sys_generic.c |
531 | posix_fadvise | Give advice about use of file data | kern/vfs_syscalls.c |
532 | wait6 | Wait for processes to change status | kern/kern_exit.c |
533 | cap_rights_limit | Limit capability rights | kern/sys_capability.c |
534 | cap_ioctls_limit | Manage allowed ioctl commands | kern/sys_capability.c |
535 | cap_ioctls_get | Manage allowed ioctl commands | kern/sys_capability.c |
536 | cap_fcntls_limit | Manage allowed fcntl commands | kern/sys_capability.c |
537 | cap_fcntls_get | Manage allowed fcntl commands | kern/sys_capability.c |
538 | bindat | Assign a local protocol address to a socket | kern/uipc_syscalls.c |
539 | connectat | Initiate a connection on a socket | kern/uipc_syscalls.c |
540 | chflagsat | Set file flags | kern/vfs_syscalls.c |
541 | accept4 | Accept a connection on a socket | kern/uipc_syscalls.c |
542 | pipe2 | Create descriptor pair for interprocess communication | kern/sys_pipe.c |
543 | aio_mlock | asynchronous mlock(2) operation | kern/vfs_aio.c |
544 | procctl | Control processes | kern/kern_procctl.c |
545 | ppoll | Synchronous I/O multiplexing | kern/sys_generic.c |
546 | futimens | Set file access and modification times | kern/vfs_syscalls.c |
547 | utimensat | Set file access and modification times | kern/vfs_syscalls.c |
548 | [obsolete] numa_getaffinity | ||
549 | [obsolete] numa_setaffinity | ||
550 | fdatasync | Synchronise changes to a file | kern/vfs_syscalls.c |
551 | fstat | Get file status | kern/kern_descrip.c |
552 | fstatat | Get file status | kern/vfs_syscalls.c |
553 | fhstat | Access file via file handle | kern/vfs_syscalls.c |
554 | getdirentries | Get directory entries in a file system independent format | kern/vfs_syscalls.c |
555 | statfs | Get file system statistics | kern/vfs_syscalls.c |
556 | fstatfs | Get file system statistics | kern/vfs_syscalls.c |
557 | getfsstat | Get list of all mounted file systems | kern/vfs_syscalls.c |
558 | fhstatfs | Access file via file handle | kern/vfs_syscalls.c |
559 | mknodat | Make a special file node | kern/vfs_syscalls.c |
560 | kevent | Kernel event notification mechanism | kern/kern_event.c |
561 | cpuset_getdomain | Manage memory domain policy | kern/kern_cpuset.c |
562 | cpuset_setdomain | Manage memory domain policy | kern/kern_cpuset.c |
563 | getrandom | Get random data | kern/sys_getrandom.c |
564 | getfhat | Get file handle | kern/vfs_syscalls.c |
565 | fhlink | Make a hard file link | kern/vfs_syscalls.c |
566 | fhlinkat | Make a hard file link | kern/vfs_syscalls.c |
567 | fhreadlink | Read value of a symbolic link | kern/vfs_syscalls.c |
568 | funlinkat | Remove directory entry | kern/vfs_syscalls.c |
569 | copy_file_range | Kernel copy of a byte range from one file to another or within one file | kern/vfs_syscalls.c |
570 | sysctlbyname | Get or set system state | kern/kern_sysctl.c |
571 | shm_open2 | (no manual) | kern/uipc_shm.c |
572 | shm_rename | Shared memory object operations | kern/uipc_shm.c |
573 | sigfastblock | Controls signals blocking with a simple memory write | kern/kern_sig.c |
574 | __realpathat | (no manual) | kern/vfs_cache.c |
575 | close_range | Delete open file descriptors | kern/kern_descrip.c |
576 | rpctls_syscall | (no manual) | rpc/rpcsec_tls/rpctls_impl.c |
577 | __specialfd | (no manual) | kern/sys_generic.c |
578 | aio_writev | Asynchronous write to a file (REALTIME) | kern/vfs_aio.c |
579 | aio_readv | Asynchronous read from a file (REALTIME) | kern/vfs_aio.c |
580 | fspacectl | Space management in a file | kern/sys_generic.c |
581 | sched_getcpu | (no manual) | kern/kern_synch.c |
582 | swapoff | Control devices for interleaved paging/swapping | vm/swap_pager.c |
583 | kqueuex | Kernel event notification mechanism | kern/kern_event.c |
584 | membarrier | (no manual) | kern/kern_membarrier.c |
585 | timerfd_create | Timers with file descriptor semantics | kern/sys_timerfd.c |
586 | timerfd_gettime | Timers with file descriptor semantics | kern/sys_timerfd.c |
587 | timerfd_settime | Timers with file descriptor semantics | kern/sys_timerfd.c |
syscall and __syscall have not a sys_syscall() or sys___syscall
entry points, instead the arch-dependent implementation manages SYS_syscall
and SYS___syscall, includes
kern/subr_syscall.c
and syscallenter() dispatches the handler of the indirect system call.
Architecture | Implementation |
---|---|
amd64 | amd64/amd64/trap.c |
arm | arm/arm/syscall.c |
arm64 | arm64/arm64/trap.c |
i386 | i386/i386/trap.c |
powerpc | powerpc/powerpc/trap.c |
riscv | riscv/riscv/trap.c |
To know more
- Source Code: /src/sys/.
- Developers’ Handbook: A.3. System Calls.
- Wiki Page: Adding Syscalls.