BSD Yacc doesn't understand --no-lines, so use -l instead
[fio.git] / os / os-windows.h
index de120b64ff7e0b674b53fc878130f63274880dd9..66036351e912c76979f06697c7e5d0dab43059d9 100644 (file)
@@ -15,6 +15,7 @@
 #include "../smalloc.h"
 #include "../file.h"
 #include "../log.h"
+#include "../lib/hweight.h"
 
 #include "windows/posix.h"
 
@@ -161,11 +162,6 @@ static inline unsigned long long os_phys_mem(void)
        return (unsigned long long) pages * (unsigned long long) pagesize;
 }
 
-static inline void os_get_tmpdir(char *path, int len)
-{
-       GetTempPath(len, path);
-}
-
 static inline int gettid(void)
 {
        return GetCurrentThreadId();
@@ -214,6 +210,16 @@ static inline void fio_cpu_set(os_cpu_mask_t *mask, int cpu)
        *mask |= 1 << cpu;
 }
 
+static inline int fio_cpu_isset(os_cpu_mask_t *mask, int cpu)
+{
+       return (*mask & (1U << cpu));
+}
+
+static inline int fio_cpu_count(os_cpu_mask_t *mask)
+{
+       return hweight64(*mask);
+}
+
 static inline int fio_cpuset_init(os_cpu_mask_t *mask)
 {
        *mask = 0;