About FreeBSD syscall usage
Julian Elischer
julian at elischer.org
Thu Oct 22 17:43:51 UTC 2009
Stanislav Sedov wrote:
> On Thu, 22 Oct 2009 16:20:32 +0800
> "Yan, Yeqing" <yeqing.yan at intel.com> mentioned:
>
>> kse_exit
>>
>> kse_wakeup
>>
>> kse_create
>>
>> kse_thr_interrupt
>>
>> kse_release
>>
>> kse_switchin
>>
>> I read $man kse, but I can not find any example about how to use it. I write some test codes to call these function but all these codes are failed.
>>
The kse man page documents the syscalls but they are intended to be
used only by the libkse library.
there was some early test code in /usr/src/tools/KSE but it probably
doesn't eve n compile any more.
>>
>>
>> mac_syscall
>>
>> I read $man 3 mac, but I can not find the usage about mac_syscall function.
>>
>>
>>
>> thr_create
>>
>> thr_suspend
>>
>> thr_kill2
Once again, these calls are meant to be only accessed from
the threading library.
(though man pages should be written)
>>
>
> I fear there's no documentation on these syscalls exists. So for use information
> you'll have to refer to the actual source code of these syscalls/or and libc/libthr
> source code which makes uses of them.
>
>> By the way, it is said “I think that KSE was used in 5.x and 6.x and then dropped in favor of a 1:1 threading model when 7.0 was released”
>>
>> Does it mean the KSE syscall can be removed from FreeBSD 7.0?
it will remain oin all 7.x kernels but is removed from 8.x
>>
>
> libkse (M:N threading) was default threading library on FreeBSD versions prior to
> 7.0, and the default has changed to libthr (1:1 threading in FreeBSD 7). libkse
> was completely removed in FreeBSD 8, but it is still functional on FreeBSD 7.x.
KSE based threading, while theoretically useful introduces a number of
annoying complications to the kernel and was "holding up" other
developement. Since Linux has gone with 1:1 threading, nearly all
applications a re now written with 1:1 threading in mind so it made
little sense to maintain all the extra complexity for no reason.
>
More information about the freebsd-hackers
mailing list