Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107535908
D48454.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D48454.diff
View Options
diff --git a/lib/libthr/thread/thr_list.c b/lib/libthr/thread/thr_list.c
--- a/lib/libthr/thread/thr_list.c
+++ b/lib/libthr/thread/thr_list.c
@@ -149,16 +149,16 @@
if (thread == NULL) {
if (total_threads > MAX_THREADS)
return (NULL);
- atomic_fetchadd_int(&total_threads, 1);
+ atomic_add_int(&total_threads, 1);
thread = calloc(1, sizeof(struct pthread));
if (thread == NULL) {
- atomic_fetchadd_int(&total_threads, -1);
+ atomic_add_int(&total_threads, -1);
return (NULL);
}
if ((thread->sleepqueue = _sleepq_alloc()) == NULL ||
(thread->wake_addr = _thr_alloc_wake_addr()) == NULL) {
thr_destroy(curthread, thread);
- atomic_fetchadd_int(&total_threads, -1);
+ atomic_add_int(&total_threads, -1);
return (NULL);
}
} else {
@@ -176,7 +176,7 @@
thread->tcb = tcb;
} else {
thr_destroy(curthread, thread);
- atomic_fetchadd_int(&total_threads, -1);
+ atomic_add_int(&total_threads, -1);
thread = NULL;
}
return (thread);
@@ -202,7 +202,7 @@
thread->tcb = NULL;
if ((curthread == NULL) || (free_thread_count >= MAX_CACHED_THREADS)) {
thr_destroy(curthread, thread);
- atomic_fetchadd_int(&total_threads, -1);
+ atomic_add_int(&total_threads, -1);
} else {
/*
* Add the thread to the free thread list, this also avoids
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 16, 1:56 PM (20 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15813584
Default Alt Text
D48454.diff (1 KB)
Attached To
Mode
D48454: Fix libthr initialization from constructors
Attached
Detach File
Event Timeline
Log In to Comment