On Sat, 25 Jun 2016, Konstantin Belousov wrote:
On Sat, Jun 25, 2016 at 07:03:46PM +0300, Ivan Klymenko wrote:
On Sat, 25 Jun 2016 18:20:06 +0300
Konstantin Belousov <kostik...@gmail.com> wrote:
diff --git a/lib/libthr/thread/thr_mutex.c
b/lib/libthr/thread/thr_mutex.c index 2ad05ca..1ae75fb 100644
--- a/lib/libthr/thread/thr_mutex.c
+++ b/lib/libthr/thread/thr_mutex.c
@@ -850,10 +871,10 @@ mutex_self_trylock(struct pthread_mutex *m)
switch (PMUTEX_TYPE(m->m_flags)) {
case PTHREAD_MUTEX_ERRORCHECK:
- case PTHREAD_MUTEX_ADAPTIVE_NP:
ret = EDEADLK;
break;
+ case PTHREAD_MUTEX_ADAPTIVE_NP:
case PTHREAD_MUTEX_NORMAL:
ret = EBUSY;
break;
Strange, it's not helped http://pastebin.com/jbzP0JW2
Are you sure that the new libthr was installed ? Compile and run the
following test, please, and show me the results. On the patched libthr,
the program must not output anything and exits with error code 0.
Sorry for not noticing and coming in late, but I think the
original change is wrong. I don't see in the 2013 POSIX spec
or Solaris 11 man page (haven't checked Linux yet) where
pthread_mutex_trylock() returns EDEADLK under any
circumstance.
http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutex_trylock.html
http://docs.oracle.com/cd/E23824_01/html/821-1465/pthread-mutex-trylock-3c.html#scrolltoc
--
DE
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"