X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=os%2Fos-windows.h;h=9e931c9c9e505d8438117cd89c72a5d2a3dae7ab;hb=b44b9e45cf382dbfc2a7d18408b87a2e57316519;hp=d465818ca6778de914f349b30df13a0ed5fd708f;hpb=95db3079d0c9060f0fc31d5425bcd7d67076523b;p=fio.git diff --git a/os/os-windows.h b/os/os-windows.h index d465818c..9e931c9c 100644 --- a/os/os-windows.h +++ b/os/os-windows.h @@ -105,6 +105,7 @@ int fcntl(int fildes, int cmd, ...); int fdatasync(int fildes); int lstat(const char * path, struct stat * buf); uid_t geteuid(void); +char* ctime_r(const time_t *t, char *buf); int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); ssize_t pread(int fildes, void *buf, size_t nbyte, off_t offset); ssize_t pwrite(int fildes, const void *buf, size_t nbyte, @@ -162,11 +163,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(); @@ -215,7 +211,12 @@ static inline void fio_cpu_set(os_cpu_mask_t *mask, int cpu) *mask |= 1 << cpu; } -static inline int fio_cpu_count(os_cpu_mask_t *mask, int 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); }