Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Oct 2009 10:30:30 -0700
From:      Julian Elischer <julian@elischer.org>
To:        Stanislav Sedov <stas@deglitch.com>
Cc:        "Yan, Yeqing" <yeqing.yan@intel.com>, "hackers@freebsd.org" <hackers@freebsd.org>
Subject:   Re: About FreeBSD syscall usage
Message-ID:  <4AE096B6.2080701@elischer.org>
In-Reply-To: <20091022164144.064b916b.stas@deglitch.com>
References:  <95608CFE3D0C064B8468DB61F8403BE04A0D4A1C5E@PDSMSX501.ccr.corp.intel.com> <20091022164144.064b916b.stas@deglitch.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Stanislav Sedov wrote:
> On Thu, 22 Oct 2009 16:20:32 +0800
> "Yan, Yeqing" <yeqing.yan@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.

> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4AE096B6.2080701>