]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add dummy stubs for pthread_key_create, pthread_key_delete,
authorJulian Seward <jseward@acm.org>
Sun, 14 Apr 2002 13:13:05 +0000 (13:13 +0000)
committerJulian Seward <jseward@acm.org>
Sun, 14 Apr 2002 13:13:05 +0000 (13:13 +0000)
pthread_setspecific, pthread_getspecific.  They don't do anything
right now and may well crash programs which use them.

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

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

index 1d776d026518ce291e69c602e500bdc2c8165709..88f97cda7a2d46be29d3c21c440efb397b144f25 100644 (file)
@@ -254,6 +254,36 @@ int pthread_cancel(pthread_t thread)
 }
 
 
+
+int pthread_key_create(pthread_key_t *key,  
+                       void  (*destr_function)  (void *))
+{
+   char* str = "IGNORED pthread_key_create\n";
+   write(2, str, strlen(str));
+   return 0;
+}
+
+int pthread_key_delete(pthread_key_t key)
+{
+   char* str = "IGNORED pthread_key_delete\n";
+   write(2, str, strlen(str));
+   return 0;
+}
+
+int pthread_setspecific(pthread_key_t key, const void *pointer)
+{
+   char* str = "IGNORED pthread_setspecific\n";
+   write(2, str, strlen(str));
+   return 0;
+}
+
+void * pthread_getspecific(pthread_key_t key)
+{
+   char* str = "IGNORED pthread_setspecific\n";
+   write(2, str, strlen(str));
+   return NULL;
+}
+
 /* ---------------------------------------------------------------------
    These are here (I think) because they are deemed cancellation
    points by POSIX.  For the moment we'll simply pass the call along
index 1d776d026518ce291e69c602e500bdc2c8165709..88f97cda7a2d46be29d3c21c440efb397b144f25 100644 (file)
@@ -254,6 +254,36 @@ int pthread_cancel(pthread_t thread)
 }
 
 
+
+int pthread_key_create(pthread_key_t *key,  
+                       void  (*destr_function)  (void *))
+{
+   char* str = "IGNORED pthread_key_create\n";
+   write(2, str, strlen(str));
+   return 0;
+}
+
+int pthread_key_delete(pthread_key_t key)
+{
+   char* str = "IGNORED pthread_key_delete\n";
+   write(2, str, strlen(str));
+   return 0;
+}
+
+int pthread_setspecific(pthread_key_t key, const void *pointer)
+{
+   char* str = "IGNORED pthread_setspecific\n";
+   write(2, str, strlen(str));
+   return 0;
+}
+
+void * pthread_getspecific(pthread_key_t key)
+{
+   char* str = "IGNORED pthread_setspecific\n";
+   write(2, str, strlen(str));
+   return NULL;
+}
+
 /* ---------------------------------------------------------------------
    These are here (I think) because they are deemed cancellation
    points by POSIX.  For the moment we'll simply pass the call along
index 1d776d026518ce291e69c602e500bdc2c8165709..88f97cda7a2d46be29d3c21c440efb397b144f25 100644 (file)
@@ -254,6 +254,36 @@ int pthread_cancel(pthread_t thread)
 }
 
 
+
+int pthread_key_create(pthread_key_t *key,  
+                       void  (*destr_function)  (void *))
+{
+   char* str = "IGNORED pthread_key_create\n";
+   write(2, str, strlen(str));
+   return 0;
+}
+
+int pthread_key_delete(pthread_key_t key)
+{
+   char* str = "IGNORED pthread_key_delete\n";
+   write(2, str, strlen(str));
+   return 0;
+}
+
+int pthread_setspecific(pthread_key_t key, const void *pointer)
+{
+   char* str = "IGNORED pthread_setspecific\n";
+   write(2, str, strlen(str));
+   return 0;
+}
+
+void * pthread_getspecific(pthread_key_t key)
+{
+   char* str = "IGNORED pthread_setspecific\n";
+   write(2, str, strlen(str));
+   return NULL;
+}
+
 /* ---------------------------------------------------------------------
    These are here (I think) because they are deemed cancellation
    points by POSIX.  For the moment we'll simply pass the call along