Mercurial > projects > dstep
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dstep/coreservices/carboncore/MultiprocessingInfo.d Sat Aug 01 15:03:28 2009 +0200 @@ -0,0 +1,102 @@ +/** + * Copyright: Copyright (c) 2009 Jacob Carlborg. + * Authors: Jacob Carlborg + * Version: Initial created: Jul 21, 2009 + * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) + */ +module dstep.coreservices.carboncore.MultiprocessingInfo; + +//import dstep.AvailabilityMacros; +import dstep.coreservices.carboncore.MacTypes; +import dstep.coreservices.carboncore.Multiprocessing; + + +enum +{ + kMPQueueInfoVersion = 1L | (kOpaqueQueueID << 16), + kMPSemaphoreInfoVersion = 1L | (kOpaqueSemaphoreID << 16), + kMPEventInfoVersion = 1L | (kOpaqueEventID << 16), + kMPCriticalRegionInfoVersion = 1L | (kOpaqueCriticalRegionID << 16), + kMPNotificationInfoVersion = 1L | (kOpaqueNotificationID << 16), + kMPAddressSpaceInfoVersion = 1L | (kOpaqueAddressSpaceID << 16) +} + +struct MPQueueInfo +{ + uint version_; + MPProcessID processID; + uint queueName; + uint nWaiting; + MPTaskID waitingTaskID; + uint nMessages; + uint nReserved; + void* p1; + void* p2; + void* p3; +} + + +struct MPSemaphoreInfo +{ + uint version_; + MPProcessID processID; + uint semaphoreName; + uint nWaiting; + MPTaskID waitingTaskID; + uint maximum; + uint count; +} + + +struct MPEventInfo +{ + uint version_; + MPProcessID processID; + uint eventName; + uint nWaiting; + MPTaskID waitingTaskID; + uint events; +} + + +struct MPCriticalRegionInfo +{ + uint version_; + MPProcessID processID; + uint regionName; + uint nWaiting; + MPTaskID waitingTaskID; + MPTaskID owningTask; + uint count; +} + + +struct MPNotificationInfo +{ + uint version_; + MPProcessID processID; + uint notificationName; + MPQueueID queueID; + void* p1; + void* p2; + void* p3; + MPEventID eventID; + uint events; + MPSemaphoreID semaphoreID; +} + + +struct MPAddressSpaceInfo +{ + uint version_; + MPProcessID processID; + MPCoherenceID groupID; + uint nTasks; + UInt32* vsid; +} + +extern (C) +{ + int MPGetNextCpuID (MPCoherenceID owningCoherenceID, MPCpuID* cpuID); + int MPGetNextTaskID (MPProcessID owningProcessID, MPTaskID* taskID); +} \ No newline at end of file