xref: /openbmc/qemu/linux-user/mips/target_structs.h (revision cb5ed407a1ddadf788fd373fed41c87c9e81e5b0)
155a2b163SPetar Jovanovic /*
255a2b163SPetar Jovanovic  * MIPS specific structures for linux-user
355a2b163SPetar Jovanovic  *
455a2b163SPetar Jovanovic  * Copyright (c) 2013 Fabrice Bellard
555a2b163SPetar Jovanovic  *
655a2b163SPetar Jovanovic  * This library is free software; you can redistribute it and/or
755a2b163SPetar Jovanovic  * modify it under the terms of the GNU Lesser General Public
855a2b163SPetar Jovanovic  * License as published by the Free Software Foundation; either
9*1c79145fSChetan Pant  * version 2.1 of the License, or (at your option) any later version.
1055a2b163SPetar Jovanovic  *
1155a2b163SPetar Jovanovic  * This library is distributed in the hope that it will be useful,
1255a2b163SPetar Jovanovic  * but WITHOUT ANY WARRANTY; without even the implied warranty of
1355a2b163SPetar Jovanovic  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1455a2b163SPetar Jovanovic  * Lesser General Public License for more details.
1555a2b163SPetar Jovanovic  *
1655a2b163SPetar Jovanovic  * You should have received a copy of the GNU Lesser General Public
1755a2b163SPetar Jovanovic  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
1855a2b163SPetar Jovanovic  */
1935003856SMarkus Armbruster #ifndef MIPS_TARGET_STRUCTS_H
2035003856SMarkus Armbruster #define MIPS_TARGET_STRUCTS_H
2155a2b163SPetar Jovanovic 
2255a2b163SPetar Jovanovic struct target_ipc_perm {
2355a2b163SPetar Jovanovic     abi_int __key;                      /* Key.  */
2455a2b163SPetar Jovanovic     abi_uint uid;                       /* Owner's user ID.  */
2555a2b163SPetar Jovanovic     abi_uint gid;                       /* Owner's group ID.  */
2655a2b163SPetar Jovanovic     abi_uint cuid;                      /* Creator's user ID.  */
2755a2b163SPetar Jovanovic     abi_uint cgid;                      /* Creator's group ID.  */
2855a2b163SPetar Jovanovic     abi_uint mode;                      /* Read/write permission.  */
2955a2b163SPetar Jovanovic     abi_ushort __seq;                   /* Sequence number.  */
3055a2b163SPetar Jovanovic     abi_ushort __pad1;
3155a2b163SPetar Jovanovic     abi_ulong __unused1;
3255a2b163SPetar Jovanovic     abi_ulong __unused2;
3355a2b163SPetar Jovanovic };
3455a2b163SPetar Jovanovic 
3555a2b163SPetar Jovanovic struct target_shmid_ds {
3655a2b163SPetar Jovanovic     struct target_ipc_perm shm_perm;    /* operation permission struct */
3755a2b163SPetar Jovanovic     abi_long shm_segsz;                 /* size of segment in bytes */
3855a2b163SPetar Jovanovic     abi_ulong shm_atime;                /* time of last shmat() */
3955a2b163SPetar Jovanovic     abi_ulong shm_dtime;                /* time of last shmdt() */
4055a2b163SPetar Jovanovic     abi_ulong shm_ctime;                /* time of last change by shmctl() */
4155a2b163SPetar Jovanovic     abi_int shm_cpid;                   /* pid of creator */
4255a2b163SPetar Jovanovic     abi_int shm_lpid;                   /* pid of last shmop */
4355a2b163SPetar Jovanovic     abi_ulong shm_nattch;               /* number of current attaches */
4455a2b163SPetar Jovanovic     abi_ulong __unused1;
4555a2b163SPetar Jovanovic     abi_ulong __unused2;
4655a2b163SPetar Jovanovic };
4755a2b163SPetar Jovanovic 
482ef41869SAleksandar Markovic #define TARGET_SEMID64_DS
492ef41869SAleksandar Markovic 
502ef41869SAleksandar Markovic /*
512ef41869SAleksandar Markovic  * The semid64_ds structure for the MIPS architecture.
522ef41869SAleksandar Markovic  * Note extra padding because this structure is passed back and forth
532ef41869SAleksandar Markovic  * between kernel and user space.
542ef41869SAleksandar Markovic  */
552ef41869SAleksandar Markovic struct target_semid64_ds {
562ef41869SAleksandar Markovic     struct target_ipc_perm sem_perm;
572ef41869SAleksandar Markovic     abi_ulong sem_otime;
582ef41869SAleksandar Markovic     abi_ulong sem_ctime;
592ef41869SAleksandar Markovic     abi_ulong sem_nsems;
602ef41869SAleksandar Markovic     abi_ulong __unused1;
612ef41869SAleksandar Markovic     abi_ulong __unused2;
622ef41869SAleksandar Markovic };
632ef41869SAleksandar Markovic 
6455a2b163SPetar Jovanovic #endif
65