From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 22 17:43:51 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFD9D1065676 for ; Thu, 22 Oct 2009 17:43:51 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outX.internet-mail-service.net (rly7.mx.aerioconnect.net [216.240.35.231]) by mx1.freebsd.org (Postfix) with ESMTP id A4AE38FC08 for ; Thu, 22 Oct 2009 17:43:51 +0000 (UTC) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id B8CFF2437; Thu, 22 Oct 2009 10:30:31 -0700 (PDT) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (h-67-100-89-137.snfccasy.static.covad.net [67.100.89.137]) by idiom.com (Postfix) with ESMTP id 20B7F2D6015; Thu, 22 Oct 2009 10:30:31 -0700 (PDT) Message-ID: <4AE096B6.2080701@elischer.org> Date: Thu, 22 Oct 2009 10:30:30 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: Stanislav Sedov References: <95608CFE3D0C064B8468DB61F8403BE04A0D4A1C5E@PDSMSX501.ccr.corp.intel.com> <20091022164144.064b916b.stas@deglitch.com> In-Reply-To: <20091022164144.064b916b.stas@deglitch.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Cc: "Yan, Yeqing" , "hackers@freebsd.org" Subject: Re: About FreeBSD syscall usage X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Oct 2009 17:43:51 -0000 Stanislav Sedov wrote: > On Thu, 22 Oct 2009 16:20:32 +0800 > "Yan, Yeqing" 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. >