diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index 49ac92c5fb1b..cc4b45ca1bda 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -118,7 +118,7 @@ MLINKS+=intro.2 errno.2 MLINKS+=jail.2 jail_attach.2 MLINKS+=kqueue.2 kevent.2 MLINKS+=kse.2 kse_create.2 kse.2 kse_exit.2 kse.2 kse_release.2 \ - kse.2 kse_wakeup.2 kse.2 kse_thr_interrupt.2 + kse.2 kse_switchin.2 kse.2 kse_thr_interrupt.2 kse.2 kse_wakeup.2 MLINKS+=madvise.2 posix_madvise.2 MLINKS+=mlock.2 munlock.2 MLINKS+=mlockall.2 munlockall.2 diff --git a/lib/libc/sys/kse.2 b/lib/libc/sys/kse.2 index be81f7f2408c..a1151dcc5935 100644 --- a/lib/libc/sys/kse.2 +++ b/lib/libc/sys/kse.2 @@ -53,9 +53,11 @@ .Ft int .Fn kse_release "struct timespec *timeout" .Ft int -.Fn kse_wakeup "struct kse_mailbox *mbx" +.Fn kse_switchin "mcontext_t *mcp" "long val" "long *loc" .Ft int .Fn kse_thr_interrupt "struct kse_thr_mailbox *tmbx" +.Ft int +.Fn kse_wakeup "struct kse_mailbox *mbx" .Sh DESCRIPTION These system calls implement kernel support for multi-threaded processes. .\" @@ -286,6 +288,16 @@ If successful, does not return to the caller. .Pp The +.Fn kse_switchin +system call can be used by the UTS, when it has selected a new thread, +to switch to the context of that thread. +The use of +.Fn kse_switchin +is machine dependent. +Some platforms do not need a system call to switch to a new context, +while others require its use in particular cases. +.Pp +The .Fn kse_wakeup system call is the opposite of