[Android] [PATCH] Add pthread_condattr_(g,s)etpshared() for 2.1
Rafaël Carré
funman at videolan.org
Mon Mar 5 20:48:49 CET 2012
They are used by pthread-rwlocks.c
---
Can you try again after applying this patch ?
vlc-android/jni/pthread-condattr.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/vlc-android/jni/pthread-condattr.c b/vlc-android/jni/pthread-condattr.c
index 450f71d..1a4d657 100644
--- a/vlc-android/jni/pthread-condattr.c
+++ b/vlc-android/jni/pthread-condattr.c
@@ -47,3 +47,24 @@ int pthread_condattr_destroy(pthread_condattr_t *attr)
return 0;
}
+int pthread_condattr_getpshared(pthread_condattr_t *attr, int *pshared)
+{
+ if (attr == NULL || pshared == NULL)
+ return EINVAL;
+
+ *pshared = *attr;
+ return 0;
+}
+
+int pthread_condattr_setpshared(pthread_condattr_t *attr, int pshared)
+{
+ if (attr == NULL)
+ return EINVAL;
+
+ if (pshared != PTHREAD_PROCESS_SHARED &&
+ pshared != PTHREAD_PROCESS_PRIVATE)
+ return EINVAL;
+
+ *attr = pshared;
+ return 0;
+}
--
1.7.9
More information about the Android
mailing list