]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Implement pthread_mutexattr_gettype.
authorTom Hughes <tom@compton.nu>
Wed, 13 Oct 2004 18:29:54 +0000 (18:29 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 13 Oct 2004 18:29:54 +0000 (18:29 +0000)
CCMAIL: 91199-done@bugs.kde.org

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2759

coregrind/vg_libpthread.c
coregrind/vg_libpthread_unimp.c

index 6bab98802b6b878a647d2be28b910d4050e49c6e..b8f8e7eb4f948b3156cad0fb1f51a88fcd0f0c55 100644 (file)
@@ -1276,6 +1276,16 @@ int __pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type)
    }
 }
 
+int __pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *type)
+{
+   vg_pthread_mutexattr_t* vg_attr;
+   CONVERT(mutexattr, attr, vg_attr);
+
+   *type = vg_attr->__vg_mutexkind;
+
+   return 0;
+}
+
 int __pthread_mutexattr_destroy(pthread_mutexattr_t *attr)
 {
    return 0;
@@ -3351,6 +3361,7 @@ strong_alias(__pthread_mutex_trylock, pthread_mutex_trylock)
 strong_alias(__pthread_mutex_unlock, pthread_mutex_unlock)
 strong_alias(__pthread_mutexattr_init, pthread_mutexattr_init)
   weak_alias(__pthread_mutexattr_settype, pthread_mutexattr_settype)
+  weak_alias(__pthread_mutexattr_gettype, pthread_mutexattr_gettype)
   weak_alias(__pthread_mutexattr_setpshared, pthread_mutexattr_setpshared)
 strong_alias(__pthread_mutex_init, pthread_mutex_init)
 strong_alias(__pthread_mutexattr_destroy, pthread_mutexattr_destroy)
index 805563063ea542f3a0cf7d00a3c827aa16818944..58c953ace03819e397688201e08c540e0d739571 100644 (file)
@@ -225,8 +225,8 @@ __attribute__((weak)) void pthread_mutexattr_getkind_np ( void )
                       { vgPlain_unimp("pthread_mutexattr_getkind_np"); }
 __attribute__((weak)) void pthread_mutexattr_getpshared ( void )
                       { vgPlain_unimp("pthread_mutexattr_getpshared"); }
-__attribute__((weak)) void pthread_mutexattr_gettype ( void )
-                      { vgPlain_unimp("pthread_mutexattr_gettype"); }
+//__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 )