From owner-cvs-src@FreeBSD.ORG Sun Jul 3 00:58:29 2005 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 697A516A587; Sun, 3 Jul 2005 00:56:59 +0000 (GMT) (envelope-from ps@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id F37B4443C1; Sun, 3 Jul 2005 00:36:12 +0000 (GMT) (envelope-from ps@mu.org) Received: by elvis.mu.org (Postfix, from userid 1000) id B8EB16CDCC; Sat, 2 Jul 2005 17:35:34 -0700 (PDT) X-Original-To: ps@mu.org Delivered-To: ps@mu.org Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119]) by elvis.mu.org (Postfix) with ESMTP id 4F0325CA7D for ; Sat, 18 Dec 2004 05:47:32 -0800 (PST) Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id CD47357F6E for ; Sat, 18 Dec 2004 13:47:07 +0000 (GMT) (envelope-from owner-src-committers@FreeBSD.org) Received: by hub.freebsd.org (Postfix) id DB2C016A57F; Sat, 18 Dec 2004 13:46:57 +0000 (GMT) Delivered-To: ps@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 538) id 8813B16A4D3; Sat, 18 Dec 2004 13:46:54 +0000 (GMT) Delivered-To: src-committers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2843016A4D9; Sat, 18 Dec 2004 13:46:52 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C50543D2F; Sat, 18 Dec 2004 13:46:52 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from [127.0.0.1] (davidxu@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBIDkl7C039732; Sat, 18 Dec 2004 13:46:49 GMT (envelope-from davidxu@freebsd.org) Message-ID: <41C434C5.2080203@freebsd.org> From: David Xu User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20040921 X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Xu References: <200412181252.iBICqjN6052974@repoman.freebsd.org> In-Reply-To: <200412181252.iBICqjN6052974@repoman.freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-src-committers@FreeBSD.org Precedence: bulk X-Loop: FreeBSD.ORG X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on elvis.mu.org X-Spam-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, SUBJ_HAS_SPACES autolearn=no version=3.0.1 X-Spam-Level: Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/sys proc.h syscall.h syscall.mk sysproto.h umtx.h src/sys/kern init_sysent.c kern_umtx.c syscalls.c syscalls.master X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Sun, 03 Jul 2005 00:58:32 -0000 X-Original-Date: Sat, 18 Dec 2004 21:46:45 +0800 X-List-Received-Date: Sun, 03 Jul 2005 00:58:32 -0000 I have a demo program there to explain the shared umtx feature: http://people.freebsd.org/~davidxu/umtx_cond.c David Xu wrote: >davidxu 2004-12-18 12:52:45 UTC > > FreeBSD src repository > > Modified files: > sys/sys proc.h syscall.h syscall.mk sysproto.h > umtx.h > sys/kern init_sysent.c kern_umtx.c syscalls.c > syscalls.master > Log: > 1. make umtx sharable between processes, the way is two or more processes > call mmap() to create a shared space, and then initialize umtx on it, > after that, each thread in different processes can use the umtx same > as threads in same process. > 2. introduce a new syscall _umtx_op to support timed lock and condition > variable semantics. also, orignal umtx_lock and umtx_unlock inline > functions now are reimplemented by using _umtx_op, the _umtx_op can > use arbitrary id not just a thread id. > >