Commit Graph

5 Commits

Author SHA1 Message Date
Kári Tristan Helgason
f57bfd4dca unix: fix bug in barrier fallback implementation
There was a memory corruption issue with the pthread barrier
implementation on android, where a barrier could still be in use by one
thread when being freed by another.

This fixes that issue and adds lots of missing error handling.

This implementation is now also used for the OSX fallback.

Fixes: https://github.com/libuv/libuv/issues/615
PR-URL: https://github.com/libuv/libuv/pull/790
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-04-26 09:35:47 +02:00
Oguz Bastemur
70d5014266 android: pthread_sigmask() does not set errno
Originally intended workaround is especially needed for Android <4.4.
However it fails to compare errno collected from pthread_sigmask.

This has been fixed separately in JXcore. See issue:
https://github.com/jxcore/jxcore-cordova/issues/55

PR-URL: https://github.com/libuv/libuv/pull/833
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-04-15 12:21:49 +02:00
RossBencina
3b0f85fd23 android: add missing include to pthread-fixes.c
PR-URL: https://github.com/libuv/libuv/pull/436
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-07-15 10:18:52 +02:00
Paul Tan
347000929d unix: workaround broken pthread_sigmask on Android
On android, if a call to `pthread_sigmask` fails with EINVAL, fallback
to `sigprocmask`. This workarounds the broken behaviour of
`pthread_sigmask` on Android versions < 4.1. See:

* https://android.googlesource.com/platform/bionic/+/9bf330b5
* https://code.google.com/p/android/issues/detail?id=15337

This is implemented by replacing all calls of `pthread_sigmask` to a new
function `uv__pthread_sigmask` which implements this fallback mechanism.
2014-03-06 11:54:50 +01:00
Linus Mårtensson
fc6a2ad24f unix: support for android builds
Adds targets and fixes to ensure building for android works.

To build on android, refer to the android standalone toolchain.
2013-05-25 21:16:52 +02:00