Mercurial > projects > ldc
comparison tango/tango/stdc/posix/sys/shm.d @ 132:1700239cab2e trunk
[svn r136] MAJOR UNSTABLE UPDATE!!!
Initial commit after moving to Tango instead of Phobos.
Lots of bugfixes...
This build is not suitable for most things.
author | lindquist |
---|---|
date | Fri, 11 Jan 2008 17:57:40 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
131:5825d48b27d1 | 132:1700239cab2e |
---|---|
1 /** | |
2 * D header file for POSIX. | |
3 * | |
4 * Copyright: Public Domain | |
5 * License: Public Domain | |
6 * Authors: Sean Kelly | |
7 * Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition | |
8 */ | |
9 module tango.stdc.posix.sys.shm; | |
10 | |
11 private import tango.stdc.posix.config; | |
12 public import tango.stdc.posix.sys.types; // for pid_t, time_t, key_t, size_t | |
13 public import tango.stdc.posix.sys.ipc; | |
14 | |
15 extern (C): | |
16 | |
17 // | |
18 // XOpen (XSI) | |
19 // | |
20 /* | |
21 SHM_RDONLY | |
22 SHM_RND | |
23 | |
24 SHMLBA | |
25 | |
26 shmatt_t | |
27 | |
28 struct shmid_ds | |
29 { | |
30 ipc_perm shm_perm; | |
31 size_t shm_segsz; | |
32 pid_t shm_lpid; | |
33 pid_t shm_cpid; | |
34 shmatt_t shm_nattch; | |
35 time_t shm_atime; | |
36 time_t shm_dtime; | |
37 time_t shm_ctime; | |
38 } | |
39 | |
40 void* shmat(int, void*, int); | |
41 int shmctl(int, int, shmid_ds*); | |
42 int shmdt(void*); | |
43 int shmget(key_t, size_t, int); | |
44 */ | |
45 | |
46 version( linux ) | |
47 { | |
48 const SHM_RDONLY = 010000; | |
49 const SHM_RND = 020000; | |
50 | |
51 int __getpagesize(); | |
52 alias __getpagesize SHMLBA; | |
53 | |
54 alias c_ulong shmatt_t; | |
55 | |
56 struct shmid_ds | |
57 { | |
58 ipc_perm shm_perm; | |
59 size_t shm_segsz; | |
60 time_t shm_atime; | |
61 c_ulong __unused1; | |
62 time_t shm_dtime; | |
63 c_ulong __unused2; | |
64 time_t shm_ctime; | |
65 c_ulong __unused3; | |
66 pid_t shm_cpid; | |
67 pid_t shm_lpid; | |
68 shmatt_t shm_nattch; | |
69 c_ulong __unused4; | |
70 c_ulong __unused5; | |
71 } | |
72 | |
73 void* shmat(int, void*, int); | |
74 int shmctl(int, int, shmid_ds*); | |
75 int shmdt(void*); | |
76 int shmget(key_t, size_t, int); | |
77 } | |
78 else version( darwin ) | |
79 { | |
80 | |
81 } |