diff options
| author | ad <ad@NetBSD.org> | 2007-08-16 12:01:49 +0000 |
|---|---|---|
| committer | ad <ad@NetBSD.org> | 2007-08-16 12:01:49 +0000 |
| commit | b8833ff53f83de80158512cce3d1ffdde95c3c47 (patch) | |
| tree | c69b4b3372a1ac29f3091040a4846ff1b82f038b /lib/libpthread/pthread_specific.c | |
| parent | 9247850afb4080eb4333371fa894b8300c5a375c (diff) | |
- Reinitialize the absolute minimum when recycling user thread state.
Chops another ~10% off create/join in a loop on i386.
- Disable low level debugging as this is stable. Improves benchmarks
across the board by a small percentage. Uncontested mutex acquire
and release in a loop becomes about 8% quicker.
- Minor cleanup.
Diffstat (limited to 'lib/libpthread/pthread_specific.c')
| -rw-r--r-- | lib/libpthread/pthread_specific.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libpthread/pthread_specific.c b/lib/libpthread/pthread_specific.c index 91608b66422..857fdcb039a 100644 --- a/lib/libpthread/pthread_specific.c +++ b/lib/libpthread/pthread_specific.c @@ -1,7 +1,7 @@ -/* $NetBSD: pthread_specific.c,v 1.10 2003/08/13 18:52:01 nathanw Exp $ */ +/* $NetBSD: pthread_specific.c,v 1.11 2007/08/16 12:01:49 ad Exp $ */ /*- - * Copyright (c) 2001 The NetBSD Foundation, Inc. + * Copyright (c) 2001, 2007 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: pthread_specific.c,v 1.10 2003/08/13 18:52:01 nathanw Exp $"); +__RCSID("$NetBSD: pthread_specific.c,v 1.11 2007/08/16 12:01:49 ad Exp $"); /* Functions and structures dealing with thread-specific data */ @@ -61,6 +61,7 @@ pthread_setspecific(pthread_key_t key, const void *value) */ /*LINTED const cast*/ self->pt_specific[key] = (void *) value; + self->pt_havespecific = 1; return 0; } |
