shmbuf.h (3eb66e91a25497065c5322b1268cbc3953642227) | shmbuf.h (caf5e32d4ea7253820f38dd7c429f8d4a8019c5f) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2#ifndef __ASM_GENERIC_SHMBUF_H 3#define __ASM_GENERIC_SHMBUF_H 4 5#include <asm/bitsperlong.h> 6 7/* 8 * The shmid64_ds structure for x86 architecture. 9 * Note extra padding because this structure is passed back and forth 10 * between kernel and user space. 11 * 12 * shmid64_ds was originally meant to be architecture specific, but 13 * everyone just ended up making identical copies without specific 14 * optimizations, so we may just as well all use the same one. 15 * | 1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2#ifndef __ASM_GENERIC_SHMBUF_H 3#define __ASM_GENERIC_SHMBUF_H 4 5#include <asm/bitsperlong.h> 6 7/* 8 * The shmid64_ds structure for x86 architecture. 9 * Note extra padding because this structure is passed back and forth 10 * between kernel and user space. 11 * 12 * shmid64_ds was originally meant to be architecture specific, but 13 * everyone just ended up making identical copies without specific 14 * optimizations, so we may just as well all use the same one. 15 * |
16 * 64 bit architectures typically define a 64 bit __kernel_time_t, 17 * so they do not need the first two padding words. 18 * On big-endian systems, the padding is in the wrong place. | 16 * 64 bit architectures use a 64-bit long time field here, while 17 * 32 bit architectures have a pair of unsigned long values. 18 * On big-endian systems, the lower half is in the wrong place. |
19 * 20 * 21 * Pad space is left for: 22 * - 2 miscellaneous 32-bit values 23 */ 24 25struct shmid64_ds { 26 struct ipc64_perm shm_perm; /* operation perms */ 27 size_t shm_segsz; /* size of segment (bytes) */ 28#if __BITS_PER_LONG == 64 | 19 * 20 * 21 * Pad space is left for: 22 * - 2 miscellaneous 32-bit values 23 */ 24 25struct shmid64_ds { 26 struct ipc64_perm shm_perm; /* operation perms */ 27 size_t shm_segsz; /* size of segment (bytes) */ 28#if __BITS_PER_LONG == 64 |
29 __kernel_time_t shm_atime; /* last attach time */ 30 __kernel_time_t shm_dtime; /* last detach time */ 31 __kernel_time_t shm_ctime; /* last change time */ | 29 long shm_atime; /* last attach time */ 30 long shm_dtime; /* last detach time */ 31 long shm_ctime; /* last change time */ |
32#else 33 unsigned long shm_atime; /* last attach time */ 34 unsigned long shm_atime_high; 35 unsigned long shm_dtime; /* last detach time */ 36 unsigned long shm_dtime_high; 37 unsigned long shm_ctime; /* last change time */ 38 unsigned long shm_ctime_high; 39#endif --- 20 unchanged lines hidden --- | 32#else 33 unsigned long shm_atime; /* last attach time */ 34 unsigned long shm_atime_high; 35 unsigned long shm_dtime; /* last detach time */ 36 unsigned long shm_dtime_high; 37 unsigned long shm_ctime; /* last change time */ 38 unsigned long shm_ctime_high; 39#endif --- 20 unchanged lines hidden --- |