Re: svn commit: r302194 - head/lib/libthr/thread

2016-06-26 Thread Konstantin Belousov
On Sun, Jun 26, 2016 at 12:33:38AM +0200, Jilles Tjoelker wrote: > To be bug-compatible with glibc, you'd need to return the wrong > [EDEADLK] error for robust errorcheck mutexes only. Robust > non-errorcheck and non-robust errorcheck mutexes return the correct > [EBUSY]. I have not checked PI and

Re: svn commit: r302194 - head/lib/libthr/thread

2016-06-25 Thread Cy Schubert
In message <20160625223338.ga22...@stack.nl>, Jilles Tjoelker writes: > On Sat, Jun 25, 2016 at 08:29:56PM +0300, Konstantin Belousov wrote: > > I already asked re for approval of the reversal and got it. But I am still > > hesitating doing the revert vs. returning EDEADLK for error-checking > >

Re: svn commit: r302194 - head/lib/libthr/thread

2016-06-25 Thread Jilles Tjoelker
On Sat, Jun 25, 2016 at 08:29:56PM +0300, Konstantin Belousov wrote: > I already asked re for approval of the reversal and got it. But I am still > hesitating doing the revert vs. returning EDEADLK for error-checking > mutexes. > My initial mistake was reading the statement about

Re: svn commit: r302194 - head/lib/libthr/thread

2016-06-25 Thread Daniel Eischen
On Sat, 25 Jun 2016, Konstantin Belousov wrote: On Sat, Jun 25, 2016 at 07:14:40PM +0200, Jilles Tjoelker wrote: On Sat, Jun 25, 2016 at 11:30:40AM +, Konstantin Belousov wrote: Author: kib Date: Sat Jun 25 11:30:40 2016 New Revision: 302194 URL:

Re: svn commit: r302194 - head/lib/libthr/thread

2016-06-25 Thread Ivan Klymenko
On Sat, 25 Jun 2016 21:06:57 +0300 Konstantin Belousov wrote: > On Sat, Jun 25, 2016 at 09:05:43PM +0300, Konstantin Belousov wrote: > > On Sat, Jun 25, 2016 at 08:43:17PM +0300, Ivan Klymenko wrote: > > > ./thr_mutex_test > > > thr_mutex_test: mutex_trylock 2: No error: 0

Re: svn commit: r302194 - head/lib/libthr/thread

2016-06-25 Thread Konstantin Belousov
On Sat, Jun 25, 2016 at 09:05:43PM +0300, Konstantin Belousov wrote: > On Sat, Jun 25, 2016 at 08:43:17PM +0300, Ivan Klymenko wrote: > > ./thr_mutex_test > > thr_mutex_test: mutex_trylock 2: No error: 0 > > Ok, there is a bug in my test, it must use errc(3) and not err(3). Please > retest wth

Re: svn commit: r302194 - head/lib/libthr/thread

