History log of /src/sys/kern/syscalls.master
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
# 1.316 09-Oct-2024 christos

Make semtimedop modular.


# 1.315 05-Oct-2024 mlelstv

New syscall requires SYSVSEM build option.


# 1.314 03-Oct-2024 christos

Add semtimedop GSoC 2024 (Shivraj Jamgade)


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base
# 1.313 20-May-2024 christos

branches: 1.313.2;
Rename dup3110 to dup3100 to match historical practice for NetBSD-11,
because we already have kevent100. Fix compat_dup3 to belong in compat_100
not compat_110.


# 1.312 19-May-2024 christos

version dup3


Revision tags: thorpej-ifq-base thorpej-altq-separation-base
# 1.311 28-Jul-2023 christos

Add epoll(2) from Theodore Preduta as part of GSoC 2023


# 1.310 10-Jul-2023 christos

Add memfd_create(2) from GSoC 2023 by Theodore Preduta


Revision tags: netbsd-10-1-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
# 1.309 01-Nov-2021 thorpej

Use "stack_t" instead of "struct sigaltstack", as the former is the
newer standardized name. NFC.


# 1.308 19-Sep-2021 thorpej

Add native implementations of eventfd(2) and timerfd(2), compatible with
the Linux interfaces of the same name.


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base
# 1.307 02-Nov-2020 christos

PR/55777: Ruslan Nikolaev: Make clock_getcpuclockid2 accessible from rump


# 1.306 14-Aug-2020 riastradh

branches: 1.306.2;
New system call getrandom() compatible with Linux and others.

Three ways to call:

getrandom(p, n, 0) Blocks at boot until full entropy.
Returns up to n bytes at p; guarantees
up to 256 bytes even if interrupted
after blocking. getrandom(0,0,0)
serves as an entropy barrier: return
only after system has full entropy.

getrandom(p, n, GRND_INSECURE) Never blocks. Guarantees up to 256
bytes even if interrupted. Equivalent
to /dev/urandom. Safe only after
successful getrandom(...,0),
getrandom(...,GRND_RANDOM), or read
from /dev/random.

getrandom(p, n, GRND_RANDOM) May block at any time. Returns up to n
bytes at p, but no guarantees about how
many -- may return as short as 1 byte.
Equivalent to /dev/random. Legacy.
Provided only for source compatibility
with Linux.

Can also use flags|GRND_NONBLOCK to fail with EWOULDBLOCK/EAGAIN
without producing any output instead of blocking.

- The combination GRND_INSECURE|GRND_NONBLOCK is the same as
GRND_INSECURE, since GRND_INSECURE never blocks anyway.

- The combinations GRND_INSECURE|GRND_RANDOM and
GRND_INSECURE|GRND_RANDOM|GRND_NONBLOCK are nonsensical and fail
with EINVAL.

As proposed on tech-userlevel, tech-crypto, tech-security, and
tech-kern, and subsequently adopted by core (minus the getentropy part
of the proposal, because other operating systems and participants in
the discussion couldn't come to an agreement about getentropy and
blocking semantics):

https://mail-index.netbsd.org/tech-userlevel/2020/05/02/msg012333.html


# 1.305 16-May-2020 christos

Add ACL support for FFS. From FreeBSD.


# 1.304 26-Apr-2020 thorpej

Due to a collision with another upcoming change, relocate the futex calls
to the 3 free slots at 166-168.


# 1.303 26-Apr-2020 thorpej

Add a NetBSD native futex implementation, mostly written by riastradh@.
Map the COMPAT_LINUX futex calls to the native ones.


Revision tags: bouyer-xenpvh-base2
# 1.302 22-Apr-2020 thorpej

Remove _lwp_gettid(2) system call. This problem is going to be solved
another way. (Note: this call was never exposed in libc, so we can just
recycle the syscall number.)


Revision tags: phil-wifi-20200421 bouyer-xenpvh-base1
# 1.301 12-Apr-2020 christos

put back the MODULAR attributes accidentally removed.


# 1.300 12-Apr-2020 christos

change ' \t' to '\t'


# 1.299 12-Apr-2020 christos

Change STD[:random-whitespace:]RUMP to STD\tRUMP


Revision tags: phil-wifi-20200411 bouyer-xenpvh-base phil-wifi-20200406
# 1.298 04-Apr-2020 thorpej

branches: 1.298.2;
Add support for lazily generating a "global thread ID" for a LWP. This
identifier uniquely identifies an LWP across the entire system, and will
be used in future improvements in user-space synchronization primitives.

(Test disabled and libc stub not included intentionally so as to avoid
multiple libc version bumps.)


Revision tags: is-mlppp-base ad-namecache-base3 ad-namecache-base2
# 1.297 21-Jan-2020 pgoyette

Split the compat_50 module into two, separating the QUOTA-related
stuff from the rest of the module. This allows loading of the
(main) compat_50 module on kernels that don't include ``options
QUOTA''.

Welcome to 9.99.40 !

Addresses PR kern/54875


Revision tags: ad-namecache-base1 ad-namecache-base phil-wifi-20191119
# 1.296 22-Sep-2019 christos

branches: 1.296.2;
Add a new member to struct vfsstat and grow the unused members
The new member is caled f_mntfromlabel and it is the dkw_wname
of the corresponding wedge. This is now used by df -W to display
the mountpoint name as NAME=


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 netbsd-9-base
# 1.295 18-Jun-2019 christos

remove XXX from the quota call.


Revision tags: phil-wifi-20190609 isaki-audio2-base
# 1.294 27-Jan-2019 pgoyette

Merge the [pgoyette-compat] branch


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
# 1.293 31-Jul-2018 rjs

Add getsockopt2() syscall.


Revision tags: pgoyette-compat-0728
# 1.292 12-Jul-2018 maxv

Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.


Revision tags: phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.291 06-Jan-2018 kamil

branches: 1.291.2; 1.291.4;
Revert vadvise(2) removal

This system call was used in legacy Lisp code, that was inherited to modern
age and still compiled against supported compat layers (e.g. in clisp,
oaklisp, Franz Lisp).

It used to instruct the kernel about paging policy (G/C aware, flush etc).

Newly compiled code (assuming that it will detect vadvise()) will use the
libc stub for vadvise(). The headers for this interface are gone.

vadvise(2) could be marked as COMPAT_80, but as long as we support ultrix,
sunos or aout68k ABI, don't bother with this.

Requested by <mrg>


# 1.290 19-Dec-2017 kamil

Drop SYS_vadvise

The (o)vadvise syscall is dummy since the beginning of NetBSD.

It is an obsolete remnant from the old UNIX.

Sponsored by <The NetBSD Foundation>


# 1.289 19-Dec-2017 kamil

Drop SYS_sbrk

sbrk - change data segment size

This syscall is dummy since the inception of the project.

Sponsored by <The NetBSD Foundation>


# 1.288 19-Dec-2017 kamil

Drop the sstk(2) syscall stub

sstk - change stack section size

This functionality has never been implemented and is a remnant from 16-bit
UNIX. This stub appeared with the first NetBSD commit.

Sponsored by <The NetBSD Foundation>


# 1.287 08-Dec-2017 christos

make _lwp_park return the remaining time to sleep in the "ts" argument
if it is a relative timestamp, as discussed in tech-kern.
XXX: pullup-8


Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104
# 1.286 02-Nov-2016 pgoyette

* Split sys/kern/sys_process.c into three parts:
1 - ptrace(2) syscall for native emulation
2 - common ptrace(2) syscall code (shared with compat_netbsd32)
3 - support routines that are shared with PROCFS and/or KTRACE

* Add module glue for #1 and #2. Both modules will be built-in to the
kernel if "options PTRACE" is included in the config file (this is
the default, defined in sys/conf/std).

* Mark the ptrace(2) syscall as modular in syscalls.master (generated
files will be committed shortly).

* Conditionalize all remaining portions of PTRACE code on a new kernel
option PTRACE_HOOKS.

