#include <unistd.h>
#include <stdlib.h>
-#include "../arch/arch.h"
+#include "../arch/arch.h" /* IWYU pragma: export */
#include "../lib/types.h"
enum {
os_nr,
};
+typedef enum {
+ CPU_ARM64_CRC32C,
+} cpu_features;
+
+/* IWYU pragma: begin_exports */
#if defined(__ANDROID__)
#include "os-android.h"
#elif defined(__linux__)
#ifndef CONFIG_STRLCAT
#include "../oslib/strlcat.h"
#endif
+/* IWYU pragma: end_exports */
#ifdef MSG_DONTWAIT
#define OS_MSG_DONTWAIT MSG_DONTWAIT
#endif
#ifndef FIO_OS_PATH_SEPARATOR
-#define FIO_OS_PATH_SEPARATOR "/"
+#define FIO_OS_PATH_SEPARATOR '/'
#endif
#ifndef FIO_PREFERRED_CLOCK_SOURCE
}
#endif
-#ifdef FIO_USE_GENERIC_RAND
-typedef unsigned int os_random_state_t;
-
-static inline void os_random_seed(unsigned long seed, os_random_state_t *rs)
-{
- srand(seed);
-}
-
-static inline long os_random_long(os_random_state_t *rs)
-{
- long val;
-
- val = rand_r(rs);
- return val;
-}
-#endif
-
#ifdef FIO_USE_GENERIC_INIT_RANDOM_STATE
static inline int init_random_seeds(unsigned long *rand_seeds, int size)
{
# define FIO_HAVE_ANY_FALLOCATE
#endif
+#ifndef FIO_HAVE_CPU_HAS
+static inline bool os_cpu_has(cpu_features feature)
+{
+ return false;
+}
+#endif
+
#endif