summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2010-09-15 01:21:30 +0000
committerdavidxu <davidxu@FreeBSD.org>2010-09-15 01:21:30 +0000
commit6be463abbb69aa61ab186c9cba314068612328ba (patch)
tree3e098c0e2e601907618dccc085ff629bf45aab67 /lib/libthr/thread
parent25bb71a7203acdd7f1545e23e5ca1fc6fb67f222 (diff)
downloadFreeBSD-src-6be463abbb69aa61ab186c9cba314068612328ba.zip
FreeBSD-src-6be463abbb69aa61ab186c9cba314068612328ba.tar.gz
Move back IN_GCLIST flag into field tlflags, since thread list and gc list
still share same lock.
Diffstat (limited to 'lib/libthr/thread')
-rw-r--r--lib/libthr/thread/thr_private.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h
index aff59a2..fd5a2af 100644
--- a/lib/libthr/thread/thr_private.h
+++ b/lib/libthr/thread/thr_private.h
@@ -415,13 +415,13 @@ struct pthread {
#define THR_FLAGS_PRIVATE 0x0001
#define THR_FLAGS_NEED_SUSPEND 0x0002 /* thread should be suspended */
#define THR_FLAGS_SUSPENDED 0x0004 /* thread is suspended */
-#define THR_FLAGS_IN_GCLIST 0x0008 /* thread in gc list */
-#define THR_FLAGS_DETACHED 0x0010 /* thread is detached */
+#define THR_FLAGS_DETACHED 0x0008 /* thread is detached */
/* Thread list flags; only set with thread list lock held. */
int tlflags;
#define TLFLAGS_GC_SAFE 0x0001 /* thread safe for cleaning */
#define TLFLAGS_IN_TDLIST 0x0002 /* thread in all thread list */
+#define TLFLAGS_IN_GCLIST 0x0004 /* thread in gc list */
/* Queue of currently owned NORMAL or PRIO_INHERIT type mutexes. */
struct mutex_queue mutexq;
@@ -559,16 +559,16 @@ do { \
} \
} while (0)
#define THR_GCLIST_ADD(thrd) do { \
- if (((thrd)->flags & THR_FLAGS_IN_GCLIST) == 0) { \
+ if (((thrd)->tlflags & TLFLAGS_IN_GCLIST) == 0) { \
TAILQ_INSERT_HEAD(&_thread_gc_list, thrd, gcle);\
- (thrd)->flags |= THR_FLAGS_IN_GCLIST; \
+ (thrd)->tlflags |= TLFLAGS_IN_GCLIST; \
_gc_count++; \
} \
} while (0)
#define THR_GCLIST_REMOVE(thrd) do { \
- if (((thrd)->flags & THR_FLAGS_IN_GCLIST) != 0) { \
+ if (((thrd)->tlflags & TLFLAGS_IN_GCLIST) != 0) { \
TAILQ_REMOVE(&_thread_gc_list, thrd, gcle); \
- (thrd)->flags &= ~THR_FLAGS_IN_GCLIST; \
+ (thrd)->tlflags &= ~TLFLAGS_IN_GCLIST; \
_gc_count--; \
} \
} while (0)
OpenPOWER on IntegriCloud