XXX Instead of PROCFS depending on 'options PTRACE', we should probably
just add a procfs attribute to the sys/kern/sys_process.c file's
entry in files.kern, and add PROCFS to the "#if defineds" for
process_domem(). It's really confusing to have two different ways
of requiring this file.


Revision tags: nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907
# 1.285 03-Jul-2016 christos

branches: 1.285.2;
GSoC 2016 Charles Cui: Implement thread priority protection based on work
by Andy Doran. Also document the get/set pshared thread calls as not
implemented, and add a skeleton implementation that is disabled.
XXX: document _sched_protect(2).


Revision tags: nick-nhusb-base-20160529
# 1.284 23-Apr-2016 christos

Add clock_getcpuclockid2(2) as well as CLOCK_{PROCESS,THREAD}_CPUTIME_ID.


Revision tags: nick-nhusb-base-20160422
# 1.283 03-Apr-2016 christos

include <sys/idtype.h>


# 1.282 02-Apr-2016 christos

add wait6


Revision tags: nick-nhusb-base-20160319 nick-nhusb-base-20151226
# 1.281 03-Dec-2015 pgoyette

Merge the compat_sysv module into the sysv_ipc module - it should
never have been a separate module in the first place (my bad).

Adjust dependencies as appropriate.


# 1.280 10-Oct-2015 pgoyette

Correctly mark syscalls 301, 302, 303 so that they will autoload the
compat_sysv module if not already built-in.


# 1.279 02-Oct-2015 christos

PR/50295: clock_nanotime() should not set errno, but return the error.


Revision tags: nick-nhusb-base-20150921
# 1.278 18-Jun-2015 pooka

+RUMP to __posix_{,f,l}chown. at least python wants them.


Revision tags: nick-nhusb-base-20150606
# 1.277 13-May-2015 pgoyette

Update syscalls to point to the new module. (Regen of dependant
files to follow.)


# 1.276 10-May-2015 pgoyette

Split the SYSV* compat code out into a separate compat_sysv module.

For monolithic kernels, both modules will be compiled as "built-ins",
while modular environments will be able to load the SYSVSEM, SYSVSHM,
and SYSVMSG code independant from the rest of compat.

This is a necessary precursor step to making the "STD" SYSV* code
into a separate module.

Tested in both monolithic and modular environments with no errors
seen.


# 1.275 09-May-2015 pgoyette

Remove extraneous word 'compat' on header line


# 1.274 09-May-2015 pgoyette

Teach makesyscalls.sh how to auto-generate the list of syscalls that
can be resolved by module auto-load.

Update syscalls.master to identify the specific module that contains
the auto-loadable code for each syscall.


# 1.273 08-Apr-2015 justin

Add __posix_rename as a rump syscall


Revision tags: nick-nhusb-base-20150406
# 1.272 22-Feb-2015 christos

PR/49684: Pierre Pronchery: readlinkat(2) return type is wrong.


# 1.271 10-Feb-2015 martin

Mark posix_fallocate as NOERR


Revision tags: nick-nhusb-base netbsd-7-base tls-earlyentropy-base tls-maxphys-base
# 1.270 25-Jul-2014 dholland

branches: 1.270.2; 1.270.4;
Add fdiscard and posix_fallocate syscalls.


# 1.269 12-Jun-2014 joerg

Avoid using C++ keywords as argument name.


Revision tags: yamt-pagecache-base9 rmind-smpnet-nbase rmind-smpnet-base
# 1.268 09-Apr-2014 pooka

rump kernel wrappers for aio syscalls


Revision tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
# 1.267 14-Mar-2014 pooka

branches: 1.267.2;
Add rump kernel syscall wrapper flag for a bunch of time-related
syscalls (nanosleep, clock_gettime, etc.). These are mostly intended
for situations where a rump kernel runs on an OS-less host.


# 1.266 11-Dec-2013 pooka

create rump kernel wrapper for utrace() too


# 1.265 09-Dec-2013 pooka

Create rump kernel wrappers for {f,}ktrace


# 1.264 17-Oct-2013 njoly

Change mknodat(2) device argument type from uint32_t to dev_t.
Adds needed extra PAD argument for 64bit alignment, and libc wrapper.


# 1.263 30-Aug-2013 pooka

There is absolutely no way that fexecve() could even theoretically work
in a rump kernel, so don't create a wrapper for that.

recv/sendmmsg(), however, can, so create wrappers for those.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.262 29-Mar-2013 christos

branches: 1.262.4;
Centralize the computation of struct timespec to the int timo.
Make lwp_park take the regular arguments for specifying what kind
of timeout we supply like clock_nanosleep(), namely clockid_t and flags.


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.261 02-Oct-2012 christos

kernel portion of clock_nanosleep()


# 1.260 22-Jun-2012 christos

branches: 1.260.2;
Add {send,recv}mmsg from Linux


Revision tags: jmcneill-usbmp-base10 yamt-pagecache-base5
# 1.259 05-May-2012 christos

Add a new type of syscall "EXTERN" which is meant for modules that live
outside the tree (in pkgsrc). Use it to define afssys (210) which has
been reserved for years, and make it autoload the "openafs" module.


Revision tags: jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7
# 1.258 08-Mar-2012 joerg

Add entry for _ksem_timedwait.


Revision tags: jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3
# 1.257 19-Feb-2012 matt

Use void * instead of sa_upcall_t for sa_register (since sa_upcall_t is
going away).


# 1.256 19-Feb-2012 matt

Make SA syscalls as COMPAT_60


# 1.255 19-Feb-2012 rmind

Make SA calls obsolete (use stubs in kern case, as libc needs them for now).


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base2 netbsd-6-base
# 1.254 11-Feb-2012 martin

branches: 1.254.2;
Add a posix_spawn syscall, as discussed on tech-kern.
Based on the summer of code project by Charles Zhang, heavily reworked
later by me - all bugs are likely mine.
Ok: core, releng.


# 1.253 01-Feb-2012 dholland

Change the syscall API for quotas over to the new non-proplib one.

