From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 22 12:47:06 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56DDB106566B; Thu, 22 Oct 2009 12:47:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 295F28FC1C; Thu, 22 Oct 2009 12:47:06 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id D49A046B52; Thu, 22 Oct 2009 08:47:05 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 1FE1E8A020; Thu, 22 Oct 2009 08:47:05 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Thu, 22 Oct 2009 08:34:31 -0400 User-Agent: KMail/1.9.7 References: <95608CFE3D0C064B8468DB61F8403BE04A0D4A1C5E@PDSMSX501.ccr.corp.intel.com> In-Reply-To: <95608CFE3D0C064B8468DB61F8403BE04A0D4A1C5E@PDSMSX501.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200910220834.32082.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 22 Oct 2009 08:47:05 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx 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 12:47:06 -0000 On Thursday 22 October 2009 4:20:32 am Yan, Yeqing wrote: > Hi: >=20 > I=E2=80=99m from Intel China. Our project use FreeBSD 7.0. I have some qu= estion=20 about syscall usage but I think mail to the wrong address before. >=20 > Is there having any doc or example about how to use these syscall? >=20 >=20 >=20 > kse_exit >=20 > kse_wakeup >=20 > kse_create >=20 > kse_thr_interrupt >=20 > kse_release >=20 > kse_switchin These are used internally to implement pthreads when using KSE. Probably t= he=20 only useful documentation would be the source for libkse. > I read $man kse, but I can not find any example about how to use it. I wr= ite=20 some test codes to call these function but all these codes are failed. >=20 >=20 >=20 > mac_syscall >=20 > I read $man 3 mac, but I can not find the usage about mac_syscall functio= n. This one I am not sure of. > thr_create >=20 > thr_suspend >=20 > thr_kill2 These are used by libpthread to implement pthreads (libthr in < 7.x). The= =20 best documentation for these would be the source to libpthread as well. > By the way, it is said =E2=80=9CI think that KSE was used in 5.x and 6.x = and then=20 dropped in favor of a 1:1 threading model when 7.0 was released=E2=80=9D >=20 > Does it mean the KSE syscall can be removed from FreeBSD 7.0? It has been removed entirely from 8.0. It is still present in 7, but it is= =20 deprecated and not the default. =2D-=20 John Baldwin