blob: bb7f907cfb8f4df3525474a5701292444d92c1c7 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_LINUX_SHM_H_
20#define _UAPI_LINUX_SHM_H_
21#include <linux/ipc.h>
22#include <linux/errno.h>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#include <unistd.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070025#define SHMMIN 1
26#define SHMMNI 4096
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070027#define SHMMAX (ULONG_MAX - (1UL << 24))
Ben Cheng655a7c02013-10-16 16:09:24 -070028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070029#define SHMALL (ULONG_MAX - (1UL << 24))
Ben Cheng655a7c02013-10-16 16:09:24 -070030#define SHMSEG SHMMNI
31struct shmid_ds {
Tao Baod7db5942015-01-28 10:07:51 -080032 struct ipc_perm shm_perm;
Ben Cheng655a7c02013-10-16 16:09:24 -070033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080034 int shm_segsz;
35 __kernel_time_t shm_atime;
36 __kernel_time_t shm_dtime;
37 __kernel_time_t shm_ctime;
Ben Cheng655a7c02013-10-16 16:09:24 -070038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080039 __kernel_ipc_pid_t shm_cpid;
40 __kernel_ipc_pid_t shm_lpid;
41 unsigned short shm_nattch;
42 unsigned short shm_unused;
Ben Cheng655a7c02013-10-16 16:09:24 -070043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080044 void * shm_unused2;
45 void * shm_unused3;
Ben Cheng655a7c02013-10-16 16:09:24 -070046};
47#include <asm/shmbuf.h>
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49#define SHM_R 0400
50#define SHM_W 0200
51#define SHM_RDONLY 010000
52#define SHM_RND 020000
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54#define SHM_REMAP 040000
55#define SHM_EXEC 0100000
56#define SHM_LOCK 11
57#define SHM_UNLOCK 12
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59#define SHM_STAT 13
60#define SHM_INFO 14
61struct shminfo {
Tao Baod7db5942015-01-28 10:07:51 -080062 int shmmax;
Ben Cheng655a7c02013-10-16 16:09:24 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080064 int shmmin;
65 int shmmni;
66 int shmseg;
67 int shmall;
Ben Cheng655a7c02013-10-16 16:09:24 -070068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69};
70struct shm_info {
Tao Baod7db5942015-01-28 10:07:51 -080071 int used_ids;
72 __kernel_ulong_t shm_tot;
Ben Cheng655a7c02013-10-16 16:09:24 -070073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080074 __kernel_ulong_t shm_rss;
75 __kernel_ulong_t shm_swp;
76 __kernel_ulong_t swap_attempts;
77 __kernel_ulong_t swap_successes;
Ben Cheng655a7c02013-10-16 16:09:24 -070078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79};
80#endif