]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Implement pthread_mutexattr_setpshared (Nick did this).
authorJulian Seward <jseward@acm.org>
Sun, 6 Jul 2003 01:23:11 +0000 (01:23 +0000)
committerJulian Seward <jseward@acm.org>
Sun, 6 Jul 2003 01:23:11 +0000 (01:23 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1724

coregrind/arch/x86-linux/vg_libpthread.c
coregrind/arch/x86-linux/vg_libpthread_unimp.c
coregrind/vg_libpthread.c
coregrind/vg_libpthread_unimp.c

index 8e4cb3697867b5fca544feb20e0f3ca7f27826ec..098c7f7a754b06f67b38f87349717592df528abd 100644 (file)
@@ -906,6 +906,18 @@ int __pthread_mutexattr_destroy(pthread_mutexattr_t *attr)
    return 0;
 }
 
+int pthread_mutexattr_setpshared ( pthread_mutexattr_t* attr, int pshared)
+{
+  if (pshared != PTHREAD_PROCESS_PRIVATE && pshared != PTHREAD_PROCESS_SHARED)
+    return EINVAL;
+
+  /* For now it is not possible to shared a conditional variable.  */
+  if (pshared != PTHREAD_PROCESS_PRIVATE)
+    return ENOSYS;
+
+  return 0;
+}
+
 
 /* ---------------------------------------------------
    MUTEXes
index c502112f8ed3dc57b6b8e6129f9dc9c53df0a5bc..bac177892f46fe1afd4c3471f07cfcbab0c63007 100644 (file)
@@ -251,8 +251,8 @@ __attribute__((weak)) void pthread_mutexattr_gettype ( void )
                       { vgPlain_unimp("pthread_mutexattr_gettype"); }
 __attribute__((weak)) void pthread_mutexattr_setkind_np ( void )
                       { vgPlain_unimp("pthread_mutexattr_setkind_np"); }
-__attribute__((weak)) void pthread_mutexattr_setpshared ( void )
-                      { vgPlain_unimp("pthread_mutexattr_setpshared"); }
+//__attribute__((weak)) void pthread_mutexattr_setpshared ( void )
+//                      { vgPlain_unimp("pthread_mutexattr_setpshared"); }
 //__attribute__((weak)) void pthread_setconcurrency ( void )
 //                      { vgPlain_unimp("pthread_setconcurrency"); }
 __attribute__((weak)) void pthread_spin_destroy ( void )
index 8e4cb3697867b5fca544feb20e0f3ca7f27826ec..098c7f7a754b06f67b38f87349717592df528abd 100644 (file)
@@ -906,6 +906,18 @@ int __pthread_mutexattr_destroy(pthread_mutexattr_t *attr)
    return 0;
 }
 
+int pthread_mutexattr_setpshared ( pthread_mutexattr_t* attr, int pshared)
+{
+  if (pshared != PTHREAD_PROCESS_PRIVATE && pshared != PTHREAD_PROCESS_SHARED)
+    return EINVAL;
+
+  /* For now it is not possible to shared a conditional variable.  */
+  if (pshared != PTHREAD_PROCESS_PRIVATE)
+    return ENOSYS;
+
+  return 0;
+}
+
 
 /* ---------------------------------------------------
    MUTEXes
index c502112f8ed3dc57b6b8e6129f9dc9c53df0a5bc..bac177892f46fe1afd4c3471f07cfcbab0c63007 100644 (file)
@@ -251,8 +251,8 @@ __attribute__((weak)) void pthread_mutexattr_gettype ( void )
                       { vgPlain_unimp("pthread_mutexattr_gettype"); }
 __attribute__((weak)) void pthread_mutexattr_setkind_np ( void )
                       { vgPlain_unimp("pthread_mutexattr_setkind_np"); }
-__attribute__((weak)) void pthread_mutexattr_setpshared ( void )
-                      { vgPlain_unimp("pthread_mutexattr_setpshared"); }
+//__attribute__((weak)) void pthread_mutexattr_setpshared ( void )
+//                      { vgPlain_unimp("pthread_mutexattr_setpshared"); }
 //__attribute__((weak)) void pthread_setconcurrency ( void )
 //                      { vgPlain_unimp("pthread_setconcurrency"); }
 __attribute__((weak)) void pthread_spin_destroy ( void )