diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2005-12-14 05:42:08 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2005-12-14 05:42:08 +0000 |
commit | 3f21ac29288c2e1a3a9285623e7ea61f2b400ee6 (patch) | |
tree | 1caa3afcc6b237114a894d42075a24774be59775 | |
parent | 2a6a2fc1260de5e10b332c1df0a0a6e0f4d12725 (diff) |
the beatings will continue until morale improves
-rw-r--r-- | lib/librthread/rthread_tls.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/librthread/rthread_tls.c b/lib/librthread/rthread_tls.c index e510aa589b5..05311c11d7e 100644 --- a/lib/librthread/rthread_tls.c +++ b/lib/librthread/rthread_tls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rthread_tls.c,v 1.4 2005/12/14 05:38:31 tedu Exp $ */ +/* $OpenBSD: rthread_tls.c,v 1.5 2005/12/14 05:42:07 tedu Exp $ */ /* * Copyright (c) 2004 Ted Unangst <tedu@openbsd.org> * All Rights Reserved. @@ -72,6 +72,9 @@ int pthread_key_delete(pthread_key_t key) { + if (rkeys[key].used) + return (EINVAL); + _spinlock(&rkeyslock); rkeys[key].used = 0; rkeys[key].destructor = NULL; |