[AV: added missing annotations in syscalls.h/compat.h]
Showing the changes to include/uapi/linux (2 of 7 files). Show all
Unified · Split
| @@ -28,6 +28,7 @@ · 27 unmodified lines | ||
| 28 | 28 | #define __LINUX__AIO_ABI_H |
| 29 | 29 | |
| 30 | 30 | #include <linux/types.h> |
| 31 | +#include <linux/fs.h> | |
| 31 | 32 | #include <asm/byteorder.h> |
| 32 | 33 | |
| 33 | 34 | typedef __kernel_ulong_t aio_context_t; |
| @@ -62,14 +63,6 @@ struct io_event { · 28 unmodified lines | ||
| 62 | 63 | __s64 res2; /* secondary result */ |
| 63 | 64 | }; |
| 64 | 65 | |
| 65 | −#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN) | |
| 66 | −#define PADDED(x,y) x, y | |
| 67 | −#elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN) | |
| 68 | −#define PADDED(x,y) y, x | |
| 69 | −#else | |
| 70 | −#error edit for your odd byteorder. | |
| 71 | −#endif | |
| 72 | − | |
| 73 | 66 | /* |
| 74 | 67 | * we always use a 64bit off_t when communicating |
| 75 | 68 | * with userland. its up to libraries to do the |
| @@ -79,8 +72,16 @@ struct io_event { · 3 unmodified lines | ||
| 79 | 72 | struct iocb { |
| 80 | 73 | /* these are internal to the kernel/libc. */ |
| 81 | 74 | __u64 aio_data; /* data to be returned in event's data */ |
| 82 | − __u32 PADDED(aio_key, aio_rw_flags); | |
| 83 | − /* the kernel sets aio_key to the req # */ | |
| 75 | + | |
| 76 | +#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN) | |
| 77 | + __u32 aio_key; /* the kernel sets aio_key to the req # */ | |
| 78 | + __kernel_rwf_t aio_rw_flags; /* RWF_* flags */ | |
| 79 | +#elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN) | |
| 80 | + __kernel_rwf_t aio_rw_flags; /* RWF_* flags */ | |
| 81 | + __u32 aio_key; /* the kernel sets aio_key to the req # */ | |
| 82 | +#else | |
| 83 | +#error edit for your odd byteorder. | |
| 84 | +#endif | |
| 84 | 85 | |
| 85 | 86 | /* common fields */ |
| 86 | 87 | __u16 aio_lio_opcode; /* see IOCB_CMD_ above */ |
| @@ -358,13 +358,25 @@ struct fscrypt_key { · 357 unmodified lines | ||
| 358 | 358 | #define SYNC_FILE_RANGE_WRITE 2 |
| 359 | 359 | #define SYNC_FILE_RANGE_WAIT_AFTER 4 |
| 360 | 360 | |
| 361 | −/* flags for preadv2/pwritev2: */ | |
| 362 | −#define RWF_HIPRI 0x00000001 /* high priority request, poll if possible */ | |
| 363 | −#define RWF_DSYNC 0x00000002 /* per-IO O_DSYNC */ | |
| 364 | −#define RWF_SYNC 0x00000004 /* per-IO O_SYNC */ | |
| 365 | −#define RWF_NOWAIT 0x00000008 /* per-IO, return -EAGAIN if operation would block */ | |
| 366 | − | |
| 367 | −#define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC |\ | |
| 368 | − RWF_NOWAIT) | |
| 361 | +/* | |
| 362 | + * Flags for preadv2/pwritev2: | |
| 363 | + */ | |
| 364 | + | |
| 365 | +typedef int __bitwise __kernel_rwf_t; | |
| 366 | + | |
| 367 | +/* high priority request, poll if possible */ | |
| 368 | +#define RWF_HIPRI ((__force __kernel_rwf_t)0x00000001) | |
| 369 | + | |
| 370 | +/* per-IO O_DSYNC */ | |
| 371 | +#define RWF_DSYNC ((__force __kernel_rwf_t)0x00000002) | |
| 372 | + | |
| 373 | +/* per-IO O_SYNC */ | |
| 374 | +#define RWF_SYNC ((__force __kernel_rwf_t)0x00000004) | |
| 375 | + | |
| 376 | +/* per-IO, return -EAGAIN if operation would block */ | |
| 377 | +#define RWF_NOWAIT ((__force __kernel_rwf_t)0x00000008) | |
| 378 | + | |
| 379 | +/* mask of flags supported by the kernel */ | |
| 380 | +#define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT) | |
| 369 | 381 | |
| 370 | 382 | #endif /* _UAPI_LINUX_FS_H */ |