comparison dstep/coreservices/carboncore/MultiprocessingInfo.d @ 11:07194b026fa4

Added bindings to a couple of frameworks, new license + some other things
author Jacob Carlborg <doob@me.com>
date Sat, 01 Aug 2009 15:03:28 +0200
parents
children
comparison
equal deleted inserted replaced
10:27e00625790b 11:07194b026fa4
1 /**
2 * Copyright: Copyright (c) 2009 Jacob Carlborg.
3 * Authors: Jacob Carlborg
4 * Version: Initial created: Jul 21, 2009
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
6 */
7 module dstep.coreservices.carboncore.MultiprocessingInfo;
8
9 //import dstep.AvailabilityMacros;
10 import dstep.coreservices.carboncore.MacTypes;
11 import dstep.coreservices.carboncore.Multiprocessing;
12
13
14 enum
15 {
16 kMPQueueInfoVersion = 1L | (kOpaqueQueueID << 16),
17 kMPSemaphoreInfoVersion = 1L | (kOpaqueSemaphoreID << 16),
18 kMPEventInfoVersion = 1L | (kOpaqueEventID << 16),
19 kMPCriticalRegionInfoVersion = 1L | (kOpaqueCriticalRegionID << 16),
20 kMPNotificationInfoVersion = 1L | (kOpaqueNotificationID << 16),
21 kMPAddressSpaceInfoVersion = 1L | (kOpaqueAddressSpaceID << 16)
22 }
23
24 struct MPQueueInfo
25 {
26 uint version_;
27 MPProcessID processID;
28 uint queueName;
29 uint nWaiting;
30 MPTaskID waitingTaskID;
31 uint nMessages;
32 uint nReserved;
33 void* p1;
34 void* p2;
35 void* p3;
36 }
37
38
39 struct MPSemaphoreInfo
40 {
41 uint version_;
42 MPProcessID processID;
43 uint semaphoreName;
44 uint nWaiting;
45 MPTaskID waitingTaskID;
46 uint maximum;
47 uint count;
48 }
49
50
51 struct MPEventInfo
52 {
53 uint version_;
54 MPProcessID processID;
55 uint eventName;
56 uint nWaiting;
57 MPTaskID waitingTaskID;
58 uint events;
59 }
60
61
62 struct MPCriticalRegionInfo
63 {
64 uint version_;
65 MPProcessID processID;
66 uint regionName;
67 uint nWaiting;
68 MPTaskID waitingTaskID;
69 MPTaskID owningTask;
70 uint count;
71 }
72
73
74 struct MPNotificationInfo
75 {
76 uint version_;
77 MPProcessID processID;
78 uint notificationName;
79 MPQueueID queueID;
80 void* p1;
81 void* p2;
82 void* p3;
83 MPEventID eventID;
84 uint events;
85 MPSemaphoreID semaphoreID;
86 }
87
88
89 struct MPAddressSpaceInfo
90 {
91 uint version_;
92 MPProcessID processID;
93 MPCoherenceID groupID;
94 uint nTasks;
95 UInt32* vsid;
96 }
97
98 extern (C)
99 {
100 int MPGetNextCpuID (MPCoherenceID owningCoherenceID, MPCpuID* cpuID);
101 int MPGetNextTaskID (MPProcessID owningProcessID, MPTaskID* taskID);
102 }