2016-06-25 Thread Konstantin Belousov
On Sat, Jun 25, 2016 at 08:43:17PM +0300, Ivan Klymenko wrote: > ./thr_mutex_test > thr_mutex_test: mutex_trylock 2: No error: 0 Ok, there is a bug in my test, it must use errc(3) and not err(3). Please retest wth the updated code below. But I am sure that you would see EDEADLK (Resource

Re: svn commit: r302194 - head/lib/libthr/thread

2016-06-25 Thread Ivan Klymenko
On Sat, 25 Jun 2016 19:16:15 +0300 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 wrote: > > > diff --git a/lib/libthr/thread/thr_mutex.c > > >

Re: svn commit: r302194 - head/lib/libthr/thread

2016-06-25 Thread Konstantin Belousov
On Sat, Jun 25, 2016 at 07:14:40PM +0200, Jilles Tjoelker wrote: > On Sat, Jun 25, 2016 at 11:30:40AM +, Konstantin Belousov wrote: > > Author: kib > > Date: Sat Jun 25 11:30:40 2016 > > New Revision: 302194 > > URL: https://svnweb.freebsd.org/changeset/base/302194 > > > Log: > > For

Re: svn commit: r302194 - head/lib/libthr/thread

2016-06-25 Thread Jilles Tjoelker
On Sat, Jun 25, 2016 at 11:30:40AM +, Konstantin Belousov wrote: > Author: kib > Date: Sat Jun 25 11:30:40 2016 > New Revision: 302194 > URL: https://svnweb.freebsd.org/changeset/base/302194 > Log: > For pthread_mutex_trylock() call on owned error-check or non-portable > adaptive mutex,

Re: svn commit: r302194 - head/lib/libthr/thread

2016-06-25 Thread Daniel Eischen
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 wrote: diff --git a/lib/libthr/thread/thr_mutex.c b/lib/libthr/thread/thr_mutex.c index 2ad05ca..1ae75fb

Re: svn commit: r302194 - head/lib/libthr/thread

2016-06-25 Thread Konstantin Belousov
On Sat, Jun 25, 2016 at 07:03:46PM +0300, Ivan Klymenko wrote: > On Sat, 25 Jun 2016 18:20:06 +0300 > Konstantin Belousov wrote: > > diff --git a/lib/libthr/thread/thr_mutex.c > > b/lib/libthr/thread/thr_mutex.c index 2ad05ca..1ae75fb 100644 > > ---

Re: svn commit: r302194 - head/lib/libthr/thread

2016-06-25 Thread Ivan Klymenko
On Sat, 25 Jun 2016 18:20:06 +0300 Konstantin Belousov wrote: > On Sat, Jun 25, 2016 at 05:55:03PM +0300, Ivan Klymenko wrote: > > On Sat, 25 Jun 2016 17:29:15 +0300 > > Konstantin Belousov wrote: > > > > > On Sat, Jun 25, 2016 at 05:18:00PM +0300,

Re: svn commit: r302194 - head/lib/libthr/thread

2016-06-25 Thread Konstantin Belousov
On Sat, Jun 25, 2016 at 05:55:03PM +0300, Ivan Klymenko wrote: > On Sat, 25 Jun 2016 17:29:15 +0300 > Konstantin Belousov wrote: > > > On Sat, Jun 25, 2016 at 05:18:00PM +0300, Ivan Klymenko wrote: > > > On Sat, 25 Jun 2016 17:05:29 +0300 > > > Konstantin Belousov

Re: svn commit: r302194 - head/lib/libthr/thread

2016-06-25 Thread Ivan Klymenko
On Sat, 25 Jun 2016 17:29:15 +0300 Konstantin Belousov wrote: > On Sat, Jun 25, 2016 at 05:18:00PM +0300, Ivan Klymenko wrote: > > On Sat, 25 Jun 2016 17:05:29 +0300 > > Konstantin Belousov wrote: > > > > > On Sat, Jun 25, 2016 at 05:04:06PM +0300,

Re: svn commit: r302194 - head/lib/libthr/thread

2016-06-25 Thread Konstantin Belousov
On Sat, Jun 25, 2016 at 05:18:00PM +0300, Ivan Klymenko wrote: > On Sat, 25 Jun 2016 17:05:29 +0300 > Konstantin Belousov wrote: > > > On Sat, Jun 25, 2016 at 05:04:06PM +0300, Ivan Klymenko wrote: > > > On Sat, 25 Jun 2016 16:55:09 +0300 > > > Konstantin Belousov

Re: svn commit: r302194 - head/lib/libthr/thread

2016-06-25 Thread Ivan Klymenko
On Sat, 25 Jun 2016 17:05:29 +0300 Konstantin Belousov wrote: > On Sat, Jun 25, 2016 at 05:04:06PM +0300, Ivan Klymenko wrote: > > On Sat, 25 Jun 2016 16:55:09 +0300 > > Konstantin Belousov wrote: > > > > > On Sat, Jun 25, 2016 at 04:44:03PM +0300,

Re: svn commit: r302194 - head/lib/libthr/thread

2016-06-25 Thread Konstantin Belousov
On Sat, Jun 25, 2016 at 05:04:06PM +0300, Ivan Klymenko wrote: > On Sat, 25 Jun 2016 16:55:09 +0300 > Konstantin Belousov wrote: > > > On Sat, Jun 25, 2016 at 04:44:03PM +0300, Ivan Klymenko wrote: > > > On Sat, 25 Jun 2016 11:30:40 + (UTC) > > > Konstantin Belousov

Re: svn commit: r302194 - head/lib/libthr/thread

2016-06-25 Thread Ivan Klymenko
On Sat, 25 Jun 2016 16:55:09 +0300 Konstantin Belousov wrote: > On Sat, Jun 25, 2016 at 04:44:03PM +0300, Ivan Klymenko wrote: > > On Sat, 25 Jun 2016 11:30:40 + (UTC) > > Konstantin Belousov wrote: > > > > > Author: kib > > > Date: Sat Jun 25

Re: svn commit: r302194 - head/lib/libthr/thread

2016-06-25 Thread Konstantin Belousov
On Sat, Jun 25, 2016 at 04:44:03PM +0300, Ivan Klymenko wrote: > On Sat, 25 Jun 2016 11:30:40 + (UTC) > Konstantin Belousov wrote: > > > Author: kib > > Date: Sat Jun 25 11:30:40 2016 > > New Revision: 302194 > > URL: https://svnweb.freebsd.org/changeset/base/302194 > > >

Re: svn commit: r302194 - head/lib/libthr/thread

2016-06-25 Thread Ivan Klymenko
On Sat, 25 Jun 2016 11:30:40 + (UTC) Konstantin Belousov wrote: > Author: kib > Date: Sat Jun 25 11:30:40 2016 > New Revision: 302194 > URL: https://svnweb.freebsd.org/changeset/base/302194 > > Log: > For pthread_mutex_trylock() call on owned error-check or >

svn commit: r302194 - head/lib/libthr/thread

2016-06-25 Thread Konstantin Belousov
Author: kib Date: Sat Jun 25 11:30:40 2016 New Revision: 302194 URL: https://svnweb.freebsd.org/changeset/base/302194 Log: For pthread_mutex_trylock() call on owned error-check or non-portable adaptive mutex, return EDEADLK as required by POSIX. The pthread_mutex_lock() is already