From owner-cvs-all@FreeBSD.ORG Sat Dec 18 13:46:52 2004 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 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> Date: Sat, 18 Dec 2004 21:46:45 +0800 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 cc: cvs-src@freebsd.org cc: src-committers@freebsd.org cc: 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-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: Sat, 18 Dec 2004 13:46:52 -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. > >