Date: Tue, 11 Jan 2005 08:07:30 +0800 From: David Xu <davidxu@freebsd.org> To: Petri Helenius <pete@he.iki.fi> Cc: freebsd-threads@freebsd.org Subject: Re: higher speed mutexes Message-ID: <41E318C2.3040304@freebsd.org> In-Reply-To: <41E0256A.1000801@he.iki.fi> References: <41DCEA91.6040402@he.iki.fi> <41DCFD2F.2040207@freebsd.org> <41DD01CE.70004@he.iki.fi> <41DFED9A.8070202@freebsd.org> <41E0256A.1000801@he.iki.fi>
next in thread | previous in thread | raw e-mail | index | archive | help
Petri Helenius wrote: > > What happens if the process holding the lock dies? > >> In detail, I don't use thr_suspend and thr_wakeup, I use more >> reliable way: >> umtx_wait + umtx_wake, I have added them into kernel sometimes ago. >> > I was looking at the umtx routines and wondering if I could use them > instead of pthread API. > I will add owner list, when a thread blocked on umtx, an owner list will be created for the umtx, and blocked thread will lookup the owner in system, if there is no the owner, the owner was dead, kernel marks the umtx is in broken state, next locker will find the brokeness, and still gets the lock successfully but with errno is EPIPE, if a thread exits with its owner list not empty, in thr_exit, kernel will mark all umtxes to broken state, and wake up a waiter on each umtx, the waiter should find the brokeness...., it will let do priority proction and priority inherit mutex for POSIX..., I am looking for time to do it.... David Xu
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41E318C2.3040304>