[lttng-dev] [PATCH urcu 2/4] Fix: pthread_rwlock initialization on Cygwin

2018-11-23 Thread Michael Jeanson
On Cygwin the PTHREAD_RWLOCK_INITIALIZER macro is not sufficient to get a properly initialized pthread_rwlock_t struct. Use the pthread_rwlock_init function instead which should work on all platforms. Signed-off-by: Michael Jeanson --- tests/benchmark/test_rwlock.c| 34 ++

[lttng-dev] [PATCH urcu 3/4] Add *.exe to gitignore for Cygwin

2018-11-23 Thread Michael Jeanson
Signed-off-by: Michael Jeanson --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index d02ed09..4daa824 100644 --- a/.gitignore +++ b/.gitignore @@ -76,6 +76,7 @@ tests/benchmark/test_urcu_wfcq_dynlink tests/benchmark/*.log *.so +*.exe doc/examples/

[lttng-dev] [PATCH urcu 1/4] Fix: compat_futex_noasync on Cygwin

2018-11-23 Thread Michael Jeanson
The futex_noasync compat code uses a weak symbol to share state across different shared object which is not possible on Windows with the Portable Executable format. Use the async compat code for both cases. Signed-off-by: Michael Jeanson --- include/urcu/futex.h | 19 +++ 1 file

[lttng-dev] [PATCH urcu 4/4] test_rwlock: Add per-thread count to verbose output

2018-11-23 Thread Michael Jeanson
Signed-off-by: Michael Jeanson --- tests/benchmark/test_rwlock.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/benchmark/test_rwlock.c b/tests/benchmark/test_rwlock.c index c23e782..02073f1 100644 --- a/tests/benchmark/test_rwlock.c +++ b/tests/benchmark/t

Re: [lttng-dev] [PATCH urcu 2/4] Fix: pthread_rwlock initialization on Cygwin

2018-11-23 Thread Mathieu Desnoyers
- On Nov 23, 2018, at 3:27 PM, Michael Jeanson mjean...@efficios.com wrote: > On Cygwin the PTHREAD_RWLOCK_INITIALIZER macro is not > sufficient to get a properly initialized pthread_rwlock_t > struct. Use the pthread_rwlock_init function instead which > should work on all platforms. > > Sign

Re: [lttng-dev] [PATCH urcu 2/4] Fix: pthread_rwlock initialization on Cygwin

2018-11-23 Thread Michael Jeanson
On 2018-11-23 3:46 p.m., Mathieu Desnoyers wrote: > - On Nov 23, 2018, at 3:27 PM, Michael Jeanson mjean...@efficios.com > wrote: > >> On Cygwin the PTHREAD_RWLOCK_INITIALIZER macro is not >> sufficient to get a properly initialized pthread_rwlock_t >> struct. Use the pthread_rwlock_init func

Re: [lttng-dev] [PATCH urcu 2/4] Fix: pthread_rwlock initialization on Cygwin

2018-11-23 Thread Mathieu Desnoyers
- On Nov 23, 2018, at 3:54 PM, Michael Jeanson mjean...@efficios.com wrote: > On 2018-11-23 3:46 p.m., Mathieu Desnoyers wrote: [...] >> I typically use "abort()" instead. > > exit() is used everywhere in this file to abort, I went with the "local" > style. Works for me! Thanks, Mathieu -

[lttng-dev] [PATCH urcu v2] Fix: pthread_rwlock initialization on Cygwin

2018-11-23 Thread Michael Jeanson
On Cygwin the PTHREAD_RWLOCK_INITIALIZER macro is not sufficient to get a properly initialized pthread_rwlock_t struct. Use the pthread_rwlock_init function instead which should work on all platforms. Signed-off-by: Michael Jeanson --- tests/benchmark/test_rwlock.c| 42 ++

Re: [lttng-dev] [PATCH urcu v2] Fix: pthread_rwlock initialization on Cygwin

2018-11-23 Thread Mathieu Desnoyers
Merged all 4 patches with some modifications to this patch: - added missing abort in test_rwlock_timing.c - added missing pthread_rwlock_destroy. Thanks, Mathieu - On Nov 23, 2018, at 4:47 PM, Michael Jeanson mjean...@efficios.com wrote: > On Cygwin the PTHREAD_RWLOCK_INITIALIZER macro is