- struct vfs_quotactl_args -> struct quotactl_args
- add sys/stdint.h to sys/quotactl.h for clean userland build
- install sys/quotactl.h in /usr/include
- update set lists for same
- add new marshalling code in libquota
- add new unmarshalling code in vfs_syscalls.c
- discard proplib interpreter code in vfs_quotactl.c
- add dispatching code for the 14 quotactl ops in vfs_quotactl.c
- mark the proplib quotactl syscall obsolete
- add a new syscall number for the new quotactl syscall
- change the name of the syscall to __quotactl()
- remove the decl of the old quotactl from quota/quotaprop.h
- add a decl of the new quotactl to sys/quotactl.h
- update the libc build
- update ktruss
- remove proplib marshalling code from libquota
- update copy of syscall table in gdb ppc sources
- hack rumphijack to accomodate new quotactl name (as I recall,
pooka wanted such a name change to simplify something, but I
don't really see what/how)

This change appears to require a kernel version bump for rumpish
reasons.


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.252 17-Aug-2011 manu

branches: 1.252.2; 1.252.6;
Add futimens(2) and part of utimnsat(2)


# 1.251 08-Aug-2011 manu

First stage of support for Extended API set 2. Most of the think is
unimplemented, except enough of linkat(2) to hardlink to a symlink.

Everything new in headers is guarded #ifdef _INCOMPLETE_XOPEN_C063 since
some software (e.g.: xcvs in our own tree) will assume they can use openat(2)
when AT_FDCWD is defined. _INCOMPLETE_XOPEN_C063 will go away once support
will be completed.


# 1.250 18-Jul-2011 drochner

make the data arguments of *setxattr(2) const, as in Linux
(is this an official NetBSD API or should it be COMPAT_LINUX only?)


# 1.249 26-Jun-2011 christos

- syscalls that takes socklen_t arguments should do so.
- add pipe2, dup3, paccept, kqueue1


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base rmind-uvmplock-base
# 1.248 09-Mar-2011 pooka

actually, revert previous for now. quotactl doesn't play with the
same rules as all the other compat functions.


# 1.247 09-Mar-2011 pooka

mark old quotactl rump too


# 1.246 06-Mar-2011 bouyer

merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.


Revision tags: bouyer-quota2-nbase
# 1.245 21-Feb-2011 pooka

Add syscall type NOERR which signals that a system call is STD but
does not return an errno the usual way. The main use case is to
fix the posix_fadvise() rump stub (yes, posix_fadvise is a bit
special... bologna).

The list of NOERR syscalls currently matches the libc NOERR list
(and the libc Makefile can in the future be autogenerated from this
info).

Problem spotted by, *shocker*, the automated test runs, specifically
the posix_fadvise test.


# 1.244 21-Feb-2011 pooka

somehow i've missed preadv/pwritev from rump-relevant syscalls


Revision tags: bouyer-quota2-base
# 1.243 31-Jan-2011 christos

make syscalls match documentation as far as pid_t goes.


# 1.242 17-Jan-2011 pooka

branches: 1.242.2;
Missed pselect50 in previous (file was open in editor ... d0h).
Add mknod50 and fhstat50 too.


# 1.241 17-Jan-2011 pooka

Mark a few 5.0 COMPAT syscalls as RUMP now that it's possible


Revision tags: jruoho-x86intr-base
# 1.240 10-Jan-2011 christos

branches: 1.240.2;
implement sigqueueinfo


Revision tags: matt-mips64-premerge-20101231
# 1.239 11-Nov-2010 pooka

rump posix_fadvise()


Revision tags: uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11
# 1.238 07-Sep-2010 pooka

getcwd for rump


# 1.237 06-Sep-2010 pooka

rump umask


# 1.236 30-Aug-2010 pooka

RUMP syscalls for kern_prot.c interfaces


Revision tags: uebayasi-xip-base2 yamt-nfs-mp-base10
# 1.235 10-Jun-2010 pooka

rump stubs for _ksem*


# 1.234 04-Jun-2010 njoly

Rumpify pathconf(2)/fpathconf(2)

ok from pooka@


Revision tags: uebayasi-xip-base1
# 1.233 21-Apr-2010 pooka

make get/setrlimit as rump-capable


Revision tags: yamt-nfs-mp-base9
# 1.232 02-Mar-2010 pooka

branches: 1.232.2;
Make lfs syscalls loadable. This nukes fs_lfs.h & #ifdef LFS.
(I don't mind if someone wants to go further and OBSOL them).


Revision tags: uebayasi-xip-base matt-premerge-20091211
# 1.231 26-Nov-2009 pooka

branches: 1.231.2;
pipe +RUMP


# 1.230 26-Nov-2009 pooka

modctl +RUMP


Revision tags: yamt-nfs-mp-base8 yamt-nfs-mp-base7 jymxensuspend-base jym-xensuspend-nbase
# 1.229 21-Jul-2009 pooka

+fhopen, +fhstatvfs1 RUMP


# 1.228 19-Jul-2009 rmind

Make POSIX message queues a kernel module.


Revision tags: yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4
# 1.227 15-May-2009 pooka

Use argname PAD to signal that an argument is used only for padding
and not part of the C interface. Use this information for rump
syscalls to generate syscall interfaces without the extra parameter.


Revision tags: yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 jym-xensuspend-base nick-hppapmap-base
# 1.226 28-Mar-2009 pooka

mark a bunch of syscalls as RUMP


# 1.225 19-Mar-2009 pooka

make mount() a rump call


# 1.224 18-Mar-2009 pooka

kqueue and kevent for rump


Revision tags: nick-hppapmap-base2
# 1.223 13-Feb-2009 apb

Use "defopt MODULAR" in sys/conf/files, and #include "opt_modular.h"
in all kernel sources that use the MODULAR option.
Proposed in tech-kern on 18 Jan 2009.


# 1.222 26-Jan-2009 pooka

branches: 1.222.2;
Tag a few more socket syscalls with RUMP:
recvmsg, sendmsg, recvfrom, getpeername, getsockname, sendto,
shutdown, socketpair


Revision tags: mjf-devfs2-base
# 1.221 13-Jan-2009 pooka

Convert the syscalls.master to a format from which it is easier
to parse and generate the compat name and basename (e.g. __stat50
and stat). Use this to autogenerate __RENAME()'s to the rump_syscalls
header so that they can be called e.g. rump_sys_socket() instead
of rump_sys___socket30().


# 1.220 11-Jan-2009 christos

fix lutimes.


# 1.219 11-Jan-2009 christos

merge christos-time_t


Revision tags: haad-dm-base2 haad-nbase2 ad-audiomp2-base christos-time_t-nbase haad-dm-base christos-time_t-base
# 1.218 26-Nov-2008 pooka

RUMP some syscalls required by nfsd.


# 1.217 21-Nov-2008 pooka

document modular. no functional change.


# 1.216 19-Nov-2008 ad

Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime


# 1.215 14-Nov-2008 ad

Make POSIX AIO loadable as a module.


# 1.214 14-Nov-2008 ad

Replace semid_t with intptr_t. No function change. This is a libc/kernel
private interface and so the name change should not affect any third
party code.


# 1.213 12-Nov-2008 ad

Allow the POSIX semaphore code to be loaded as a module.


# 1.212 12-Nov-2008 ad

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.


Revision tags: netbsd-5-1-5-RELEASE netbsd-5-1-4-RELEASE netbsd-5-1-3-RELEASE netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 haad-dm-base1
# 1.211 16-Oct-2008 pooka

branches: 1.211.2; 1.211.4; 1.211.8;
One more rump syscall: ioctl (required for interface configuration)


# 1.210 15-Oct-2008 pooka

Mark a few network-related calls as RUMP (needs more work)


# 1.209 15-Oct-2008 wrstuden

Merge wrstuden-revivesa into HEAD.


Revision tags: wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2
# 1.208 01-Aug-2008 pooka

rumpify sys___sysctl


Revision tags: simonb-wapbl-nbase simonb-wapbl-base
# 1.207 16-Jul-2008 pooka

rumpalooza sys_fsync


# 1.206 07-Jul-2008 pooka

branches: 1.206.2;
Expose utimes() and lutimes() to rump.

from Arnaud Ysmal


# 1.205 01-Jul-2008 pooka

Adjust rump syscalls: remove a few pointless ones and add a few
missing ones.


Revision tags: wrstuden-revivesa-base-1 wrstuden-revivesa-base
# 1.204 17-Jun-2008 tsutsui

Include <sys/sched.h> before <sys/syscallargs.h> for cpuset_t.


Revision tags: yamt-pf42-base4
# 1.203 16-Jun-2008 christos

typo


# 1.202 16-Jun-2008 christos

adjust prototypes for the affinity calls.


Revision tags: yamt-pf42-base3
# 1.201 29-May-2008 pooka

branches: 1.201.2;
Mark pread/pwrite rump syscalls.

from Arnaud Ysmal


Revision tags: hpcarm-cleanup-nbase yamt-pf42-base2 yamt-nfs-mp-base2 yamt-nfs-mp-base
# 1.200 24-Apr-2008 ad

branches: 1.200.2; 1.200.4;
- Retire SYCALL_MPSAFE. With the exceptions of darwin and irix emulations,
all system calls are now MPSAFE.
- Remove unneeded acquire/release of kernel_lock.


# 1.199 21-Apr-2008 ad

Make ntp, pmc, reboot, sysarch, time syscalls MPSAFE.


# 1.198 21-Apr-2008 ad

Acquire kernel_lock directly in LFS syscalls.


# 1.197 21-Apr-2008 ad

timer fixes for PR 37093:

- Fix serious concurrency problems, making the code MT and MP safe in
the process.
- Don't allocate memory or inspect process state from hardclock().


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.196 27-Mar-2008 ad

branches: 1.196.2; 1.196.4;
Put kqueue/kevent back as MPSAFE.


Revision tags: ad-socklock-base1
# 1.195 24-Mar-2008 yamt

after yamt-lazymbuf merge, mark send/recv syscalls MPSAFE.
pointed out by Andrew Doran.


# 1.194 24-Mar-2008 yamt

merge yamt-lazymbuf branch.


Revision tags: yamt-lazymbuf-base15 yamt-lazymbuf-base14
# 1.193 22-Mar-2008 ad

Unmark kevent/kqueue as MPSAFE. There seems to be some kind of deadlock
involving kernel_lock.


# 1.192 21-Mar-2008 ad

Mark kqueue/kevent MPSAFE.


Revision tags: keiichi-mipv6-nbase keiichi-mipv6-base matt-armv6-nbase
# 1.191 11-Mar-2008 pooka

Generate syscalls entry points which can be called directly without
going through a syscall trap. These are currently useful for rumps.
As all the standard syscalls are not compiled into librump, mark
relevant ones with RUMP in syscalls.master. To do e.g. a mkdir
"system call" from a rump, one would call

rump_sys_mkdir("/dir", mode, &eval);

where the last value represents something to store errno into.


Revision tags: hpcarm-cleanup-base
# 1.190 24-Feb-2008 martin

Desupport compatibility for the old posix_fadvise syscall per yamt's
request and just ignore it.


Revision tags: nick-net80211-sync-base mjf-devfs-base
# 1.189 15-Feb-2008 ad

branches: 1.189.2; 1.189.6;
Mark mount/unmount MPSAFE. PR kern/38034.


# 1.188 09-Feb-2008 yamt

from rmind@,
- revert struct sched_param changes to restore ABI.
- instead, add 'policy' arguments to _sched_{get,set}param syscalls.
(this is an API/ABI change.)
- correct kauth_authorize_process arguments.

while i'm here,
- don't bother to kmem_alloc for 4-byte structure.


# 1.187 27-Jan-2008 martin

Version the posix_fadvise syscall and add the missing "pad" argument,
so that it does not only work on i386 (no padding) and 64bit archs (all
args padded to 64bit).


# 1.186 25-Jan-2008 ad

Mark the extattr syscalls MPSAFE.


Revision tags: bouyer-xeni386-nbase bouyer-xeni386-base
# 1.185 16-Jan-2008 ad

Pull in my modules code for review/test/hacking.


# 1.184 15-Jan-2008 rmind

Implementation of processor-sets, affinity and POSIX real-time extensions.
Add schedctl(8) - a program to control scheduling of processes and threads.

Notes:
- This is supported only by SCHED_M2;
- Migration of LWP mechanism will be revisited;

Proposed on: <tech-kern>. Reviewed by: <ad>.


Revision tags: matt-armv6-base
# 1.183 07-Jan-2008 ad

More MPSAFE syscalls.


# 1.182 02-Jan-2008 ad

Merge vmlocking2 to head.


Revision tags: vmlocking2-base3
# 1.181 20-Dec-2007 dsl

Convert all the system call entry points from:
int foo(struct lwp *l, void *v, register_t *retval)
to:
int foo(struct lwp *l, const struct foo_args *uap, register_t *retval)
Fixup compat code to not write into 'uap' and (in some cases) to actually
pass a correctly formatted 'uap' structure with the right name to the
next routine.
A few 'compat' routines that just call standard ones have been deleted.
All the 'compat' code compiles (along with the kernels required to test
build it).
98% done by automated scripts.


Revision tags: yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.180 12-Nov-2007 ad

branches: 1.180.2; 1.180.6;
Add _lwp_ctl() system call: provides a bidirectional, per-LWP communication
area between processes and the kernel.


# 1.179 09-Nov-2007 dsl

Add the 'args' argument to sys_syscall and sys___syscall.


# 1.178 07-Nov-2007 ad

Add _lwp_setname, _lwp_getname. Proposed on tech-kern.


Revision tags: nick-csl-alignment-base5 jmcneill-base yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base vmlocking-base
# 1.177 07-Sep-2007 rmind

branches: 1.177.4; 1.177.6;
Implementation of POSIX message queues.

Reviewed by: <ad>, <tech-kern>


# 1.176 15-Aug-2007 ad

branches: 1.176.2;
- Update for ktrace changes.
- Mark a few more syscalls MPSAFE.


# 1.175 07-Aug-2007 ad

- Fix a bug with _lwp_park() where if the computed wakeup time was under
1 microsecond into the future, the thread could enter an untimed sleep.
- Change the signature of _lwp_park() to accept an lwpid_t and second
hint pointer, but do so in a way that remains compatible with older
pthread libraries. This can be used to wake another thread before the
calling thread goes asleep, saving at least one syscall + involuntary
context switch. This turns out to be a fairly large win on the condvar
benchmarks that I have tried.
- Mark some more syscalls MP safe.


# 1.174 07-Aug-2007 ad

wait() can't yet be MPSAFE since it's impractical to hold proclist_mutex
across exit(), and so there is a short race against cv_wait_sig(). This
can be reverted when proclist_mutex/proclist_lock merge.


# 1.173 07-Aug-2007 ad

gettimeofday() doesn't need locks, and MySQL seems to make heavy use of it.


Revision tags: matt-mips64-base
# 1.172 04-Aug-2007 ad

branches: 1.172.2;
Mark the SysV semaphore syscalls MP safe.


Revision tags: nick-csl-alignment-base
# 1.171 17-Jul-2007 joerg

branches: 1.171.2; 1.171.6;
Add native mremap system call based on the UVM implementation for
Linux compat. Add code to enforce alignment of the new location.
Special thanks to wizd for helping with the man page.


# 1.170 14-Jul-2007 dsl

Add sys___mount50() that includes an extra parameter for thre data length.
Mark sys_mount() as COMPAT_40.
Hmmm... the aio calls should have started at 400, not 399.
I've left 407-409 free.


Revision tags: yamt-idlelwp-base8 mjf-ufs-trans-base
# 1.169 30-Apr-2007 rmind

Import of POSIX Asynchronous I/O.
Seems to be quite stable. Some work still left to do.

Please note, that syscalls are not yet MP-safe, because
of the file and vnode subsystems.

Reviewed by: <tech-kern>, <ad>


Revision tags: thorpej-atomic-base
# 1.168 06-Mar-2007 drochner

branches: 1.168.2; 1.168.4;
make the first argument to profil(2) char*, for consistency with <unistd.h>


# 1.167 04-Mar-2007 christos

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: ad-audiomp-base
# 1.166 26-Feb-2007 drochner

sync with lwp.h: _lwp_unpark_all() returns ssize_t


# 1.165 10-Feb-2007 ad

branches: 1.165.2;
A quick hack to get things building again: put back the SA system calls
with no arguments, and alias them to sys_nosys. To be revisited.


# 1.164 10-Feb-2007 ad

Fix arguments to _lwp_park/unpark/unpark_all to match userland.


Revision tags: post-newlock2-merge
# 1.163 09-Feb-2007 ad

Merge newlock2 to head.


Revision tags: newlock2-nbase newlock2-base
# 1.162 16-Jan-2007 ad

Add sched_yield().


# 1.161 16-Jan-2007 ad

Add prototypes for: _lwp_kill, _lwp_detach, _lwp_park, _lwp_unpark,
_lwp_unpark_all, sched_yield.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 yamt-splraiseipl-base2 netbsd-4-base
# 1.160 17-Oct-2006 christos

according to the manual, the last argument of quotactl(2) is a void *,
not a caddr_t.


Revision tags: yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 rpaulo-netinet-merge-pcb-base
# 1.159 01-Sep-2006 matt

branches: 1.159.2; 1.159.4;
Don't conditionalize *sys_ptrace. The lack of sys_ptrace will be dealt
with differently.


# 1.158 30-Aug-2006 matt

Add || defined(_KERNEL) to ptrace entry (like ktrace).


# 1.157 29-Aug-2006 matt

Make PTRACE and COREDUMP optional. Make the default (status quo) by putting
them in conf/std.


Revision tags: abandoned-netbsd-4-base yamt-pdpolicy-base7
# 1.156 31-Jul-2006 martin

Step 1 to make filehandles completely opaque to userland


# 1.155 13-Jul-2006 martin

Fix alignement problems for fhandle_t, exposed by gcc4.1.

While touching all vptofh/fhtovp functions, get rid of VFS_MAXFIDSIZ,
version the getfh(2) syscall and explicitly pass the size available in
the filehandle from userland.

Discussed on tech-kern, with lots of help from yamt (thanks!).


# 1.154 26-Jun-2006 mrg

version the socket(2) syscall. for compat30 socket, we use
EPROTONOSUPPORT instead of EAFNOSUPPORT.

from pavel@ with a little bit of clean up from myself.

XXX: netbsd32 (and perhaps other emulations) should be able
XXX: to call the standard socket calls for this i think, but
XXX: revisit this at another time.


Revision tags: yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base chap-midi-base simonb-timecounters-base
# 1.153 29-May-2006 drochner

branches: 1.153.2;
Extend "struct ntptimeval" for the needs of "timecounters".
Allocate a new syscall for ntp_gettime() and set up COMPAT_30 for
the old one.


Revision tags: yamt-pdpolicy-base5 elad-kernelauth-base
# 1.152 04-May-2006 christos

branches: 1.152.2;
fhstat needs to be versioned too (for ino_t). Pointed out by Izumi Tsutsui


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.151 24-Feb-2006 drochner

branches: 1.151.2; 1.151.4; 1.151.6;
constify the __sysctl() kernel side


Revision tags: ktrace-lwp-base
# 1.150 29-Nov-2005 yamt

branches: 1.150.2; 1.150.4; 1.150.6;
merge yamt-readahead branch.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base
# 1.149 26-Sep-2005 christos

branches: 1.149.6;
some of the extattr syscalls return ssize_t not int.


# 1.148 19-Aug-2005 christos

64 bit inode changes.


# 1.147 10-Jul-2005 thorpej

Add Linux-compatible {,fl}{get,set,list}xattr() system call interface
to the VFS extended attribute subsystem.


# 1.146 29-May-2005 christos

branches: 1.146.2;
Argument for swapctl cannot be const, since it gets loaded with swap
statistics.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 yamt-km-base4 yamt-km-base3 netbsd-3-base kent-audio2-base
# 1.145 25-Feb-2005 matt

Add pselect and pollts


# 1.144 19-Feb-2005 matt

Add placeholders for sys_pselect and sys_pollts


Revision tags: yamt-km-base2 yamt-km-base kent-audio1-beforemerge
# 1.143 02-Jan-2005 thorpej

branches: 1.143.2; 1.143.4;
Add the system call and VFS infrastructure for file system extended
attributes.

From FreeBSD.


Revision tags: kent-audio1-base
# 1.142 10-May-2004 kleink

POSIX-2001: Change readlink(2)'s return type from int to ssize_t.


# 1.141 27-Apr-2004 kleink

POSIX-2001: Add restrict keywords to gettimeofday(2) and setitimer(2);
further deprecate struct timezone usage by changing `tzp' argument to
gettimeofday() to void *; align utimes(2) declaration by changing `times`
argument from struct timeval * to struct timeval[2]. From Murray
Armfield in PR standards/25331.

In due curse, reflect these changes in futimes(2), lutimes(2), and
settimeofday(2).


# 1.140 25-Apr-2004 kleink

POSIX-2001: Change the `who' argument to [gs]etpriority(2) from int
to id_t. Partially addressing PR standards/25216 from Murray Armfield.


# 1.139 21-Apr-2004 christos

Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.138 26-Mar-2004 drochner

all ports define __HAVE_SIGINFO now, so remove the CPP conditionals


# 1.137 14-Mar-2004 cl

g/c sys_sa_unblockyield which has been unused since 2004/01/02


# 1.136 29-Jan-2004 tsarna

uuidgen(2) syscall. Originally from FreeBSD, ported by John Franklin in
PR#23470, with minor updates by me. This is only the syscall support
from that PR, for now.

Changes: port over fix from FreeBSD for multicast address generation.
Changed bcopy to memcpy. For now, #ifdef notyet the portions of
kern_uuid.c that are meant to be used by (currently nonexistent) other
things in the kernel. Added syscall to COMPAT_FREEBSD as well, though
that's currently not useful, as any program new enough to use this call
also uses other syscalls we don't (yet) emulate.


# 1.135 02-Jan-2004 cl

kernel part of no-syscall upcall stack return: libpthread registers
an offset between ss_sp and struct sa_stackinfo_t (located in struct
__pthread_st) when calling sa_register. The kernel increments the
sast_gen counter in struct sastack when an upcall stack is used.
libpthread increments the sasi_stackgen counter in struct
sa_stackinfo_t when an upcall stack is freed. The kernel compares the
two counters to decide if a stack is free or in use.

- add struct sa_stackinfo_t with sasi_stackgen to count stack use in
userland
- add sast_gen to struct sastack to count stack use in kernel
- add SA_FLAG_STACKINFO to enable the stackinfo_offset argument in the
sa_register syscall
- add sa_stackinfo_offset to struct sadata for offset between ss_sp
and struct sa_stackinfo_t
- add ssize_t stackinfo_offset argument to sa_register, initialize
struct sadata's sa_stackinfo_offset from it if SA_FLAG_STACKINFO is
set
- add sa_getstack, sa_getstack0, sa_stackused and sa_setstackfree
functions to find/use/free upcall stacks and use these where
appropriate
- don't record stack for upcall in sa_upcall0
- pass sau to sa_switchcall instead of l2 (l2 = curlwp in sa_switchcall)
- add sa_vp_blocker to struct sadata to pass recently blocked lwp to
sa_switchcall
- delay finding a stack for blocked upcalls to sa_switchcall
- add sa_stacknext to struct sadata pointing to next most likely free
upcall stack; also g/c sa_stackslist in struct sadata and sast_list
in struct sastack
- add L_SA_WOKEN flag: LWP is on sa_woken queue
- add L_SA_RECYCLE flag: LWP should be recycled in sa_setwoken
- replace l_upcallstack with L_SA_WOKEN/L_SA_RECYCLE/L_SA_BLOCKING
flags
- g/c now unused sast_blocker in struct sastack
- make sa_switchcall, sa_upcall0 and sa_upcall_getstate static in
kern_sa.c
- call sa_upcall_userret only once in userret
- split sa_makeupcalls out of sa_upcall_userret and use to process
the sa_upcalls queue
- on process exit: mark LWPs sleeping in saunblock interruptible; also
there are no LWPs sleeping on l->l_upcallstack anymore; also clear
sa_wokenq_head to prevent unblocked upcalls

additional changes:
- cleanup timerupcall sa_vp == curlwp check
- add check in sa_yield if we didn't block on our way here and we
wouldn't any longer be the LWP on the VP
- invalidate sa_vp_ofaultaddr after resolving pagefault


# 1.134 15-Nov-2003 thorpej

Kernel portion of the fsync_range(2) system call. Written by Bill
Studenmund, and contributed by Wasabi Systems, Inc.


# 1.133 30-Sep-2003 christos

#ifdef _LIBC the semid_t syscalls since we don't define semid_t in userland
except in the libc case.
XXX: Should we define __semid_t instead and make those visible from userland
again? Only ktrace and syscall() get affected.


# 1.132 26-Sep-2003 matt

Constify __sigaction_sigtramp argument 'void * tramp'.


# 1.131 23-Sep-2003 christos

__sigaction14 should have been COMPAT_16 a while ago. GC it now.


# 1.130 16-Sep-2003 cl

fix SA/pthread pagefault failure:
- prevent BLOCKED upcalls on double page faults and during upcalls
- make libpthread handle blocked threads which hold locks
- prevent UNBLOCKED upcalls from overtaking their BLOCKED upcall
this adds a new syscall sa_unblockyield
see also http://mail-index.netbsd.org/tech-kern/2003/09/15/0020.html


# 1.129 10-Sep-2003 christos

we don't need sigreturn and sigcode glue if we are not compat_16 anymore.


# 1.128 18-Mar-2003 christos

branches: 1.128.2;
_lwp_setprivate returns void


# 1.127 15-Feb-2003 jdolecek

add __sigtimedwait(2) - wait for specified set of signals, with optional
timeout
the semantics of 'timeout' parameter differ to POSIX for the syscall
(not const, may be modified by kernel if interrupted from the wait) -
libc will provide appropriate wrapper

since sigwaitinfo(2) will be implemented as wrapper around sigtimedwait()
too, remove it's reserved slot and move sigqueue slot 'up', freeing
slot #246


# 1.126 24-Jan-2003 thorpej

Reserve slots for the p1003.1b scheduler system calls.


# 1.125 24-Jan-2003 thorpej

Reserve slots for p1003.1b message queue calls.


# 1.124 24-Jan-2003 thorpej

Allocate a slot for _ksem_timedwait(), although it is not currently
implemented.


# 1.123 23-Jan-2003 thorpej

Allow the _ksem_*() syscalls to be properly seen by ktruss/kdump.


# 1.122 20-Jan-2003 christos

sys_ksem -> sys__ksem


# 1.121 20-Jan-2003 christos

actually, remove ksem.h


# 1.120 20-Jan-2003 christos

semaphore.h -> ksem.h


# 1.119 20-Jan-2003 christos

add support for p1003.1b semaphores. From FreeBSD


# 1.118 18-Jan-2003 thorpej

Merge the nathanw_sa branch.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base
# 1.117 19-Dec-2002 thorpej

Reserve syscall slots for sigwaitinfo(2), sigtimedwait(2), and
sigqueue(2).


Revision tags: gmcgarry_ctxsw_base gmcgarry_ucred_base kqueue-aftermerge
# 1.116 23-Oct-2002 jdolecek

merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe


Revision tags: kqueue-beforemerge kqueue-base
# 1.115 04-Sep-2002 jdolecek

claim syscall slots for kqueue(2) and kevent(2)


Revision tags: gehenna-devsw-base
# 1.114 28-Aug-2002 gmcgarry

MI kernel support for user-level Restartable Atomic Sequences (RAS).


# 1.113 07-Aug-2002 briggs

New syscalls: sys_pmc_get_info and sys_pmc_control.


# 1.112 04-Jul-2002 thorpej

Add kernel support for having userland provide the signal trampoline:

* struct sigacts gets a new sigact_sigdesc structure, which has the
sigaction and the trampoline/version. Version 0 means "legacy kernel
provided trampoline". Other versions are coordinated with machine-
dependent code in libc.
* sigaction1() grows two more arguments -- the trampoline pointer and
the trampoline version.
* A new __sigaction_sigtramp() system call is provided to register a
trampoline along with a signal handler.
* The handler is no longer passed to sensig() functions. Instead,
sendsig() looks up the handler by peeking in the sigacts for the
process getting the signal (since it has to look in there for the
trampoline anyway).
* Native sendsig() functions now select the appropriate trampoline and
its arguments based on the trampoline version in the sigacts.

Changes to libc to use the new facility will be checked in later. Kernel
version not bumped; we will ride the 1.6C bump made recently.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.111 03-May-2002 eeh

branches: 1.111.2;
Use #if defined(_LP64) to determine if we're generating 64-bit binaries,
not #if defined(alpha).


Revision tags: eeh-devprop-base newlock-base ifpoll-base thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.110 01-Jul-2001 thorpej

branches: 1.110.2;
Linux-compatible clone(2) system call, lifted from the Linux
compatibility module. Based on patches from Bang Jun-Young <bjy@mogua.org>.


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.109 10-Apr-2001 kleink

Slight indentation nit.


# 1.108 27-Jan-2001 thorpej

branches: 1.108.2;
getpid(2), our first MP-safe syscall!


# 1.107 08-Jan-2001 nathanw

Reserve system call slots for getcontext, setcontext, LWPs, and
scheduler activations.


# 1.106 05-Jan-2001 jdolecek

utrace(2): rename 'id' parameter to 'label'


# 1.105 28-Dec-2000 jdolecek

add utrace(2) - this syscall allows to add user ktrace entries
idea from FreeBSD, but added argument (const char *id) so that it's possible
to differentiate between entries from different sources


# 1.104 09-Dec-2000 mycroft

Define 3 new functions:
* sys_getpid_with_ppid()
* sys_getuid_with_euid()
* sys_getgid_with_egid()
that do the retval[1] hack. Use them when COMPAT_43 is defined.


# 1.103 09-Dec-2000 mycroft

Add the %% separators.


# 1.102 07-Aug-2000 bjh21

Changes to syscalls.master to exclude ntp_adjtime(2) entirely if NTP is not
defined. Changes to other files will follow in a moment.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
# 1.101 21-Apr-2000 minoura

Add native issetugid() call.
Implementation from compat/freebsd.


# 1.100 17-Apr-2000 mrg

implement lchflags(2), which does the chflags(2) dance without following
symlinks, and thus can operate on symlinks. remove a bogus comment in
chflags(1) that claims symlinks do not have file flags.

XXX: todo -- make chflags(1) use lchflags(2) when given the right options.


Revision tags: chs-ubc2-newbase
# 1.99 31-Jan-2000 christos

__semctl13 -> ____semctl13 because this now is not called directly.
The fourth argument to it is a pointer to union semun not union semun,
because passing structs and unions to syscalls cannot be handled portably.


# 1.98 23-Jan-2000 mycroft

Use proper varargs format for __semctl13.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base fvdl-softdep-base
# 1.97 25-Aug-1999 thorpej

branches: 1.97.2;
Overhaul of the SVID IPC facilities, primarily to use the types specified
by the Single UNIX Specification version 2, rather than the SVR2-derived
types. While I was here, I did a namespace sweep to expose the constants
and strucutures, and structure members described by SUSv2; documentation
updates coming shortly.

Fixes kern/8158.


Revision tags: chs-ubc2-base
# 1.96 12-Jul-1999 thorpej

Remove two lines that were apparently added by accident.


# 1.95 12-Jul-1999 kleink

XSH5: change function signature to `void *sbrk(intptr_t)'.


# 1.94 29-Jun-1999 wrstuden

Add fhopen, fhstat, fhstatfs.


# 1.93 15-Jun-1999 thorpej

Add mlockall at #242 and munlockall at #243.


# 1.92 09-Jun-1999 christos

Add EXCL keyword as described in tech_kern, and fix comments. Make the
vtrace syscall UNIMPL because it is.


# 1.91 08-Jun-1999 thorpej

mincore: caddr_t -> void *


Revision tags: netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.90 28-Mar-1999 kleink

branches: 1.90.2; 1.90.4;
Sync __getlogin()'s namelen argument with the libc-internal declaration
(u_int vs. size_t).


# 1.89 22-Mar-1999 sommerfe

Change namei cache to record vnode->(parent,name) entries (for directories).
Add kernel implementation of getcwd() which uses this cache, falling
back to reading the filesystem on a cache miss.
Along for the ride: add new VOP_FSYNC flag FSYNC_RECLAIM indicating
that a reclaim is being done, so only a "shallow" fsync is needed.


# 1.88 10-Feb-1999 kleink

* Due to addition and use of socklen_t, make the socket option and address
arguments passed to accept(), bind(), connect(), getpeername(), getsockname(),
getsockopt(), recvfrom(), sendto() and sendmsg() unsigned, which also elimiates
a few casts.
* Reflect the (now) signedness of msg_iovlen, which necessiates the addition
of a few casts.


# 1.87 10-Dec-1998 christos

defopt COMPAT_43


Revision tags: kenh-if-detach-base
# 1.86 26-Nov-1998 kleink

getpgid(2) returns a value of type pid_t.


Revision tags: chs-ubc-base
# 1.85 19-Oct-1998 tron

Defopt SYSVMSG, SYSVSEM and SYSVSHM.


# 1.84 12-Sep-1998 mycroft

Fix thinko in previous.


# 1.83 12-Sep-1998 mycroft

Version sys_sigreturn, to avoid breaking programs that use it explicitly.


# 1.82 11-Sep-1998 mycroft

Substantial signal handling changes:
* Increase the size of sigset_t to accomodate 128 signals -- adding new
versions of sys_setprocmask(), sys_sigaction(), sys_sigpending() and
sys_sigsuspend() to handle the changed arguments.
* Abstract the guts of sys_sigaltstack(), sys_setprocmask(), sys_sigaction(),
sys_sigpending() and sys_sigsuspend() into separate functions, and call them
from all the emulations rather than hard-coding everything. (Avoids uses
the stackgap crap for these system calls.)
* Add a new flag (p_checksig) to indicate that a process may have signals
pending and userret() needs to do the full (slow) check.
* Eliminate SAS_ALTSTACK; it's exactly the inverse of SS_DISABLE.
* Correct emulation bugs with restoring SS_ONSTACK.
* Make the signal mask in the sigcontext always use the emulated mask format.
* Store signals internally in sigaction structures, rather than maintaining a
bunch of little sigsets for each SA_* bit.
* Keep track of where we put the signal trampoline, rather than figuring it out
in *_sendsig().
* Issue a warning when a non-emulated sigaction bit is observed.
* Add missing emulated signals, and a native SIGPWR (currently not used).
* Implement the `not reset when caught' semantics for relevant signals.

Note: Only code touched by the i386 port has been modified. Other ports and
emulations need to be updated.


Revision tags: eeh-paddr_t-base
# 1.81 05-Jul-1998 jonathan

* defopt COMPAT_{09,10,11,12,13} and COMPAT_NOMID.
TODO: revisit interaction between native compat and emul compat usage.


# 1.80 02-Jul-1998 thorpej

Argh, pad the off_t args in pread/pwrite/preadv/pwritev. System call
numbers don't change since the window of brokenness was so small (1 day).


# 1.79 30-Jun-1998 thorpej

Add positional read and write system calls:
- pread() (#173) and pwrite() (#174), which are defined by XPG4.2. System
call numbers match Solaris.
- preadv() (#289) and pwritev() (#290), which are the positional cousins
of readv() and writev(), but not defined by any standard.


# 1.78 25-Jun-1998 thorpej

defopt NFSSERVER


# 1.77 25-Jun-1998 thorpej

defopt KTRACE


# 1.76 05-Jun-1998 kleink

Per IEEE Std 1003.1b-1993, implement the fdatasync() system call which is
identical to fsync() with the expecption of not being required to synchronize
file status information.


# 1.75 30-May-1998 kleink

Per XSH98, const'ify the `addr' arguments to mlock() and munlock().


# 1.74 07-May-1998 kleink

Several SYSV IPC prototype changes.


# 1.73 02-May-1998 christos

New fktrace syscall from Darren Reed [with fixes from me]


# 1.72 27-Mar-1998 kleink

Per X/Open CAE Spec Issue 5 Version 2, change the buffer size argument of
readlink() from type `int' to type `size_t'. This isn't an ABI change, since
the calling convention of our only LP64 platform (the Alpha) already promotes
this argument to a `long'.

This may not be the final action on this matter; readlink() still returns
an `int', which may change in a future revision of the standard.


# 1.71 25-Feb-1998 perry

change second parm of sysarch() from char * to void *


# 1.70 19-Feb-1998 thorpej

Include the NFS and LFS option headers.


# 1.69 14-Feb-1998 kleink

Implement __posix_chown(), __posix_fchown() and __posix_lchown(). Also,
rename posix_rename() to __posix_rename() to follow this convention.


# 1.68 14-Feb-1998 thorpej

Reserve syscalls 283, 284, and 285 for 3 up-coming POSIX systems calls,
per kleink. Add XPG4.2's getsid(2) at #286.


# 1.67 04-Jan-1998 thorpej

Add __vfork14() system call at #282.


# 1.66 29-Nov-1997 kleink

Modify the recent sigaltstack() interface change to use the __RENAME() scheme;
add __sigaltstack14().


# 1.65 25-Nov-1997 kleink

In XPG4.2, the ss_size member of type stack_t (struct sigaltstack) is specified
to be of type size_t; since this imposes an interface change on the Alpha
(sizeof(int) != sizeof(size_t)), allocate a new system call number and make
the previous version a compatibility system call.


# 1.64 04-Nov-1997 thorpej

Fix slight argument bogosity with getgroups(), setgroups(), select(),
and swapctl(). For the former three, they use an 'int' in their user-land
prototype which was a 'u_int' in the kernel, which screwed up automatic
generation/checking of lint syscall stubs. For the latter, the user-land
prototype uses a "const char *", but the syscall just used "char *".

From Chris Demetriou <cgd@pa.dec.com>.


Revision tags: netbsd-1-3-base
# 1.63 20-Oct-1997 thorpej

branches: 1.63.2;
Fix the shared library versioning snafu caused by the recent changes
to the stat(2) family and msync(2). This uses a primitive function
versioning scheme.

This reverts the libc shared library major version from 13 to 12, and
adds a few new interfaces to bring us to libc version 12.20.

From Frank van der Linden <fvdl@NetBSD.ORG>.


# 1.62 19-Oct-1997 mycroft

umask(2) accepts and returns a mode_t.


# 1.61 18-Oct-1997 christos

Fixed missed const char * in lstat (thanks enami) and changed caddr_t -> void *
in the mman family.


# 1.60 16-Oct-1997 christos

change char *path to const char *path
change int to mode_t's and to dev_t's as appropriate
add new new stat syscem calls and make the old ones compatibility.


# 1.59 15-Oct-1997 mycroft

Adjust u_int arguments of some system calls to int, to match user-level
prototypes.


# 1.58 15-Oct-1997 mycroft

Adjust u_int arguments of some system calls to int, to match user-level
prototypes.


Revision tags: marc-pcmcia-base
# 1.57 10-Oct-1997 fvdl

Add getdents(). Rename getdirentries to compat_12_getdirentries.


# 1.56 03-Oct-1997 enami

Add system call lchmod (#274), lchown (#275) and lutimes (#276).


# 1.55 09-Sep-1997 veego

Ups.


# 1.54 09-Sep-1997 veego

Move sys_minherit from 250 to 273 and add a comment why 240-269 are
reserved.


Revision tags: thorpej-signal-base
# 1.53 08-Sep-1997 chuck

add sys_minherit (from openbsd)


Revision tags: marc-pcmcia-bp
# 1.52 12-Jun-1997 mrg

branches: 1.52.4;
swapon back to compat_12 syscall..


# 1.51 12-Jun-1997 mrg

for now, leave swapon(8) in place.


# 1.50 12-Jun-1997 mrg

add sys_swapctl(), and deprecate, with COMPAT_12, sys_swapon


# 1.49 18-May-1997 kleink

Add posix_rename() syscall.


Revision tags: mrg-vm-swap2-base
# 1.48 16-Apr-1997 jtc

branches: 1.48.2;
Add POSIX.1b nanosleep().


Revision tags: is-newarp-before-merge is-newarp-base
# 1.47 31-Jan-1997 thorpej

branches: 1.47.2;
NFSCLIENT -> NFS


# 1.46 22-Dec-1996 cgd

branches: 1.46.2;
* (slight) general cleanup
* change in-kernel syscall prototypes to match user-land prototypes in
the following ways:
+ add 'const' where appropriate.
+ make the following "safe" type changes where appropriate:
caddr_t -> struct msghdr *
caddr_t -> struct sockaddr *
caddr_t -> void *
char * -> void *
int -> uid_t (safe because uid_t not used as index/count)
int -> gid_t (safe because gid_t not used as index/count)
u_int -> size_t
+ change "int" to "u_long" in flags arguments to chflags() and
fchflags(). This is safe because the arguments are used as
flag bits and there's nothing that would cause the top bit
of the int to be set yet, and because the user-land definitions
already specified u_long, so a u_long's worth of argument was
already being passed in.


# 1.45 22-Dec-1996 cgd

change ntp_gettime's struct ntptimeval *'s name to match kern_ntptime.c


# 1.44 22-Dec-1996 cgd

* fix return types. previously, most things returned 'int.' which was
wrong for a bunch of functions:
void: sys_exit, sys_sync
ssize_t: sys_read, sys_write, sys_recvmsg, sys_sendmsg,
sys_recvfrom, sys_readv, sys_writev, sys_sendto
long: sys_pathconf, sys_fpathconf
void *: sys_shmat

* Note that sys_open, sys_ioctl, and sys_fcntl are defined such that their
last argument is optional.

These changes should not have any real effect, because right now this
information is not actually used for anything.


# 1.43 22-Dec-1996 cgd

mark syscall() and __syscall() as INDIR syscalls


# 1.42 22-Dec-1996 cgd

ntp_gettime()'s argument is a struct ntptimeval *, not a struct timex *


# 1.41 06-Dec-1996 thorpej

Back out this piece of revision 1.38:

>- Optional systems calls are "UNIMPL" if the support is not being
> compiled into the kernel.

It had implications that didn't occur to me at the time. *sigh*


# 1.40 03-Dec-1996 thorpej

Include sys_getfh() if NFSSERVER || NFSCLIENT.


# 1.39 15-Nov-1996 jtc

Add clock_gettime, clock_settime, and clock_getres


# 1.38 14-Nov-1996 thorpej

Make ntp_gettime() and ntp_adjtime() like other system calls:
- The functions that implement them and the argument names are
prepended with "sys_".
- Optional systems calls are "UNIMPL" if the support is not being
compiled into the kernel.


# 1.37 19-Sep-1996 jtc

renamed sys_getlogin to sys___getlogin. required by libc namespace conventions


# 1.36 07-Sep-1996 mycroft

Modify poll(2) prototype.


# 1.35 07-Sep-1996 mycroft

Implement poll(2).


# 1.34 09-Aug-1996 mrg

Change reboot(2) to take two arguments: bootopt like normal and also
a boot string for firmware that can do this, such as the SPARC and
the sun3 models. It is currently silently ignored on all other
hardware now, however. The MD function "boot()" has been changed to
also take a char *.


# 1.33 23-Jun-1996 mycroft

Implement setre[ug]id() compatibly with 4.3BSD, SunOS, and Linux.


Revision tags: netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base
# 1.32 23-Apr-1996 mycroft

branches: 1.32.4;
Add futimes(), at position 206.


# 1.31 27-Feb-1996 jonathan

Add NTP kernel precision timekeeping from Dave Mill's xntp distribution
and the "kernel.tar.Z" distribution on louie.udel.edu, which is older than
xntp 3.4y or 3.5a, but contains newer kernel source fragments.

This commit adds support for a new kernel configuration option, NTP.
If NTP is selected, then the system clock should be run at "HZ", which
must be defined at compile time to be one value from:
60, 64, 100, 128, 256, 512, 1024.

Powers of 2 are ideal; 60 and 100 are supported but are marginally less
accurate.

If NTP is not configured, there should be no change in behavior relative
to pre-NTP kernels.

These changes have been tested extensively with xntpd 3.4y on a decstation;
almost identical kernel mods work on an i386. No pulse-per-second (PPS)
line discipline support is included, due to unavailability of hardware
to test it.

With this in-kernel PLL support for NetBSD, both xntp 3.4y and xntp
3.5a user-level code need minor changes. xntp's prototype for
syscall() is correct for FreeBSD, but not for NetBSD.


# 1.30 22-Nov-1995 cgd

change definition of profil() to make it 64-bit friendly. This has
no practical consequence on 32-bit systems. old prototype was
int profil(char *, int, int, int), and new one is int profile(char *,
size_t, u_long, u_int). the size_t is the size of the buffer,
and the u_long is the 'starting offset'. (I changed the last int
to u_int, because it's treated as a u_int everywhere, and isn't
logically a signed value.)


Revision tags: netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.29 10-Oct-1995 mycroft

Add aliases for all compat functions.


# 1.28 07-Oct-1995 mycroft

Prefix names of system call implementation functions with `sys_'.


# 1.27 09-Mar-1995 mycroft

Make memory map syscalls consistently use size_t.


# 1.26 06-Jan-1995 cgd

obsolete resuba, per ragge.


# 1.25 14-Dec-1994 mycroft

Add undelete syscall, per CSRG.


# 1.24 21-Oct-1994 mycroft

Fix typos.


# 1.23 20-Oct-1994 cgd

update for new syscall args description mechanism


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
# 1.22 29-Jun-1994 cgd

New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD'


# 1.21 14-Jun-1994 cgd

make getdtablesize COMPAT_43; should be COMPAT_44 or _09, but that has probs


# 1.20 08-Jun-1994 mycroft

Update to 4.4-Lite fs code.


# 1.19 17-May-1994 cgd

add support for 'NCOMPAT' to deal with NetBSD compat defines


# 1.18 07-May-1994 cgd

do the syscall shuffle. this is most of the rest


# 1.17 01-May-1994 cgd

kill damned off_t weirdness, also upgrade get- and setrlimit.


# 1.16 29-Apr-1994 cgd

kill 'aliases'


# 1.15 16-Apr-1994 cgd

start to phase out temp. off_t syscalls


# 1.14 07-Apr-1994 cgd

kill two LIBCOMPATs


# 1.13 02-Apr-1994 cgd

some temporary syscall shuffling


# 1.12 27-Mar-1994 cgd

do the syscall shuffle


# 1.11 08-Mar-1994 cgd

move LKM syscalls to 210 -> 219, and fix comment


# 1.10 12-Dec-1993 deraadt

make syscall#0 "syscall", like in 4.4 (causes SYS_syscall to be defined)


# 1.9 14-Nov-1993 cgd

Add the System V message queue and semaphore facilities. Implemented
by Daniel Boulet <danny@BouletFermat.ab.ca>


# 1.8 02-Oct-1993 mycroft

Put back the $'s in the RCS id that the last commit removed.


Revision tags: magnum-base
# 1.7 19-Sep-1993 brezak

Add sysarch() syscall.


Revision tags: netbsd-0-9-patch-001 netbsd-0-9-RELEASE netbsd-0-9-BETA netbsd-0-9-ALPHA2 netbsd-0-9-ALPHA netbsd-0-9-base
# 1.6 07-Jun-1993 cgd

branches: 1.6.4;
add support for terry lambert's loadable kernel modules.
needs a bit of cleanup, but overall: SLICK!


# 1.5 20-May-1993 cgd

add $Id$ strings, and clean up file headers where necessary


# 1.4 16-May-1993 cgd

getpgrp actually takes void. ask the IEEE...


# 1.3 06-May-1993 cgd

diffs for uname (posix!) system call, provided by John Brezak <brezak@osf.org>


Revision tags: netbsd-0-8 netbsd-alpha-1
# 1.2 10-Apr-1993 glass

forgot to update syscalls.master. the makesyscalls.sh generated stuff
is now updated


# 1.1 06-Apr-1993 glass

branches: 1.1.1;
used by makesyscalls.sh to produce init_sysent.c, syscalls.c ../sys/syscall.h
edit this to add/delete/ifdef system calls