162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
262306a36Sopenharmony_ci#ifndef _SPARC_SHMBUF_H
362306a36Sopenharmony_ci#define _SPARC_SHMBUF_H
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci#include <asm/ipcbuf.h>
662306a36Sopenharmony_ci#include <asm/posix_types.h>
762306a36Sopenharmony_ci
862306a36Sopenharmony_ci/*
962306a36Sopenharmony_ci * The shmid64_ds structure for sparc architecture.
1062306a36Sopenharmony_ci * Note extra padding because this structure is passed back and forth
1162306a36Sopenharmony_ci * between kernel and user space.
1262306a36Sopenharmony_ci *
1362306a36Sopenharmony_ci * Pad space is left for:
1462306a36Sopenharmony_ci * - 2 miscellaneous 32-bit values
1562306a36Sopenharmony_ci */
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_cistruct shmid64_ds {
1862306a36Sopenharmony_ci	struct ipc64_perm	shm_perm;	/* operation perms */
1962306a36Sopenharmony_ci#if defined(__sparc__) && defined(__arch64__)
2062306a36Sopenharmony_ci	long			shm_atime;	/* last attach time */
2162306a36Sopenharmony_ci	long			shm_dtime;	/* last detach time */
2262306a36Sopenharmony_ci	long			shm_ctime;	/* last change time */
2362306a36Sopenharmony_ci#else
2462306a36Sopenharmony_ci	unsigned long		shm_atime_high;
2562306a36Sopenharmony_ci	unsigned long		shm_atime;	/* last attach time */
2662306a36Sopenharmony_ci	unsigned long		shm_dtime_high;
2762306a36Sopenharmony_ci	unsigned long		shm_dtime;	/* last detach time */
2862306a36Sopenharmony_ci	unsigned long		shm_ctime_high;
2962306a36Sopenharmony_ci	unsigned long		shm_ctime;	/* last change time */
3062306a36Sopenharmony_ci#endif
3162306a36Sopenharmony_ci	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
3262306a36Sopenharmony_ci	__kernel_pid_t		shm_cpid;	/* pid of creator */
3362306a36Sopenharmony_ci	__kernel_pid_t		shm_lpid;	/* pid of last operator */
3462306a36Sopenharmony_ci	unsigned long		shm_nattch;	/* no. of current attaches */
3562306a36Sopenharmony_ci	unsigned long		__unused1;
3662306a36Sopenharmony_ci	unsigned long		__unused2;
3762306a36Sopenharmony_ci};
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_cistruct shminfo64 {
4062306a36Sopenharmony_ci	unsigned long	shmmax;
4162306a36Sopenharmony_ci	unsigned long	shmmin;
4262306a36Sopenharmony_ci	unsigned long	shmmni;
4362306a36Sopenharmony_ci	unsigned long	shmseg;
4462306a36Sopenharmony_ci	unsigned long	shmall;
4562306a36Sopenharmony_ci	unsigned long	__unused1;
4662306a36Sopenharmony_ci	unsigned long	__unused2;
4762306a36Sopenharmony_ci	unsigned long	__unused3;
4862306a36Sopenharmony_ci	unsigned long	__unused4;
4962306a36Sopenharmony_ci};
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ci#endif /* _SPARC_SHMBUF_H */
52