Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 1 | #ifndef ARCH_X86_H |
| 2 | #define ARCH_X86_H |
| 3 | |
| 4 | #define ARCH (arch_i386) |
| 5 | |
| 6 | #ifndef __NR_ioprio_set |
| 7 | #define __NR_ioprio_set 289 |
| 8 | #define __NR_ioprio_get 290 |
| 9 | #endif |
| 10 | |
| 11 | #ifndef __NR_fadvise64 |
| 12 | #define __NR_fadvise64 250 |
| 13 | #endif |
| 14 | |
Jens Axboe | 8756e4d | 2006-05-27 20:24:53 +0200 | [diff] [blame] | 15 | #ifndef __NR_sys_splice |
| 16 | #define __NR_sys_splice 313 |
| 17 | #define __NR_sys_tee 315 |
| 18 | #define __NR_sys_vmsplice 316 |
| 19 | #endif |
| 20 | |
Jens Axboe | a4f4fdd | 2007-02-14 01:16:39 +0100 | [diff] [blame] | 21 | #ifndef __NR_async_register |
| 22 | #define __NR_async_register 320 |
| 23 | #define __NR_async_exec 321 |
| 24 | #define __NR_async_wait 322 |
| 25 | #define __NR_async_unregister 323 |
| 26 | #define __NR_umem_add 324 |
| 27 | #endif |
| 28 | |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 29 | #define nop __asm__ __volatile__("rep;nop": : :"memory") |
| 30 | |
| 31 | static inline unsigned long ffz(unsigned long bitmask) |
| 32 | { |
| 33 | __asm__("bsfl %1,%0" :"=r" (bitmask) :"r" (~bitmask)); |
| 34 | return bitmask; |
| 35 | } |
| 36 | |
| 37 | #endif |