aboutsummaryrefslogtreecommitdiff
path: root/tests/pthread/specific.c
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-12-07 10:37:25 -0500
committerAlon Zakai <alonzakai@gmail.com>2013-12-07 10:37:25 -0500
commit1a007b1631509b9d72499a8f4402294017ee04dc (patch)
tree92f8b0341497c7bd4e53aa82c690346536a244c3 /tests/pthread/specific.c
parentdf11c6f1fd1636a355b83a1c48b3a890596e6a32 (diff)
parenteb083723747a90cb6ab9853fec8d6e8ef54748bc (diff)
Merge branch 'incoming'
Diffstat (limited to 'tests/pthread/specific.c')
-rw-r--r--tests/pthread/specific.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/pthread/specific.c b/tests/pthread/specific.c
index 914884e7..631baf8c 100644
--- a/tests/pthread/specific.c
+++ b/tests/pthread/specific.c
@@ -33,6 +33,14 @@ int main(void)
printf("pthread_getspecific = %d\n", *data2);
assert(*data2 == 123);
+ rv = pthread_setspecific(key, NULL);
+ printf("valid pthread_setspecific for value NULL = %d\n", rv);
+ assert(rv == 0);
+
+ data2 = pthread_getspecific(key);
+ assert(data2 == NULL);
+ printf("pthread_getspecific = %p\n", data2);
+
rv = pthread_key_create(&key, &destr_function);
data2 = pthread_getspecific(key);
printf("pthread_getspecific after key recreate = %p\n", data2);