The constructor present there could be replaced with an initcall.
This one is set at level STG_PREPARE because it also zeroes the
lock_stats, and it's a bit odd that it could possibly have been
scheduled to run after other constructors that might already
preset some of these locks by accident.
pthread_join(dummy_thread, NULL);
}
-__attribute__((constructor))
static void __thread_init(void)
{
char *ptr = NULL;
memset(lock_stats, 0, sizeof(lock_stats));
#endif
}
+INITCALL0(STG_PREPARE, __thread_init);
#else