From owner-cvs-all@FreeBSD.ORG Mon Mar 31 17:38:17 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B8AFA37B401; Mon, 31 Mar 2003 17:38:17 -0800 (PST) Received: from sccrmhc03.attbi.com (sccrmhc03.attbi.com [204.127.202.63]) by mx1.FreeBSD.org (Postfix) with ESMTP id BACA043FA3; Mon, 31 Mar 2003 17:38:16 -0800 (PST) (envelope-from julian@elischer.org) Received: from interjet.elischer.org (12-232-168-4.client.attbi.com[12.232.168.4]) by sccrmhc03.attbi.com (sccrmhc03) with ESMTP id <20030401013815003004kmu8e>; Tue, 1 Apr 2003 01:38:16 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id RAA01060; Mon, 31 Mar 2003 17:38:13 -0800 (PST) Date: Mon, 31 Mar 2003 17:38:13 -0800 (PST) From: Julian Elischer To: Nate Lawson In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: Jeff Roberson cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_umtx.c src/sys/sys umtx.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Apr 2003 01:38:18 -0000 On Mon, 31 Mar 2003, Nate Lawson wrote: > On Mon, 31 Mar 2003, Jeff Roberson wrote: > > Added files: > > sys/kern kern_umtx.c > > sys/sys umtx.h > > Log: > > - Add an api for doing smp safe locks in userland. > > - umtx_lock() is defined as an inline in umtx.h. It tries to do an > > uncontested acquire of a lock which falls back to the _umtx_lock() > > system-call if that fails. > > - umtx_unlock() is also an inline which falls back to _umtx_unlock() if the > > uncontested unlock fails. > > - Locks are keyed off of the thr_id_t of the currently running thread which > > is currently just the pointer to the 'struct thread' in kernel. > > - _umtx_lock() uses the proc pointer to synchronize access to blocked thread > > queues which are stored in the first blocked thread. > > > > Revision Changes Path > > 1.1 +303 -0 src/sys/kern/kern_umtx.c (new) > > 1.1 +87 -0 src/sys/sys/umtx.h (new) > > It's great to be getting this. Can you point me to a document indicating > how this will be used by KSE? Are we going to have "native threads" > (thr), KSE, and pthreads? We will have 3 threads schemes.. userland threads thr threads.. Useable by the majority of threaded apps KSE threads.. Useable by threaded apps that have thousands of threads (i.e. KSE is a hybrid if userland and thr threads..) Julian