summaryrefslogtreecommitdiffstats
path: root/main/uwsgi/0001-use-portable-pthread-functions-instead-of-the-non-po.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-03-25 07:44:43 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-03-25 07:45:18 +0000
commitcc5f305aaba4cefe2227aef2550d565f2f5a8147 (patch)
tree0be7c2bfb3c9f345db465f04b54ccb4b7bbb4de6 /main/uwsgi/0001-use-portable-pthread-functions-instead-of-the-non-po.patch
parent855ad8d21bb69b8db500260c9e4033f3e60f1414 (diff)
downloadaports-cc5f305aaba4cefe2227aef2550d565f2f5a8147.tar.bz2
aports-cc5f305aaba4cefe2227aef2550d565f2f5a8147.tar.xz
main/uwsgi: moved from testing
Diffstat (limited to 'main/uwsgi/0001-use-portable-pthread-functions-instead-of-the-non-po.patch')
-rw-r--r--main/uwsgi/0001-use-portable-pthread-functions-instead-of-the-non-po.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/main/uwsgi/0001-use-portable-pthread-functions-instead-of-the-non-po.patch b/main/uwsgi/0001-use-portable-pthread-functions-instead-of-the-non-po.patch
new file mode 100644
index 000000000..cab800620
--- /dev/null
+++ b/main/uwsgi/0001-use-portable-pthread-functions-instead-of-the-non-po.patch
@@ -0,0 +1,40 @@
+From 1a09a7264026339d8e0c4899a2f9ff488c0bd97d Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Mon, 10 Feb 2014 12:13:00 +0000
+Subject: [PATCH 1/4] use portable pthread functions instead of the
+ non-portable
+
+The pthread functions pthread_mutexattr_setrobust and
+pthread_mutex_consistent are in posix nowdays. Use those instead of their
+non-portable synonyms.
+
+Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
+---
+ core/lock.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/core/lock.c b/core/lock.c
+index d368148..f806b2c 100644
+--- a/core/lock.c
++++ b/core/lock.c
+@@ -99,7 +99,7 @@ retry:
+ exit(1);
+ }
+ if (uwsgi_pthread_robust_mutexes_enabled) {
+- if (pthread_mutexattr_setrobust_np(&attr, PTHREAD_MUTEX_ROBUST)) {
++ if (pthread_mutexattr_setrobust(&attr, PTHREAD_MUTEX_ROBUST)) {
+ uwsgi_log("unable to make the mutex 'robust'\n");
+ exit(1);
+ }
+@@ -161,7 +161,7 @@ void uwsgi_lock_fast(struct uwsgi_lock_item *uli) {
+ #ifdef EOWNERDEAD
+ if (pthread_mutex_lock((pthread_mutex_t *) uli->lock_ptr) == EOWNERDEAD) {
+ uwsgi_log("[deadlock-detector] a process holding a robust mutex died. recovering...\n");
+- pthread_mutex_consistent_np((pthread_mutex_t *) uli->lock_ptr);
++ pthread_mutex_consistent((pthread_mutex_t *) uli->lock_ptr);
+ }
+ #else
+ pthread_mutex_lock((pthread_mutex_t *) uli->lock_ptr);
+--
+1.8.5.3
+