[libc-commits] [libc] [libc][test][NFC] Fix pthread_setschedparam_test flakiness (PR #212067)
Jeff Bailey via libc-commits
libc-commits at lists.llvm.org
Sun Jul 26 00:44:58 PDT 2026
================
@@ -18,15 +18,27 @@
#include "src/pthread/pthread_create.h"
#include "src/pthread/pthread_getschedparam.h"
#include "src/pthread/pthread_join.h"
+#include "src/pthread/pthread_mutex_destroy.h"
+#include "src/pthread/pthread_mutex_init.h"
+#include "src/pthread/pthread_mutex_lock.h"
+#include "src/pthread/pthread_mutex_unlock.h"
#include "src/pthread/pthread_self.h"
#include "src/pthread/pthread_setschedparam.h"
#include "test/IntegrationTest/test.h"
-static void *child_func(void *) { return nullptr; }
+#include <pthread.h>
----------------
kaladron wrote:
There isn't a proxy header for pthread_mutex_t today. Right now src/pthread/pthread_mutex_lock.h and friends each directly include pthread.h, so I could remove it, but then I'd be relying on a transitive dependency. The other tests in this directory (pthread_mutex_test.cpp, etc) all include pthread.h for the same reason.
https://github.com/llvm/llvm-project/pull/212067
More information about the libc-commits
mailing list