Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libpthread Remove an unnecessary test in pthread_getspec...



details:   https://anonhg.NetBSD.org/src/rev/22a623eaddee
branches:  trunk
changeset: 547250:22a623eaddee
user:      nathanw <nathanw%NetBSD.org@localhost>
date:      Thu May 15 19:13:24 2003 +0000

description:
Remove an unnecessary test in pthread_getspecific().

diffstat:

 lib/libpthread/pthread_specific.c |  9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diffs (37 lines):

diff -r 0c4ea901bcb4 -r 22a623eaddee lib/libpthread/pthread_specific.c
--- a/lib/libpthread/pthread_specific.c Thu May 15 19:11:28 2003 +0000
+++ b/lib/libpthread/pthread_specific.c Thu May 15 19:13:24 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pthread_specific.c,v 1.6 2003/03/08 08:03:36 lukem Exp $       */
+/*     $NetBSD: pthread_specific.c,v 1.7 2003/05/15 19:13:24 nathanw Exp $     */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: pthread_specific.c,v 1.6 2003/03/08 08:03:36 lukem Exp $");
+__RCSID("$NetBSD: pthread_specific.c,v 1.7 2003/05/15 19:13:24 nathanw Exp $");
 
 /* Functions and structures dealing with thread-specific data */
 #include <errno.h>
@@ -162,7 +162,7 @@
         * Note that the argument in option 3 only applies because we
         * keep TSD in ordinary memory which follows the pthreads
         * visibility rules. The visibility rules are not required by
-        * the standard to apply to TSD, so this arguemnt doesn't
+        * the standard to apply to TSD, so the arguemnt doesn't
         * apply in general, just to this implementation.
         */
 
@@ -200,9 +200,6 @@
 {
        pthread_t self;
 
-       if (pthread__tsd_alloc[key] == 0)
-               return NULL;
-
        self = pthread__self();
        return (self->pt_specific[key]);
 }



Home | Main Index | Thread Index | Old Index