pthreadpool fix strict prototype error
- add void to inline functions to satisfy strict prototype build error
PiperOrigin-RevId: 828572077
diff --git a/src/portable-api.c b/src/portable-api.c
index d0475e1..5bfcf8e 100644
--- a/src/portable-api.c
+++ b/src/portable-api.c
@@ -33,7 +33,7 @@
#define PTHREADPOOL_DEFAULT_FASTEST_TO_SLOWEST_RATIO 2
#define PTHREADPOOL_MAX_FASTEST_TO_SLOWEST_RATIO 4
-static size_t get_fastest_to_slowest_ratio() {
+static size_t get_fastest_to_slowest_ratio(void) {
#if PTHREADPOOL_USE_CPUINFO
// If we are not the fastest core, assume that we are at most 4x slower
// than the fastest core.
diff --git a/src/pthreads.c b/src/pthreads.c
index 3db063b..8443353 100644
--- a/src/pthreads.c
+++ b/src/pthreads.c
@@ -565,7 +565,7 @@
return 0;
}
-static size_t get_num_cpus() {
+static size_t get_num_cpus(void) {
#if PTHREADPOOL_USE_CPUINFO
return cpuinfo_get_processors_count();
#elif defined(_SC_NPROCESSORS_ONLN)
diff --git a/src/threadpool-atomics.h b/src/threadpool-atomics.h
index f393a72..514224c 100644
--- a/src/threadpool-atomics.h
+++ b/src/threadpool-atomics.h
@@ -344,11 +344,11 @@
memory_order_seq_cst);
}
-static inline void pthreadpool_fence_acquire() {
+static inline void pthreadpool_fence_acquire(void) {
atomic_thread_fence(memory_order_acquire);
}
-static inline void pthreadpool_fence_release() {
+static inline void pthreadpool_fence_release(void) {
atomic_thread_fence(memory_order_release);
}
diff --git a/src/threadpool-utils.h b/src/threadpool-utils.h
index 2e33d90..d080c58 100644
--- a/src/threadpool-utils.h
+++ b/src/threadpool-utils.h
@@ -42,7 +42,7 @@
#endif
};
-static inline struct fpu_state get_fpu_state() {
+static inline struct fpu_state get_fpu_state(void) {
struct fpu_state state = {0};
#if defined(_MSC_VER) && defined(_M_ARM)
state.fpscr = (uint32_t)_MoveFromCoprocessor(10, 7, 1, 0, 0);
@@ -76,7 +76,7 @@
#endif
}
-static inline void disable_fpu_denormals() {
+static inline void disable_fpu_denormals(void) {
#if defined(_MSC_VER) && defined(_M_ARM)
int fpscr = _MoveFromCoprocessor(10, 7, 1, 0, 0);
fpscr |= 0x1000000;