Date: Mon, 29 Nov 2010 22:30:13 -0800 From: Garrett Cooper <gcooper@FreeBSD.org> To: David Xu <davidxu@freebsd.org> Cc: FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: CFT: patch for process shared pthread objects Message-ID: <AANLkTimqf29twEPyEaJQCRMnAKwJuG42JS8genHADyjM@mail.gmail.com> In-Reply-To: <4CF4901B.8030108@freebsd.org> References: <4CF4901B.8030108@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Nov 29, 2010 at 9:48 PM, David Xu <davidxu@freebsd.org> wrote: > Hi, > > I finally have worked out first patch to make our pthread library > support process shared pthread objects: > > http://people.freebsd.org/~davidxu/pshared/patch1.diff > > Many changes are related to redesigned pthread condition variable, > these changes try to eliminate extra context switch when > pthread_cond_signal is called which could reduce performance. > There are two parts in the condition variable implementation. > A pure usermode condition variable and kernel-based condition > variable. All priority protected, inherited mutexs and process > shared mutex will use kernel base condition variable, for a > normal mutex, the usermode condition variable is used. > Both user-mode and kernel-based try to migrate a thread from > condition variable wait queue to mutex wait queue. > > Another added feature is robust mutex support, > http://www.opengroup.org/onlinepubs/9699919799/functions/pthread_mutexattr_setrobust.html > Which I think is mostly used for process-shared mutex. > > In the patch, if mutex attribute is robust, the thread library > also uses kernel base condition variable which does not have > internal lock in userland. Doesn't build :/...: ===> lib/libthr (obj,depend,all,install) make: don't know how to make thr_sleepq.c. Stop *** Error code 2 Stop in /usr/src. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. Thanks, -Garrett
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTimqf29twEPyEaJQCRMnAKwJuG42JS8genHADyjM>