162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * include/asm-xtensa/shmbuf.h
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * The shmid64_ds structure for Xtensa architecture.
662306a36Sopenharmony_ci * Note extra padding because this structure is passed back and forth
762306a36Sopenharmony_ci * between kernel and user space, but the padding is on the wrong
862306a36Sopenharmony_ci * side for big-endian xtensa, for historic reasons.
962306a36Sopenharmony_ci *
1062306a36Sopenharmony_ci * Pad space is left for:
1162306a36Sopenharmony_ci * - 2 miscellaneous 32-bit values
1262306a36Sopenharmony_ci *
1362306a36Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public
1462306a36Sopenharmony_ci * License.  See the file "COPYING" in the main directory of this archive
1562306a36Sopenharmony_ci * for more details.
1662306a36Sopenharmony_ci *
1762306a36Sopenharmony_ci * Copyright (C) 2001 - 2005 Tensilica Inc.
1862306a36Sopenharmony_ci */
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci#ifndef _XTENSA_SHMBUF_H
2162306a36Sopenharmony_ci#define _XTENSA_SHMBUF_H
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ci#include <asm/ipcbuf.h>
2462306a36Sopenharmony_ci#include <asm/posix_types.h>
2562306a36Sopenharmony_ci
2662306a36Sopenharmony_cistruct shmid64_ds {
2762306a36Sopenharmony_ci	struct ipc64_perm	shm_perm;	/* operation perms */
2862306a36Sopenharmony_ci	__kernel_size_t		shm_segsz;	/* size of segment (bytes) */
2962306a36Sopenharmony_ci	unsigned long		shm_atime;	/* last attach time */
3062306a36Sopenharmony_ci	unsigned long		shm_atime_high;
3162306a36Sopenharmony_ci	unsigned long		shm_dtime;	/* last detach time */
3262306a36Sopenharmony_ci	unsigned long		shm_dtime_high;
3362306a36Sopenharmony_ci	unsigned long		shm_ctime;	/* last change time */
3462306a36Sopenharmony_ci	unsigned long		shm_ctime_high;
3562306a36Sopenharmony_ci	__kernel_pid_t		shm_cpid;	/* pid of creator */
3662306a36Sopenharmony_ci	__kernel_pid_t		shm_lpid;	/* pid of last operator */
3762306a36Sopenharmony_ci	unsigned long		shm_nattch;	/* no. of current attaches */
3862306a36Sopenharmony_ci	unsigned long		__unused4;
3962306a36Sopenharmony_ci	unsigned long		__unused5;
4062306a36Sopenharmony_ci};
4162306a36Sopenharmony_ci
4262306a36Sopenharmony_cistruct shminfo64 {
4362306a36Sopenharmony_ci	unsigned long	shmmax;
4462306a36Sopenharmony_ci	unsigned long	shmmin;
4562306a36Sopenharmony_ci	unsigned long	shmmni;
4662306a36Sopenharmony_ci	unsigned long	shmseg;
4762306a36Sopenharmony_ci	unsigned long	shmall;
4862306a36Sopenharmony_ci	unsigned long	__unused1;
4962306a36Sopenharmony_ci	unsigned long	__unused2;
5062306a36Sopenharmony_ci	unsigned long	__unused3;
5162306a36Sopenharmony_ci	unsigned long	__unused4;
5262306a36Sopenharmony_ci};
5362306a36Sopenharmony_ci
5462306a36Sopenharmony_ci#endif	/* _XTENSA_SHMBUF_H */
55