Date: Sun, 29 Nov 1998 01:34:23 +0100 From: Eivind Eklund <eivind@yes.no> To: "Richard Seaman, Jr." <lists@tar.com>, "cvs-all@FreeBSD.ORG" <cvs-all@FreeBSD.ORG>, "cvs-committers@FreeBSD.ORG" <cvs-committers@FreeBSD.ORG> Subject: Re: cvs commit: src/include pthread.h src/lib/libc_r/uthread uthread_mattr_kind_np.c uthread_mutex.c Message-ID: <19981129013423.K9226@follo.net> In-Reply-To: <199811290020.SAA17552@ns.tar.com>; from Richard Seaman, Jr. on Sat, Nov 28, 1998 at 06:20:09PM -0600 References: <199811290020.SAA17552@ns.tar.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Nov 28, 1998 at 06:20:09PM -0600, Richard Seaman, Jr. wrote: > On Sat, 28 Nov 1998 15:52:59 -0800 (PST), Eivind Eklund wrote: > > >eivind 1998/11/28 15:52:59 PST > > > > Modified files: > > include pthread.h > > lib/libc_r/uthread uthread_mattr_kind_np.c uthread_mutex.c > > Log: > > Add support for pthread_mutexattr_settype(). As a side effect of > > testing this, fix MUTEX_TYPE_COUNTING_FAST. Recursive locks now work. > ^^^^^^^^^^^^^^^^^^^^^^^^ > You might want to check localtime.c in libc. I seem to recall from > looking at this a couple of weeks ago that the "thread safe", ie. > libc_r, implementation makes recursive calls to pthread_mutex_lock. > Therefore, its possible this change will break some of the localtime > related functions. If so, it could be fixed by having localtime.c > use recursive mutexes, or better yet, by rewriting it so it doesn't > make recursive calls to pthread_mutex_lock. This shouldn't matter. The default behaviour (MUTEX_TYPE_FAST) has not changed. I just fixed the MUTEX_TYPE_COUNTING_FAST, which is supposed to be for recursive locks. Previously, it had to go to -1 locks to actually release the lock (and IIRC, it couldn't really get there due to other parts of the code). Now it release the lock when you get to the count of 0. Eivind. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19981129013423.K9226>
