#define __NR_sys_vmsplice 316
#endif
+#ifndef __NR_shmget
+#define __NR_shmget 29
+#define __NR_shmat 30
+#define __NR_shmctl 31
+#endif
+
#define FIO_HUGE_PAGE 4194304
#define nop __asm__ __volatile__("rep;nop": : :"memory")
#define SPLICE_DEF_SIZE (64*1024)
-static inline int ioprio_set(int which, int who, int ioprio)
-{
- return syscall(__NR_ioprio_set, which, who, ioprio);
-}
-
enum {
IOPRIO_CLASS_NONE,
IOPRIO_CLASS_RT,
#define IOPRIO_BITS 16
#define IOPRIO_CLASS_SHIFT 13
+static inline int ioprio_set(int which, int who, int ioprio_class, int ioprio)
+{
+ /*
+ * If no class is set, assume BE
+ */
+ if (!ioprio_class)
+ ioprio_class = IOPRIO_CLASS_BE;
+
+ ioprio |= ioprio_class << IOPRIO_CLASS_SHIFT;
+ return syscall(__NR_ioprio_set, which, who, ioprio);
+}
+
#ifndef BLKGETSIZE64
#define BLKGETSIZE64 _IOR(0x12,114,size_t)
#endif