Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162952781
D56022.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
D56022.diff
View Options
diff --git a/lib/libc/stdlib/cxa_thread_atexit_impl.c b/lib/libc/stdlib/cxa_thread_atexit_impl.c
--- a/lib/libc/stdlib/cxa_thread_atexit_impl.c
+++ b/lib/libc/stdlib/cxa_thread_atexit_impl.c
@@ -59,8 +59,6 @@
* prevent the crash.
*/
-#define CXA_DTORS_ITERATIONS 4
-
struct cxa_thread_dtor {
void *obj;
void (*func)(void *);
@@ -112,18 +110,13 @@
}
static void
-walk_cb_nocall(struct cxa_thread_dtor *dtor __unused)
-{
-}
-
-static void
-cxa_thread_walk(void (*cb)(struct cxa_thread_dtor *))
+cxa_thread_walk()
{
struct cxa_thread_dtor *dtor;
while ((dtor = LIST_FIRST(&dtors)) != NULL) {
LIST_REMOVE(dtor, entry);
- cb(dtor);
+ walk_cb_call(dtor);
free(dtor);
}
}
@@ -136,16 +129,5 @@
void
__cxa_thread_call_dtors(void)
{
- int i;
-
- for (i = 0; i < CXA_DTORS_ITERATIONS && !LIST_EMPTY(&dtors); i++)
- cxa_thread_walk(walk_cb_call);
-
- if (!LIST_EMPTY(&dtors)) {
- fprintf(stderr, "Thread %p is exiting with more "
- "thread-specific dtors created after %d iterations "
- "of destructor calls\n",
- _pthread_self(), i);
- cxa_thread_walk(walk_cb_nocall);
- }
+ cxa_thread_walk();
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jul 19, 3:58 PM (2 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35239053
Default Alt Text
D56022.diff (1 KB)
Attached To
Mode
D56022: libc: Remove redundant code in thread atexit code
Attached
Detach File
Event Timeline
Log In to Comment