1 {
2      File:       CarbonCore/Multiprocessing.h
3 
4      Contains:   Multiprocessing interfaces
5                  The contents of this header file are deprecated.
6 
7      Copyright:  � 1995-2011 DayStar Digital, Inc.
8 }
9 {
10     Modified for use with Free Pascal
11     Version 308
12     Please report any bugs to <gpc@microbizz.nl>
13 }
14 
15 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
16 {$mode macpas}
17 {$modeswitch cblocks}
18 {$packenum 1}
19 {$macro on}
20 {$inline on}
21 {$calling mwpascal}
22 
23 unit Multiprocessing;
24 interface
25 {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
26 {$setc GAP_INTERFACES_VERSION := $0308}
27 
28 {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
29     {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
30 {$endc}
31 
32 {$ifc defined CPUPOWERPC and defined CPUI386}
33 	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
34 {$endc}
35 {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
36 	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
37 {$endc}
38 
39 {$ifc not defined __ppc__ and defined CPUPOWERPC32}
40 	{$setc __ppc__ := 1}
41 {$elsec}
42 	{$setc __ppc__ := 0}
43 {$endc}
44 {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
45 	{$setc __ppc64__ := 1}
46 {$elsec}
47 	{$setc __ppc64__ := 0}
48 {$endc}
49 {$ifc not defined __i386__ and defined CPUI386}
50 	{$setc __i386__ := 1}
51 {$elsec}
52 	{$setc __i386__ := 0}
53 {$endc}
54 {$ifc not defined __x86_64__ and defined CPUX86_64}
55 	{$setc __x86_64__ := 1}
56 {$elsec}
57 	{$setc __x86_64__ := 0}
58 {$endc}
59 {$ifc not defined __arm__ and defined CPUARM}
60 	{$setc __arm__ := 1}
61 {$elsec}
62 	{$setc __arm__ := 0}
63 {$endc}
64 {$ifc not defined __arm64__ and defined CPUAARCH64}
65   {$setc __arm64__ := 1}
66 {$elsec}
67   {$setc __arm64__ := 0}
68 {$endc}
69 
70 {$ifc defined cpu64}
71   {$setc __LP64__ := 1}
72 {$elsec}
73   {$setc __LP64__ := 0}
74 {$endc}
75 
76 
77 {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
78 	{$error Conflicting definitions for __ppc__ and __i386__}
79 {$endc}
80 
81 {$ifc defined __ppc__ and __ppc__}
82 	{$setc TARGET_CPU_PPC := TRUE}
83 	{$setc TARGET_CPU_PPC64 := FALSE}
84 	{$setc TARGET_CPU_X86 := FALSE}
85 	{$setc TARGET_CPU_X86_64 := FALSE}
86 	{$setc TARGET_CPU_ARM := FALSE}
87 	{$setc TARGET_CPU_ARM64 := FALSE}
88 	{$setc TARGET_OS_MAC := TRUE}
89 	{$setc TARGET_OS_IPHONE := FALSE}
90 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
91 	{$setc TARGET_OS_EMBEDDED := FALSE}
92 {$elifc defined __ppc64__ and __ppc64__}
93 	{$setc TARGET_CPU_PPC := FALSE}
94 	{$setc TARGET_CPU_PPC64 := TRUE}
95 	{$setc TARGET_CPU_X86 := FALSE}
96 	{$setc TARGET_CPU_X86_64 := FALSE}
97 	{$setc TARGET_CPU_ARM := FALSE}
98 	{$setc TARGET_CPU_ARM64 := FALSE}
99 	{$setc TARGET_OS_MAC := TRUE}
100 	{$setc TARGET_OS_IPHONE := FALSE}
101 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
102 	{$setc TARGET_OS_EMBEDDED := FALSE}
103 {$elifc defined __i386__ and __i386__}
104 	{$setc TARGET_CPU_PPC := FALSE}
105 	{$setc TARGET_CPU_PPC64 := FALSE}
106 	{$setc TARGET_CPU_X86 := TRUE}
107 	{$setc TARGET_CPU_X86_64 := FALSE}
108 	{$setc TARGET_CPU_ARM := FALSE}
109 	{$setc TARGET_CPU_ARM64 := FALSE}
110 {$ifc defined iphonesim}
111  	{$setc TARGET_OS_MAC := FALSE}
112 	{$setc TARGET_OS_IPHONE := TRUE}
113 	{$setc TARGET_IPHONE_SIMULATOR := TRUE}
114 {$elsec}
115 	{$setc TARGET_OS_MAC := TRUE}
116 	{$setc TARGET_OS_IPHONE := FALSE}
117 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
118 {$endc}
119 	{$setc TARGET_OS_EMBEDDED := FALSE}
120 {$elifc defined __x86_64__ and __x86_64__}
121 	{$setc TARGET_CPU_PPC := FALSE}
122 	{$setc TARGET_CPU_PPC64 := FALSE}
123 	{$setc TARGET_CPU_X86 := FALSE}
124 	{$setc TARGET_CPU_X86_64 := TRUE}
125 	{$setc TARGET_CPU_ARM := FALSE}
126 	{$setc TARGET_CPU_ARM64 := FALSE}
127 {$ifc defined iphonesim}
128  	{$setc TARGET_OS_MAC := FALSE}
129 	{$setc TARGET_OS_IPHONE := TRUE}
130 	{$setc TARGET_IPHONE_SIMULATOR := TRUE}
131 {$elsec}
132 	{$setc TARGET_OS_MAC := TRUE}
133 	{$setc TARGET_OS_IPHONE := FALSE}
134 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
135 {$endc}
136 	{$setc TARGET_OS_EMBEDDED := FALSE}
137 {$elifc defined __arm__ and __arm__}
138 	{$setc TARGET_CPU_PPC := FALSE}
139 	{$setc TARGET_CPU_PPC64 := FALSE}
140 	{$setc TARGET_CPU_X86 := FALSE}
141 	{$setc TARGET_CPU_X86_64 := FALSE}
142 	{$setc TARGET_CPU_ARM := TRUE}
143 	{$setc TARGET_CPU_ARM64 := FALSE}
144 	{$setc TARGET_OS_MAC := FALSE}
145 	{$setc TARGET_OS_IPHONE := TRUE}
146 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
147 	{$setc TARGET_OS_EMBEDDED := TRUE}
148 {$elifc defined __arm64__ and __arm64__}
149 	{$setc TARGET_CPU_PPC := FALSE}
150 	{$setc TARGET_CPU_PPC64 := FALSE}
151 	{$setc TARGET_CPU_X86 := FALSE}
152 	{$setc TARGET_CPU_X86_64 := FALSE}
153 	{$setc TARGET_CPU_ARM := FALSE}
154 	{$setc TARGET_CPU_ARM64 := TRUE}
155 {$ifc defined ios}
156 	{$setc TARGET_OS_MAC := FALSE}
157 	{$setc TARGET_OS_IPHONE := TRUE}
158 	{$setc TARGET_OS_EMBEDDED := TRUE}
159 {$elsec}
160 	{$setc TARGET_OS_MAC := TRUE}
161 	{$setc TARGET_OS_IPHONE := FALSE}
162 	{$setc TARGET_OS_EMBEDDED := FALSE}
163 {$endc}
164 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
165 {$elsec}
166 	{$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
167 {$endc}
168 
169 {$ifc defined __LP64__ and __LP64__ }
170   {$setc TARGET_CPU_64 := TRUE}
171 {$elsec}
172   {$setc TARGET_CPU_64 := FALSE}
173 {$endc}
174 
175 {$ifc defined FPC_BIG_ENDIAN}
176 	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
177 	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
178 {$elifc defined FPC_LITTLE_ENDIAN}
179 	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
180 	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
181 {$elsec}
182 	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
183 {$endc}
184 {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
185 {$setc CALL_NOT_IN_CARBON := FALSE}
186 {$setc OLDROUTINENAMES := FALSE}
187 {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
188 {$setc OPAQUE_UPP_TYPES := TRUE}
189 {$setc OTCARBONAPPLICATION := TRUE}
190 {$setc OTKERNEL := FALSE}
191 {$setc PM_USE_SESSION_APIS := TRUE}
192 {$setc TARGET_API_MAC_CARBON := TRUE}
193 {$setc TARGET_API_MAC_OS8 := FALSE}
194 {$setc TARGET_API_MAC_OSX := TRUE}
195 {$setc TARGET_CARBON := TRUE}
196 {$setc TARGET_CPU_68K := FALSE}
197 {$setc TARGET_CPU_MIPS := FALSE}
198 {$setc TARGET_CPU_SPARC := FALSE}
199 {$setc TARGET_OS_UNIX := FALSE}
200 {$setc TARGET_OS_WIN32 := FALSE}
201 {$setc TARGET_RT_MAC_68881 := FALSE}
202 {$setc TARGET_RT_MAC_CFM := FALSE}
203 {$setc TARGET_RT_MAC_MACHO := TRUE}
204 {$setc TYPED_FUNCTION_POINTERS := TRUE}
205 {$setc TYPE_BOOL := FALSE}
206 {$setc TYPE_EXTENDED := FALSE}
207 {$setc TYPE_LONGLONG := TRUE}
208 uses MacTypes;
209 {$endc} {not MACOSALLINCLUDE}
210 
211 
212 {$ifc TARGET_OS_MAC}
213 
214 {********************************************************************************************
215 
216  The Multiprocessing Utilities are deprecated.  Callers should use blocks, libDispatch, or pthreads.
217 
218 ********************************************************************************************}
219 {
220    ===========================================================================================
221    *** WARNING: You must properly check the availability of MP services before calling them!
222    See the section titled "Checking API Availability".
223    ===========================================================================================
224 }
225 
226 
227 {$ALIGN POWER}
228 
229 
230 {
231    ======================================= NOTICE ============================================
232    As of Mac OS X v10.6, the APIs in this header file are discouraged. These APIs are slated
233    for deprecation in the next major release of OS X. The new dispatch APIs (see dispatch(3))
234    replace the Multiprocessing APIs and the pthread threading APIs.
235    ===========================================================================================
236 }
237 
238 {
239    ===========================================================================================
240    This is the header file for version 2.2 of the Mac OS multiprocessing support.  This version
241    has been totally reimplemented and has significant new services.  The main goal of the
242    reimplementation has been to transfer task management into the core operating system to provide
243    much more reliable and more efficient operation, including on single processor machines.
244    The memory management has also been massively improved, it is much faster and wastes much
245    less space.  New services include POSIX style per-task storage, timers with millisecond and
246    microsecond resolutions, memory allocation at a specified alignment, and system pageable
247    and RAM resident memory pools.  See the MP API documentation for details.
248    The old "DayStar" debugging services (whose names began with an underscore) have been
249    removed from this header.  A very few are still implemented for binary compatibility, or in
250    cases where they happened to be exposed inappropriately.  (E.g. _MPIsFullyInitialized must
251    be called to see if the MP API is ReallyTruly� usable.)  New code and recompiles of old
252    code should avoid use of these defunct services, except for _MPIsFullyInitialized.
253    ===========================================================================================
254 }
255 
256 
257 {
258    ===========================================================================================
259    The following services are from the original MP API and remain supported in version 2.0:
260     MPProcessors
261     MPCreateTask
262     MPTerminateTask
263     MPCurrentTaskID
264     MPYield
265     MPExit
266     MPCreateQueue
267     MPDeleteQueue
268     MPNotifyQueue
269     MPWaitOnQueue
270     MPCreateSemaphore
271     MPCreateBinarySemaphore     (In C only, a macro that calls MPCreateSemaphore.)
272     MPDeleteSemaphore
273     MPSignalSemaphore
274     MPWaitOnSemaphore
275     MPCreateCriticalRegion
276     MPDeleteCriticalRegion
277     MPEnterCriticalRegion
278     MPExitCriticalRegion
279     MPAllocate                  (Deprecated, use MPAllocateAligned for new builds.)
280     MPFree
281     MPBlockCopy
282     MPLibraryIsLoaded           (In C only, a macro.)
283     _MPIsFullyInitialized       (See comments about checking for MP API availability.)
284    ===========================================================================================
285 }
286 
287 
288 {
289    ===========================================================================================
290    The following services are new in version 2.0:
291     MPProcessorsScheduled
292     MPSetTaskWeight
293     MPTaskIsPreemptive
294     MPAllocateTaskStorageIndex
295     MPDeallocateTaskStorageIndex
296     MPSetTaskStorageValue
297     MPGetTaskStorageValue
298     MPSetQueueReserve
299     MPCreateEvent
300     MPDeleteEvent
301     MPSetEvent
302     MPWaitForEvent
303     UpTime
304     DurationToAbsolute
305     AbsoluteToDuration
306     MPDelayUntil
307     MPCreateTimer
308     MPDeleteTimer
309     MPSetTimerNotify
310     MPArmTimer
311     MPCancelTimer
312     MPSetExceptionHandler
313     MPThrowException
314     MPDisposeTaskException
315     MPExtractTaskState
316     MPSetTaskState
317     MPRegisterDebugger
318     MPUnregisterDebugger
319     MPAllocateAligned           (Preferred over MPAllocate.)
320     MPGetAllocatedBlockSize
321     MPBlockClear
322     MPDataToCode
323     MPRemoteCall                (Preferred over _MPRPC.)
324    ===========================================================================================
325 }
326 
327 
328 {
329    ===========================================================================================
330    The following services are new in version 2.1:
331     MPCreateNotification
332     MPDeleteNotification
333     MPModifyNotification
334     MPCauseNotification
335     MPGetNextTaskID
336     MPGetNextCpuID
337    ===========================================================================================
338 }
339 
340 
341 {
342    ===========================================================================================
343    The following services are "unofficial" extensions to the original API.  They are not in
344    the multiprocessing API documentation, but were in previous versions of this header.  They
345    remain supported in version 2.0.  They may not be supported in other environments.
346     _MPRPC                      (Deprecated, use MPRemoteCall for new builds.)
347     _MPAllocateSys              (Deprecated, use MPAllocateAligned for new builds.)
348     _MPTaskIsToolboxSafe
349     _MPLibraryVersion
350     _MPLibraryIsCompatible
351    ===========================================================================================
352 }
353 
354 
355 {
356    ===========================================================================================
357    The following services were in previous versions of this header for "debugging only" use.
358    They are NOT implemented in version 2.0.  For old builds they can be accessed by defining
359    the symbol MPIncludeDefunctServices to have a nonzero value.
360     _MPInitializePrintf
361     _MPPrintf
362     _MPDebugStr
363     _MPStatusPString
364     _MPStatusCString
365    ===========================================================================================
366 }
367 
368 
369 {
370 371    ===========================================================================================
372    General Types and Constants
373    ===========================
374 }
375 
376 const
377   MPCopyrightNotice = 'Copyright � 1995-2000 Apple Computer, Inc.';
378 const
379 	MPLibraryName = 'MPLibrary';
380 	MPLibraryCName = MPLibraryName;
381 	MPLibraryPName = MPLibraryName;
382 const
383 	MP_API_Version = '2.3';
384 
385 const
386 	MPLibrary_MajorVersion = 2;    { ! When these change be sure to update the build versions}
387 	MPLibrary_MinorVersion = 3;    { !  used in the startup check in MPInitializeAPI!}
388 	MPLibrary_Release = 1;
389 	MPLibrary_DevelopmentRevision = 1;
390 
391 
392 type
393 	MPProcessID = ^OpaqueMPProcessID; { an opaque type }
394 	OpaqueMPProcessID = record end;
395 	MPProcessIDPtr = ^MPProcessID;
396 	MPTaskID = ^OpaqueMPTaskID; { an opaque type }
397 	OpaqueMPTaskID = record end;
398 	MPTaskIDPtr = ^MPTaskID;
399 	MPQueueID = ^OpaqueMPQueueID; { an opaque type }
400 	OpaqueMPQueueID = record end;
401 	MPQueueIDPtr = ^MPQueueID;
402 	MPSemaphoreID = ^OpaqueMPSemaphoreID; { an opaque type }
403 	OpaqueMPSemaphoreID = record end;
404 	MPSemaphoreIDPtr = ^MPSemaphoreID;
405 	MPCriticalRegionID = ^OpaqueMPCriticalRegionID; { an opaque type }
406 	OpaqueMPCriticalRegionID = record end;
407 	MPCriticalRegionIDPtr = ^MPCriticalRegionID;
408 	MPTimerID = ^OpaqueMPTimerID; { an opaque type }
409 	OpaqueMPTimerID = record end;
410 	MPTimerIDPtr = ^MPTimerID;
411 	MPEventID = ^OpaqueMPEventID; { an opaque type }
412 	OpaqueMPEventID = record end;
413 	MPEventIDPtr = ^MPEventID;
414 	MPAddressSpaceID = ^OpaqueMPAddressSpaceID; { an opaque type }
415 	OpaqueMPAddressSpaceID = record end;
416 	MPAddressSpaceIDPtr = ^MPAddressSpaceID;
417 	MPNotificationID = ^OpaqueMPNotificationID; { an opaque type }
418 	OpaqueMPNotificationID = record end;
419 	MPNotificationIDPtr = ^MPNotificationID;
420 	MPCoherenceID = ^OpaqueMPCoherenceID; { an opaque type }
421 	OpaqueMPCoherenceID = record end;
422 	MPCoherenceIDPtr = ^MPCoherenceID;
423 	MPCpuID = ^OpaqueMPCpuID; { an opaque type }
424 	OpaqueMPCpuID = record end;
425 	MPCpuIDPtr = ^MPCpuID;
426 	MPAreaID = ^OpaqueMPAreaID; { an opaque type }
427 	OpaqueMPAreaID = record end;
428 	MPAreaIDPtr = ^MPAreaID;
429 	MPConsoleID = ^OpaqueMPConsoleID; { an opaque type }
430 	OpaqueMPConsoleID = record end;
431 	MPConsoleIDPtr = ^MPConsoleID;
432 	MPOpaqueID = ^OpaqueMPOpaqueID; { an opaque type }
433 	OpaqueMPOpaqueID = record end;
434 	MPOpaqueIDPtr = ^MPOpaqueID;
435 const
436 { Values for MPOpaqueIDClass.}
437 	kOpaqueAnyID = 0;
438 	kOpaqueProcessID = 1;
439 	kOpaqueTaskID = 2;
440 	kOpaqueTimerID = 3;
441 	kOpaqueQueueID = 4;
442 	kOpaqueSemaphoreID = 5;
443 	kOpaqueCriticalRegionID = 6;
444 	kOpaqueCpuID = 7;
445 	kOpaqueAddressSpaceID = 8;
446 	kOpaqueEventID = 9;
447 	kOpaqueCoherenceID = 10;
448 	kOpaqueAreaID = 11;
449 	kOpaqueNotificationID = 12;
450 	kOpaqueConsoleID = 13;
451 
452 type
453 	MPOpaqueIDClass = UInt32;
454 
455 const
456 	kMPNoID = kInvalidID; { New code should use kInvalidID everywhere.}
457 
458 
459 type
460 	MPTaskOptions = OptionBits;
461 	MPTaskOptionsPtr = ^MPTaskOptions;
462 	TaskStorageIndex = ItemCount;
463 	TaskStorageIndexPtr = ^TaskStorageIndex;
464 	TaskStorageValue = LogicalAddress;
465 	TaskStorageValuePtr = ^TaskStorageValue;
466 	MPSemaphoreCount = ItemCount;
467 	MPSemaphoreCountPtr = ^MPSemaphoreCount;
468 	MPTaskWeight = UInt32;
469 	MPTaskWeightPtr = ^MPTaskWeight;
470 	MPEventFlags = UInt32;
471 	MPEventFlagsPtr = ^MPEventFlags;
472 	MPExceptionKind = UInt32;
473 	MPExceptionKindPtr = ^MPExceptionKind;
474 	MPTaskStateKind = UInt32;
475 	MPTaskStateKindPtr = ^MPTaskStateKind;
476 	MPPageSizeClass = UInt32;
477 	MPPageSizeClassPtr = ^MPPageSizeClass;
478 
479 const
480 	kDurationImmediate = 0;
481 	kDurationForever = $7FFFFFFF;
482 	kDurationMillisecond = 1;
483 	kDurationMicrosecond = -1;
484 
485 
486 {
487 488    ===========================================================================================
489    Process/Processor Services
490    ==========================
491 }
492 
493 
494 {
495  *  MPProcessors()   *** DEPRECATED ***
496  *
497  *  Mac OS X threading:
498  *    Not thread safe
499  *
500  *  Availability:
501  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
502  *    CarbonLib:        in CarbonLib 1.0 and later
503  *    Non-Carbon CFM:   in MPLibrary 1.0 and later
504  }
MPProcessorsnull505 function MPProcessors: ItemCount; external name '_MPProcessors';
506 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
507 
508 
509 { The physical total.}
510 
511 {
512  *  MPProcessorsScheduled()   *** DEPRECATED ***
513  *
514  *  Mac OS X threading:
515  *    Not thread safe
516  *
517  *  Availability:
518  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
519  *    CarbonLib:        in CarbonLib 1.0 and later
520  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
521  }
MPProcessorsSchedulednull522 function MPProcessorsScheduled: ItemCount; external name '_MPProcessorsScheduled';
523 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
524 
525 
526 { Those currently in use.}
527 
528 {
529 530    ===========================================================================================
531    Tasking Services
532    ================
533 }
534 
535 
536 const
537 { For MPCreateTask options}
538 	kMPCreateTaskSuspendedMask = 1 shl 0; {    not supported on Mac OS X}
539 	kMPCreateTaskTakesAllExceptionsMask = 1 shl 1;
540 	kMPCreateTaskNotDebuggableMask = 1 shl 2;
541 	kMPCreateTaskValidOptionsMask = kMPCreateTaskSuspendedMask or kMPCreateTaskTakesAllExceptionsMask or kMPCreateTaskNotDebuggableMask;
542 
543 
544 { -------------------------------------------------------------------------------------------}
545 
546 
547 type
parameternull548 	TaskProc = function( parameter: UnivPtr ): OSStatus;
549 
550 {
551  *  MPCreateTask()   *** DEPRECATED ***
552  *
553  *  Mac OS X threading:
554  *    Thread safe
555  *
556  *  Availability:
557  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
558  *    CarbonLib:        in CarbonLib 1.0 and later
559  *    Non-Carbon CFM:   in MPLibrary 1.0 and later
560  }
MPCreateTasknull561 function MPCreateTask( entryPoint: TaskProc; parameter: UnivPtr; stackSize: ByteCount; notifyQueue: MPQueueID; terminationParameter1: UnivPtr; terminationParameter2: UnivPtr; options: MPTaskOptions; task: MPTaskIDPtr ): OSStatus; external name '_MPCreateTask';
562 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
563 
564 
565 {
566  *  MPTerminateTask()   *** DEPRECATED ***
567  *
568  *  Mac OS X threading:
569  *    Thread safe
570  *
571  *  Availability:
572  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
573  *    CarbonLib:        in CarbonLib 1.0 and later
574  *    Non-Carbon CFM:   in MPLibrary 1.0 and later
575  }
MPTerminateTasknull576 function MPTerminateTask( task: MPTaskID; terminationStatus: OSStatus ): OSStatus; external name '_MPTerminateTask';
577 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
578 
579 
580 {
581  *  MPSetTaskWeight()   *** DEPRECATED ***
582  *
583  *  Mac OS X threading:
584  *    Thread safe
585  *
586  *  Availability:
587  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
588  *    CarbonLib:        in CarbonLib 1.0 and later
589  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
590  }
MPSetTaskWeightnull591 function MPSetTaskWeight( task: MPTaskID; weight: MPTaskWeight ): OSStatus; external name '_MPSetTaskWeight';
592 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
593 
594 
595 {
596  *  MPTaskIsPreemptive()   *** DEPRECATED ***
597  *
598  *  Mac OS X threading:
599  *    Thread safe
600  *
601  *  Availability:
602  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
603  *    CarbonLib:        in CarbonLib 1.0 and later
604  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
605  }
MPTaskIsPreemptivenull606 function MPTaskIsPreemptive( taskID: MPTaskID ): Boolean; external name '_MPTaskIsPreemptive';
607 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
608 
609 
610 { May be kInvalidID.}
611 
612 {
613  *  MPExit()   *** DEPRECATED ***
614  *
615  *  Mac OS X threading:
616  *    Thread safe
617  *
618  *  Availability:
619  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
620  *    CarbonLib:        in CarbonLib 1.0 and later
621  *    Non-Carbon CFM:   in MPLibrary 1.0 and later
622  }
623 procedure MPExit( status: OSStatus ); external name '_MPExit';
624 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
625 
626 
627 {
628  *  MPYield()   *** DEPRECATED ***
629  *
630  *  Mac OS X threading:
631  *    Thread safe
632  *
633  *  Availability:
634  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
635  *    CarbonLib:        in CarbonLib 1.0 and later
636  *    Non-Carbon CFM:   in MPLibrary 1.0 and later
637  }
638 procedure MPYield; external name '_MPYield';
639 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
640 
641 
642 {
643  *  MPCurrentTaskID()   *** DEPRECATED ***
644  *
645  *  Mac OS X threading:
646  *    Thread safe
647  *
648  *  Availability:
649  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
650  *    CarbonLib:        in CarbonLib 1.0 and later
651  *    Non-Carbon CFM:   in MPLibrary 1.0 and later
652  }
MPCurrentTaskIDnull653 function MPCurrentTaskID: MPTaskID; external name '_MPCurrentTaskID';
654 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
655 
656 
657 {
658  *  MPSetTaskType()
659  *
660  *  Mac OS X threading:
661  *    Thread safe
662  *
663  *  Availability:
664  *    Mac OS X:         in version 10.1 and later in CoreServices.framework
665  *    CarbonLib:        in CarbonLib 1.0 and later
666  *    Non-Carbon CFM:   in MPLibrary 2.3 and later
667  }
MPSetTaskTypenull668 function MPSetTaskType( task: MPTaskID; taskType: OSType ): OSStatus; external name '_MPSetTaskType';
669 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
670 
671 
672 { -------------------------------------------------------------------------------------------}
673 
674 
675 {
676    ---------------------------------------------------
677    ! The task storage services are new in version 2.0.
678 }
679 
680 
681 {
682  *  MPAllocateTaskStorageIndex()   *** DEPRECATED ***
683  *
684  *  Mac OS X threading:
685  *    Thread safe
686  *
687  *  Availability:
688  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
689  *    CarbonLib:        in CarbonLib 1.0 and later
690  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
691  }
MPAllocateTaskStorageIndexnull692 function MPAllocateTaskStorageIndex( var taskIndex: TaskStorageIndex ): OSStatus; external name '_MPAllocateTaskStorageIndex';
693 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
694 
695 
696 {
697  *  MPDeallocateTaskStorageIndex()   *** DEPRECATED ***
698  *
699  *  Mac OS X threading:
700  *    Thread safe
701  *
702  *  Availability:
703  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
704  *    CarbonLib:        in CarbonLib 1.0 and later
705  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
706  }
MPDeallocateTaskStorageIndexnull707 function MPDeallocateTaskStorageIndex( taskIndex: TaskStorageIndex ): OSStatus; external name '_MPDeallocateTaskStorageIndex';
708 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
709 
710 
711 {
712  *  MPSetTaskStorageValue()   *** DEPRECATED ***
713  *
714  *  Mac OS X threading:
715  *    Thread safe
716  *
717  *  Availability:
718  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
719  *    CarbonLib:        in CarbonLib 1.0 and later
720  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
721  }
MPSetTaskStorageValuenull722 function MPSetTaskStorageValue( taskIndex: TaskStorageIndex; value: TaskStorageValue ): OSStatus; external name '_MPSetTaskStorageValue';
723 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
724 
725 
726 {
727  *  MPGetTaskStorageValue()   *** DEPRECATED ***
728  *
729  *  Mac OS X threading:
730  *    Thread safe
731  *
732  *  Availability:
733  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
734  *    CarbonLib:        in CarbonLib 1.0 and later
735  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
736  }
MPGetTaskStorageValuenull737 function MPGetTaskStorageValue( taskIndex: TaskStorageIndex ): TaskStorageValue; external name '_MPGetTaskStorageValue';
738 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
739 
740 
741 {
742 743    ===========================================================================================
744    Synchronization Services
745    ========================
746 }
747 
748 
749 {
750  *  MPCreateQueue()   *** DEPRECATED ***
751  *
752  *  Mac OS X threading:
753  *    Thread safe
754  *
755  *  Availability:
756  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
757  *    CarbonLib:        in CarbonLib 1.0 and later
758  *    Non-Carbon CFM:   in MPLibrary 1.0 and later
759  }
MPCreateQueuenull760 function MPCreateQueue( var queue: MPQueueID ): OSStatus; external name '_MPCreateQueue';
761 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
762 
763 
764 {
765  *  MPDeleteQueue()   *** DEPRECATED ***
766  *
767  *  Mac OS X threading:
768  *    Thread safe
769  *
770  *  Availability:
771  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
772  *    CarbonLib:        in CarbonLib 1.0 and later
773  *    Non-Carbon CFM:   in MPLibrary 1.0 and later
774  }
MPDeleteQueuenull775 function MPDeleteQueue( queue: MPQueueID ): OSStatus; external name '_MPDeleteQueue';
776 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
777 
778 
779 {
780  *  MPNotifyQueue()   *** DEPRECATED ***
781  *
782  *  Mac OS X threading:
783  *    Thread safe
784  *
785  *  Availability:
786  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
787  *    CarbonLib:        in CarbonLib 1.0 and later
788  *    Non-Carbon CFM:   in MPLibrary 1.0 and later
789  }
MPNotifyQueuenull790 function MPNotifyQueue( queue: MPQueueID; param1: UnivPtr; param2: UnivPtr; param3: UnivPtr ): OSStatus; external name '_MPNotifyQueue';
791 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
792 
793 
794 {
795  *  MPWaitOnQueue()   *** DEPRECATED ***
796  *
797  *  Mac OS X threading:
798  *    Thread safe
799  *
800  *  Availability:
801  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
802  *    CarbonLib:        in CarbonLib 1.0 and later
803  *    Non-Carbon CFM:   in MPLibrary 1.0 and later
804  }
MPWaitOnQueuenull805 function MPWaitOnQueue( queue: MPQueueID; var param1: UnivPtr; var param2: UnivPtr; var param3: UnivPtr; timeout: Duration ): OSStatus; external name '_MPWaitOnQueue';
806 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
807 
808 
809 {
810  *  MPSetQueueReserve()   *** DEPRECATED ***
811  *
812  *  Mac OS X threading:
813  *    Thread safe
814  *
815  *  Availability:
816  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
817  *    CarbonLib:        in CarbonLib 1.0 and later
818  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
819  }
MPSetQueueReservenull820 function MPSetQueueReserve( queue: MPQueueID; count: ItemCount ): OSStatus; external name '_MPSetQueueReserve';
821 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
822 
823 
824 { -------------------------------------------------------------------------------------------}
825 
826 
827 {
828  *  MPCreateSemaphore()   *** DEPRECATED ***
829  *
830  *  Mac OS X threading:
831  *    Thread safe
832  *
833  *  Availability:
834  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
835  *    CarbonLib:        in CarbonLib 1.0 and later
836  *    Non-Carbon CFM:   in MPLibrary 1.0 and later
837  }
MPCreateSemaphorenull838 function MPCreateSemaphore( maximumValue: MPSemaphoreCount; initialValue: MPSemaphoreCount; var semaphore: MPSemaphoreID ): OSStatus; external name '_MPCreateSemaphore';
839 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
840 
841 
842 {
843  *  MPDeleteSemaphore()   *** DEPRECATED ***
844  *
845  *  Mac OS X threading:
846  *    Thread safe
847  *
848  *  Availability:
849  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
850  *    CarbonLib:        in CarbonLib 1.0 and later
851  *    Non-Carbon CFM:   in MPLibrary 1.0 and later
852  }
MPDeleteSemaphorenull853 function MPDeleteSemaphore( semaphore: MPSemaphoreID ): OSStatus; external name '_MPDeleteSemaphore';
854 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
855 
856 
857 {
858  *  MPSignalSemaphore()   *** DEPRECATED ***
859  *
860  *  Mac OS X threading:
861  *    Thread safe
862  *
863  *  Availability:
864  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
865  *    CarbonLib:        in CarbonLib 1.0 and later
866  *    Non-Carbon CFM:   in MPLibrary 1.0 and later
867  }
MPSignalSemaphorenull868 function MPSignalSemaphore( semaphore: MPSemaphoreID ): OSStatus; external name '_MPSignalSemaphore';
869 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
870 
871 
872 {
873  *  MPWaitOnSemaphore()   *** DEPRECATED ***
874  *
875  *  Mac OS X threading:
876  *    Thread safe
877  *
878  *  Availability:
879  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
880  *    CarbonLib:        in CarbonLib 1.0 and later
881  *    Non-Carbon CFM:   in MPLibrary 1.0 and later
882  }
MPWaitOnSemaphorenull883 function MPWaitOnSemaphore( semaphore: MPSemaphoreID; timeout: Duration ): OSStatus; external name '_MPWaitOnSemaphore';
884 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
885 
886 
887 
888 { -------------------------------------------------------------------------------------------}
889 
890 
891 {
892  *  MPCreateCriticalRegion()   *** DEPRECATED ***
893  *
894  *  Mac OS X threading:
895  *    Thread safe
896  *
897  *  Availability:
898  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
899  *    CarbonLib:        in CarbonLib 1.0 and later
900  *    Non-Carbon CFM:   in MPLibrary 1.0 and later
901  }
MPCreateCriticalRegionnull902 function MPCreateCriticalRegion( var criticalRegion: MPCriticalRegionID ): OSStatus; external name '_MPCreateCriticalRegion';
903 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
904 
905 
906 {
907  *  MPDeleteCriticalRegion()   *** DEPRECATED ***
908  *
909  *  Mac OS X threading:
910  *    Thread safe
911  *
912  *  Availability:
913  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
914  *    CarbonLib:        in CarbonLib 1.0 and later
915  *    Non-Carbon CFM:   in MPLibrary 1.0 and later
916  }
MPDeleteCriticalRegionnull917 function MPDeleteCriticalRegion( criticalRegion: MPCriticalRegionID ): OSStatus; external name '_MPDeleteCriticalRegion';
918 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
919 
920 
921 {
922  *  MPEnterCriticalRegion()   *** DEPRECATED ***
923  *
924  *  Mac OS X threading:
925  *    Thread safe
926  *
927  *  Availability:
928  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
929  *    CarbonLib:        in CarbonLib 1.0 and later
930  *    Non-Carbon CFM:   in MPLibrary 1.0 and later
931  }
MPEnterCriticalRegionnull932 function MPEnterCriticalRegion( criticalRegion: MPCriticalRegionID; timeout: Duration ): OSStatus; external name '_MPEnterCriticalRegion';
933 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
934 
935 
936 {
937  *  MPExitCriticalRegion()   *** DEPRECATED ***
938  *
939  *  Mac OS X threading:
940  *    Thread safe
941  *
942  *  Availability:
943  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
944  *    CarbonLib:        in CarbonLib 1.0 and later
945  *    Non-Carbon CFM:   in MPLibrary 1.0 and later
946  }
MPExitCriticalRegionnull947 function MPExitCriticalRegion( criticalRegion: MPCriticalRegionID ): OSStatus; external name '_MPExitCriticalRegion';
948 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
949 
950 
951 { -------------------------------------------------------------------------------------------}
952 
953 
954 {
955  *  MPCreateEvent()   *** DEPRECATED ***
956  *
957  *  Mac OS X threading:
958  *    Thread safe
959  *
960  *  Availability:
961  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
962  *    CarbonLib:        in CarbonLib 1.0 and later
963  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
964  }
MPCreateEventnull965 function MPCreateEvent( var event: MPEventID ): OSStatus; external name '_MPCreateEvent';
966 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
967 
968 
969 {
970  *  MPDeleteEvent()   *** DEPRECATED ***
971  *
972  *  Mac OS X threading:
973  *    Thread safe
974  *
975  *  Availability:
976  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
977  *    CarbonLib:        in CarbonLib 1.0 and later
978  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
979  }
MPDeleteEventnull980 function MPDeleteEvent( event: MPEventID ): OSStatus; external name '_MPDeleteEvent';
981 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
982 
983 
984 {
985  *  MPSetEvent()   *** DEPRECATED ***
986  *
987  *  Mac OS X threading:
988  *    Thread safe
989  *
990  *  Availability:
991  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
992  *    CarbonLib:        in CarbonLib 1.0 and later
993  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
994  }
MPSetEventnull995 function MPSetEvent( event: MPEventID; flags: MPEventFlags ): OSStatus; external name '_MPSetEvent';
996 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
997 
998 
999 {
1000  *  MPWaitForEvent()   *** DEPRECATED ***
1001  *
1002  *  Mac OS X threading:
1003  *    Thread safe
1004  *
1005  *  Availability:
1006  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
1007  *    CarbonLib:        in CarbonLib 1.0 and later
1008  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
1009  }
MPWaitForEventnull1010 function MPWaitForEvent( event: MPEventID; flags: MPEventFlagsPtr; timeout: Duration ): OSStatus; external name '_MPWaitForEvent';
1011 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1012 
1013 
1014 {
1015 1016    ===========================================================================================
1017    Notification Services (API)
1018    =====================
1019 }
1020 
1021 
1022 {
1023  *  MPCreateNotification()
1024  *
1025  *  Mac OS X threading:
1026  *    Thread safe
1027  *
1028  *  Availability:
1029  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
1030  *    CarbonLib:        in CarbonLib 1.0 and later
1031  *    Non-Carbon CFM:   in MPLibrary 2.1 and later
1032  }
MPCreateNotificationnull1033 function MPCreateNotification( var notificationID: MPNotificationID ): OSStatus; external name '_MPCreateNotification';
1034 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1035 
1036 
1037 {
1038  *  MPDeleteNotification()   *** DEPRECATED ***
1039  *
1040  *  Mac OS X threading:
1041  *    Thread safe
1042  *
1043  *  Availability:
1044  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
1045  *    CarbonLib:        in CarbonLib 1.0 and later
1046  *    Non-Carbon CFM:   in MPLibrary 2.1 and later
1047  }
MPDeleteNotificationnull1048 function MPDeleteNotification( notificationID: MPNotificationID ): OSStatus; external name '_MPDeleteNotification';
1049 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1050 
1051 
1052 {
1053  *  MPModifyNotification()   *** DEPRECATED ***
1054  *
1055  *  Mac OS X threading:
1056  *    Thread safe
1057  *
1058  *  Availability:
1059  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
1060  *    CarbonLib:        in CarbonLib 1.0 and later
1061  *    Non-Carbon CFM:   in MPLibrary 2.1 and later
1062  }
MPModifyNotificationnull1063 function MPModifyNotification( notificationID: MPNotificationID; anID: MPOpaqueID; notifyParam1: UnivPtr; notifyParam2: UnivPtr; notifyParam3: UnivPtr ): OSStatus; external name '_MPModifyNotification';
1064 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1065 
1066 
1067 {
1068  *  MPModifyNotificationParameters()   *** DEPRECATED ***
1069  *
1070  *  Mac OS X threading:
1071  *    Thread safe
1072  *
1073  *  Availability:
1074  *    Mac OS X:         in version 10.1 and later in CoreServices.framework but deprecated in 10.7
1075  *    CarbonLib:        in CarbonLib 1.0 and later
1076  *    Non-Carbon CFM:   in MPLibrary 2.3 and later
1077  }
MPModifyNotificationParametersnull1078 function MPModifyNotificationParameters( notificationID: MPNotificationID; kind: MPOpaqueIDClass; notifyParam1: UnivPtr; notifyParam2: UnivPtr; notifyParam3: UnivPtr ): OSStatus; external name '_MPModifyNotificationParameters';
1079 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1080 
1081 
1082 {
1083  *  MPCauseNotification()   *** DEPRECATED ***
1084  *
1085  *  Mac OS X threading:
1086  *    Thread safe
1087  *
1088  *  Availability:
1089  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
1090  *    CarbonLib:        in CarbonLib 1.0 and later
1091  *    Non-Carbon CFM:   in MPLibrary 2.1 and later
1092  }
MPCauseNotificationnull1093 function MPCauseNotification( notificationID: MPNotificationID ): OSStatus; external name '_MPCauseNotification';
1094 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1095 
1096 
1097 {
1098 1099    ===========================================================================================
1100    Timer Services
1101    ==============
1102 }
1103 
1104 
1105 {
1106    --------------------------------------------
1107    ! The timer services are new in version 2.0.
1108 }
1109 
1110 
1111 const
1112 { For MPArmTimer options}
1113 	kMPPreserveTimerIDMask = 1 shl 0;
1114 	kMPTimeIsDeltaMask = 1 shl 1;
1115 	kMPTimeIsDurationMask = 1 shl 2;
1116 
1117 
1118 {
1119  *  MPDelayUntil()   *** DEPRECATED ***
1120  *
1121  *  Mac OS X threading:
1122  *    Thread safe
1123  *
1124  *  Availability:
1125  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
1126  *    CarbonLib:        in CarbonLib 1.0 and later
1127  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
1128  }
MPDelayUntilnull1129 function MPDelayUntil( var expirationTime: AbsoluteTime ): OSStatus; external name '_MPDelayUntil';
1130 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1131 
1132 
1133 {
1134  *  MPDelayUntilSys()
1135  *
1136  *  Availability:
1137  *    Mac OS X:         not available
1138  *    CarbonLib:        not available
1139  *    Non-Carbon CFM:   in MPLibrary 2.1 and later
1140  }
1141 
1142 
1143 {
1144  *  MPCreateTimer()   *** DEPRECATED ***
1145  *
1146  *  Mac OS X threading:
1147  *    Thread safe
1148  *
1149  *  Availability:
1150  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
1151  *    CarbonLib:        in CarbonLib 1.0 and later
1152  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
1153  }
MPCreateTimernull1154 function MPCreateTimer( var timerID: MPTimerID ): OSStatus; external name '_MPCreateTimer';
1155 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1156 
1157 
1158 {
1159  *  MPDeleteTimer()   *** DEPRECATED ***
1160  *
1161  *  Mac OS X threading:
1162  *    Thread safe
1163  *
1164  *  Availability:
1165  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
1166  *    CarbonLib:        in CarbonLib 1.0 and later
1167  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
1168  }
MPDeleteTimernull1169 function MPDeleteTimer( timerID: MPTimerID ): OSStatus; external name '_MPDeleteTimer';
1170 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1171 
1172 
1173 {
1174  *  MPSetTimerNotify()   *** DEPRECATED ***
1175  *
1176  *  Mac OS X threading:
1177  *    Thread safe
1178  *
1179  *  Availability:
1180  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
1181  *    CarbonLib:        in CarbonLib 1.0 and later
1182  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
1183  }
MPSetTimerNotifynull1184 function MPSetTimerNotify( timerID: MPTimerID; anID: MPOpaqueID; notifyParam1: UnivPtr; notifyParam2: UnivPtr; notifyParam3: UnivPtr ): OSStatus; external name '_MPSetTimerNotify';
1185 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1186 
1187 
1188 {
1189  *  MPArmTimer()   *** DEPRECATED ***
1190  *
1191  *  Mac OS X threading:
1192  *    Thread safe
1193  *
1194  *  Availability:
1195  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
1196  *    CarbonLib:        in CarbonLib 1.0 and later
1197  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
1198  }
MPArmTimernull1199 function MPArmTimer( timerID: MPTimerID; var expirationTime: AbsoluteTime; options: OptionBits ): OSStatus; external name '_MPArmTimer';
1200 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1201 
1202 
1203 {
1204  *  MPCancelTimer()   *** DEPRECATED ***
1205  *
1206  *  Mac OS X threading:
1207  *    Thread safe
1208  *
1209  *  Availability:
1210  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
1211  *    CarbonLib:        in CarbonLib 1.0 and later
1212  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
1213  }
MPCancelTimernull1214 function MPCancelTimer( timerID: MPTimerID; timeRemaining: AbsoluteTimePtr ): OSStatus; external name '_MPCancelTimer';
1215 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1216 
1217 
1218 {
1219 1220    ===========================================================================================
1221    Memory Services
1222    ===============
1223 }
1224 
1225 
1226 const
1227 { Maximum allocation request size is 1GB.}
1228 	kMPMaxAllocSize = 1073741824;
1229 
1230 const
1231 { Values for the alignment parameter to MPAllocateAligned.}
1232 	kMPAllocateDefaultAligned = 0;
1233 	kMPAllocate8ByteAligned = 3;
1234 	kMPAllocate16ByteAligned = 4;
1235 	kMPAllocate32ByteAligned = 5;
1236 	kMPAllocate1024ByteAligned = 10;
1237 	kMPAllocate4096ByteAligned = 12;
1238 	kMPAllocateMaxAlignment = 16;   { Somewhat arbitrary limit on expectations.}
1239 	kMPAllocateAltiVecAligned = kMPAllocate16ByteAligned; { The P.C. name.}
1240 	kMPAllocateVMXAligned = kMPAllocateAltiVecAligned; { The older, common name.}
1241 	kMPAllocateVMPageAligned = 254;  { Pseudo value, converted at runtime.}
1242 	kMPAllocateInterlockAligned = 255;   { Pseudo value, converted at runtime.}
1243 
1244 
1245 const
1246 { Values for the options parameter to MPAllocateAligned.}
1247 	kMPAllocateClearMask = $0001; { Zero the allocated block.}
1248 	kMPAllocateGloballyMask = $0002; { Allocate from the globally visible pool.}
1249 	kMPAllocateResidentMask = $0004; { Allocate from the RAM-resident pool.}
1250 	kMPAllocateNoGrowthMask = $0010; { Do not attempt to grow the pool.}
1251 	kMPAllocateNoCreateMask = $0020; { Do not attempt to create the pool if it doesn't exist yet.}
1252 
1253 
1254 { -------------------------------------------------------------------------------------------}
1255 
1256 
1257 {
1258  *  MPAllocateAligned()   *** DEPRECATED ***
1259  *
1260  *  Mac OS X threading:
1261  *    Thread safe
1262  *
1263  *  Availability:
1264  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
1265  *    CarbonLib:        in CarbonLib 1.0 and later
1266  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
1267  }
MPAllocateAlignednull1268 function MPAllocateAligned( size: ByteCount; alignment: UInt8; options: OptionBits ): LogicalAddress; external name '_MPAllocateAligned';
1269 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1270 
1271 
1272 { ! MPAllocateAligned is new in version 2.0.}
1273 
1274 {
1275  *  MPAllocate()   *** DEPRECATED ***
1276  *
1277  *  Mac OS X threading:
1278  *    Thread safe
1279  *
1280  *  Availability:
1281  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
1282  *    CarbonLib:        in CarbonLib 1.0 and later
1283  *    Non-Carbon CFM:   in MPLibrary 1.0 and later
1284  }
MPAllocatenull1285 function MPAllocate( size: ByteCount ): LogicalAddress; external name '_MPAllocate';
1286 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1287 
1288 
1289 { Use MPAllocateAligned instead.}
1290 
1291 {
1292  *  MPFree()   *** DEPRECATED ***
1293  *
1294  *  Mac OS X threading:
1295  *    Thread safe
1296  *
1297  *  Availability:
1298  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
1299  *    CarbonLib:        in CarbonLib 1.0 and later
1300  *    Non-Carbon CFM:   in MPLibrary 1.0 and later
1301  }
1302 procedure MPFree( objct: LogicalAddress ); external name '_MPFree';
1303 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1304 
1305 
1306 {
1307  *  MPGetAllocatedBlockSize()   *** DEPRECATED ***
1308  *
1309  *  Mac OS X threading:
1310  *    Thread safe
1311  *
1312  *  Availability:
1313  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
1314  *    CarbonLib:        in CarbonLib 1.0 and later
1315  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
1316  }
MPGetAllocatedBlockSizenull1317 function MPGetAllocatedBlockSize( objct: LogicalAddress ): ByteCount; external name '_MPGetAllocatedBlockSize';
1318 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1319 
1320 
1321 { -------------------------------------------------------------------------------------------}
1322 
1323 
1324 {
1325  *  MPBlockCopy()   *** DEPRECATED ***
1326  *
1327  *  Mac OS X threading:
1328  *    Thread safe
1329  *
1330  *  Availability:
1331  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
1332  *    CarbonLib:        in CarbonLib 1.0 and later
1333  *    Non-Carbon CFM:   in MPLibrary 1.0 and later
1334  }
1335 procedure MPBlockCopy( source: LogicalAddress; destination: LogicalAddress; size: ByteCount ); external name '_MPBlockCopy';
1336 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1337 
1338 
1339 {
1340  *  MPBlockClear()   *** DEPRECATED ***
1341  *
1342  *  Mac OS X threading:
1343  *    Thread safe
1344  *
1345  *  Availability:
1346  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
1347  *    CarbonLib:        in CarbonLib 1.0 and later
1348  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
1349  }
1350 procedure MPBlockClear( address: LogicalAddress; size: ByteCount ); external name '_MPBlockClear';
1351 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1352 
1353 
1354 {$ifc not TARGET_CPU_64}
1355 {
1356  *  MPDataToCode()   *** DEPRECATED ***
1357  *
1358  *  Mac OS X threading:
1359  *    Thread safe
1360  *
1361  *  Availability:
1362  *    Mac OS X:         in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.7
1363  *    CarbonLib:        in CarbonLib 1.0 and later
1364  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
1365  }
1366 procedure MPDataToCode( address: LogicalAddress; size: ByteCount ); external name '_MPDataToCode';
1367 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1368 
1369 
1370 { NOTE:    MPDataToCode is not supported for 64-bit applications. Use mprotect(2) instead.}
1371 
1372 
1373 {
1374 1375    ===========================================================================================
1376    Exception/Debugging Services
1377    ============================
1378 }
1379 
1380 
1381 {
1382    -------------------------------------------------------------------------------------------
1383    *** Important Note ***
1384    ----------------------
1385 
1386    The functions MPExtractTaskState and MPSetTaskState infer the size of the "info" buffer
1387    from the "kind" parameter.  A given value for MPTaskStateKind will always refer to a
1388    single specific physical buffer layout.  Should new register sets be added, or the size
1389    or number of any registers change, new values of MPTaskStateKind will be introduced to
1390    refer to the new buffer layouts.
1391 
1392    The following types for the buffers are in MachineExceptions. The correspondence between
1393    MPTaskStateKind values and MachineExceptions types is:
1394 
1395         kMPTaskStateRegisters               -> RegisterInformation
1396         kMPTaskStateFPU                     -> FPUInformation
1397         kMPTaskStateVectors                 -> VectorInformation
1398         kMPTaskStateMachine                 -> MachineInformation
1399         kMPTaskState32BitMemoryException    -> ExceptionInfo for old-style 32-bit memory exceptions
1400 
1401     For reference, on PowerPC the MachineExceptions types contain:
1402 
1403         RegisterInformation -> The GPRs, 32 values of 64 bits each.
1404         FPUInformation      -> The FPRs plus FPSCR, 32 values of 64 bits each, one value of
1405                                 32 bits.
1406         VectorInformation   -> The AltiVec vector registers plus VSCR and VRSave, 32 values
1407                                 of 128 bits each, one value of 128 bits, and one 32 bit value.
1408         MachineInformation  -> The CTR, LR, PC, each of 64 bits.  The CR, XER, MSR, MQ,
1409                                 exception kind, and DSISR, each of 32 bits.  The 64 bit DAR.
1410         ExceptionInfo       -> Only memory exceptions are specified, 4 fields of 32 bits each.
1411                                 Note that this type only covers memory exceptions on 32-bit CPUs!
1412    The following types are declared here:
1413         kMPTaskStateTaskInfo                -> MPTaskInfo
1414 }
1415 
1416 
1417 {$endc} {not TARGET_CPU_64}
1418 
1419 const
1420 { Values for the TaskStateKind to MPExtractTaskState and MPSetTaskState.}
1421 	kMPTaskStateRegisters = 0;    { The task general registers.}
1422 	kMPTaskStateFPU = 1;    { The task floating point registers}
1423 	kMPTaskStateVectors = 2;    { The task vector registers}
1424 	kMPTaskStateMachine = 3;    { The task machine registers}
1425 	kMPTaskState32BitMemoryException = 4; { The task memory exception information for 32-bit CPUs.}
1426 	kMPTaskStateTaskInfo = 5;     { Static and dynamic information about the task.}
1427 
1428 
1429 const
1430 { Option bits and numbers for MPDisposeTaskException.}
1431 	kMPTaskPropagate = 0;    { The exception is propagated.}
1432 	kMPTaskResumeStep = 1;    { The task is resumed and single step is enabled.}
1433 	kMPTaskResumeBranch = 2;    { The task is resumed and branch stepping is enabled.}
1434 	kMPTaskResumeMask = $0000; { The task is resumed.}
1435 	kMPTaskPropagateMask = 1 shl kMPTaskPropagate; { The exception is propagated.}
1436 	kMPTaskResumeStepMask = 1 shl kMPTaskResumeStep; { The task is resumed and single step is enabled.}
1437 	kMPTaskResumeBranchMask = 1 shl kMPTaskResumeBranch; { The task is resumed and branch stepping is enabled.}
1438 
1439 
1440 const
1441 { For kMPTaskStateTaskInfo, the task's runState}
1442 	kMPTaskBlocked = 0;    { Task is blocked (queued on resource)}
1443 	kMPTaskReady = 1;    { Task is runnable}
1444 	kMPTaskRunning = 2;     { Task is running}
1445 
1446 const
1447 { For kMPTaskStateTaskInfo, the version of the MPTaskInfo structure requested.}
1448 	kMPTaskInfoVersion = 3;
1449 
1450 
1451 type
1452 	MPTaskInfoVersion2Ptr = ^MPTaskInfoVersion2;
1453 	MPTaskInfoVersion2 = record
1454 		version: PBVersion;                { Version 2 of the data structure requested}
1455 
1456 		name: OSType;                   { Task name}
1457 
1458 		queueName: OSType;              { Task's queue owner name}
1459 		runState: UInt16;               { Running, ready, blocked}
1460 		lastCPU: UInt16;                { Address of CPU where task previously ran}
1461 		weight: UInt32;                 { Processing weight: 1 - 10,000}
1462 
1463 		processID: MPProcessID;              { Owning process ID}
1464 
1465 		cpuTime: AbsoluteTime;                { Accumulated task time}
1466 		schedTime: AbsoluteTime;              { Time when last scheduled}
1467 		creationTime: AbsoluteTime;           { Time when task created}
1468 
1469 		codePageFaults: ItemCount;         { Page faults from code execution}
1470 		dataPageFaults: ItemCount;         { Page faults from data access}
1471 		preemptions: ItemCount;            { Number of times task was preempted}
1472 
1473 		cpuID: MPCpuID;                  { ID of CPU where task previously ran}
1474 	end;
1475 type
1476 	MPTaskInfoPtr = ^MPTaskInfo;
1477 	MPTaskInfo = record
1478 		version: PBVersion;                { Version 3 of the data structure requested}
1479 
1480 		name: OSType;                   { Task name}
1481 
1482 		queueName: OSType;              { Task's queue owner name}
1483 		runState: UInt16;               { Running, ready, blocked}
1484 		lastCPU: UInt16;                { Address of CPU where task previously ran}
1485 		weight: UInt32;                 { Processing weight: 1 - 10,000}
1486 
1487 		processID: MPProcessID;              { Owning process ID}
1488 
1489 		cpuTime: AbsoluteTime;                { Accumulated task time}
1490 		schedTime: AbsoluteTime;              { Time when last scheduled}
1491 		creationTime: AbsoluteTime;           { Time when task created}
1492 
1493 		codePageFaults: ItemCount;         { Page faults from code execution}
1494 		dataPageFaults: ItemCount;         { Page faults from data access}
1495 		preemptions: ItemCount;            { Number of times task was preempted}
1496 
1497 		cpuID: MPCpuID;                  { ID of CPU where task previously ran.}
1498 		blockedObject: MPOpaqueID;          { ID of blocked object.}
1499 		spaceID: MPAddressSpaceID;                { Address space ID of this task.}
1500 
1501 		stackBase: LogicalAddress;              { Base of stack (lowest address).}
1502 		stackLimit: LogicalAddress;             { Stack limit (highest address).}
1503 		stackCurr: LogicalAddress;              { Current stack address.}
1504 	end;
1505 {
1506     Upon a task exception, the following message is sent to the designated queue:
1507       1. The MPTaskID,
1508       2. The exception kind. These are enumerated in the interfaces header MachineExceptions.h
1509       3. N/A
1510 }
1511 
1512 
1513 { -------------------------------------------------------------------------------------------}
1514 
1515 
1516 {
1517  *  MPSetExceptionHandler()   *** DEPRECATED ***
1518  *
1519  *  Mac OS X threading:
1520  *    Thread safe
1521  *
1522  *  Availability:
1523  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
1524  *    CarbonLib:        in CarbonLib 1.0 and later
1525  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
1526  }
MPSetExceptionHandlernull1527 function MPSetExceptionHandler( task: MPTaskID; exceptionQ: MPQueueID ): OSStatus; external name '_MPSetExceptionHandler';
1528 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1529 
1530 
1531 {
1532  *  MPDisposeTaskException()   *** DEPRECATED ***
1533  *
1534  *  Mac OS X threading:
1535  *    Thread safe
1536  *
1537  *  Availability:
1538  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
1539  *    CarbonLib:        in CarbonLib 1.0 and later
1540  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
1541  }
MPDisposeTaskExceptionnull1542 function MPDisposeTaskException( task: MPTaskID; action: OptionBits ): OSStatus; external name '_MPDisposeTaskException';
1543 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1544 
1545 
1546 {
1547  *  MPExtractTaskState()   *** DEPRECATED ***
1548  *
1549  *  Mac OS X threading:
1550  *    Thread safe
1551  *
1552  *  Availability:
1553  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
1554  *    CarbonLib:        in CarbonLib 1.0 and later
1555  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
1556  }
MPExtractTaskStatenull1557 function MPExtractTaskState( task: MPTaskID; kind: MPTaskStateKind; info: UnivPtr ): OSStatus; external name '_MPExtractTaskState';
1558 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1559 
1560 
1561 {
1562  *  MPSetTaskState()   *** DEPRECATED ***
1563  *
1564  *  Mac OS X threading:
1565  *    Thread safe
1566  *
1567  *  Availability:
1568  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
1569  *    CarbonLib:        in CarbonLib 1.0 and later
1570  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
1571  }
MPSetTaskStatenull1572 function MPSetTaskState( task: MPTaskID; kind: MPTaskStateKind; info: UnivPtr ): OSStatus; external name '_MPSetTaskState';
1573 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1574 
1575 
1576 {
1577  *  MPThrowException()   *** DEPRECATED ***
1578  *
1579  *  Mac OS X threading:
1580  *    Thread safe
1581  *
1582  *  Availability:
1583  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
1584  *    CarbonLib:        in CarbonLib 1.0 and later
1585  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
1586  }
MPThrowExceptionnull1587 function MPThrowException( task: MPTaskID; kind: MPExceptionKind ): OSStatus; external name '_MPThrowException';
1588 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1589 
1590 
1591 { -------------------------------------------------------------------------------------------}
1592 
1593 
1594 type
1595 	MPDebuggerLevel = UInt32;
1596 const
1597 	kMPLowLevelDebugger = $00000000; { MacsBug-like}
1598 	kMPMidLevelDebugger = $10000000; { Jasik-like}
1599 	kMPHighLevelDebugger = $20000000; { Metrowerks-like}
1600 
1601 
1602 {
1603  *  MPRegisterDebugger()   *** DEPRECATED ***
1604  *
1605  *  Mac OS X threading:
1606  *    Thread safe
1607  *
1608  *  Availability:
1609  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
1610  *    CarbonLib:        in CarbonLib 1.0 and later
1611  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
1612  }
MPRegisterDebuggernull1613 function MPRegisterDebugger( queue: MPQueueID; level: MPDebuggerLevel ): OSStatus; external name '_MPRegisterDebugger';
1614 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1615 
1616 
1617 {
1618  *  MPUnregisterDebugger()   *** DEPRECATED ***
1619  *
1620  *  Mac OS X threading:
1621  *    Thread safe
1622  *
1623  *  Availability:
1624  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
1625  *    CarbonLib:        in CarbonLib 1.0 and later
1626  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
1627  }
MPUnregisterDebuggernull1628 function MPUnregisterDebugger( queue: MPQueueID ): OSStatus; external name '_MPUnregisterDebugger';
1629 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1630 
1631 
1632 {
1633 1634    ===========================================================================================
1635    Remote Call Services
1636    ====================
1637 }
1638 
1639 
1640 type
1641 	MPRemoteProcedure = function( parameter: UnivPtr ): UnivPtr;
1642 
1643 type
1644 	MPRemoteContext = UInt8;
1645 const
1646 	kMPAnyRemoteContext = 0;
1647 	kMPOwningProcessRemoteContext = 1;
1648 	kMPInterruptRemoteContext = 2;
1649 	kMPAsyncInterruptRemoteContext = 3;
1650 
1651 
1652 {
1653  *  MPRemoteCall()   *** DEPRECATED ***
1654  *
1655  *  Summary:
1656  *    Calls a nonreentrant function and blocks the current task.
1657  *
1658  *  Discussion:
1659  *    You use this function primarily to indirectly execute Mac OS
1660  *    system software functions. The task making the remote call is
1661  *    blocked until the call completes. The amount of time taken to
1662  *    schedule the remote procedure depends on the choice of the
1663  *    designated operating context. Specifying kMPAnyRemoteContext
1664  *    offers the lowest latency, but the called procedure may not have
1665  *    access to process-specific resources such as some low-memory
1666  *    values. Specifying kMPOwningProcessRemoteContext has higher
1667  *    latency because the remote procedure is deferred until the owning
1668  *    process becomes active. However, the remote procedure is
1669  *    guaranteed to execute within the owning process. Note that with
1670  *    the exception of functions in Multiprocessing Services, you
1671  *    cannot safely call any system software functions directly from a
1672  *    preemptive task. Even if some system software function appears to
1673  *    work today when called from a preemptive task, unless explicitly
1674  *    stated otherwise there is no guarantee that subsequent versions
1675  *    of the same function will continue to work in future versions of
1676  *    system software. In Mac OS 8 implementations of Multiprocessing
1677  *    Services, the only exceptions to this rule are the atomic memory
1678  *    operations (such as AddAtomic ) exported in the InterfaceLib
1679  *    shared library. Even these functions may switch to 68K mode if
1680  *    the operands to them are not aligned. If you need to access
1681  *    system software functions from a preemptive task, you must do so
1682  *    using the MPRemoteCall function. %%     @deprecated Use blocks to
1683  *    make a call on anothed dispatch queue() and block on the result.
1684  *
1685  *  Mac OS X threading:
1686  *    Thread safe
1687  *
1688  *  Parameters:
1689  *
1690  *    remoteProc:
1691  *      A pointer of type MPRemoteProcedure that references the
1692  *      application-defined function you want to call. See
1693  *      MyRemoteProcedure for more information about the form of this
1694  *      function.
1695  *
1696  *    parameter:
1697  *      A pointer to a parameter to pass to the application-defined
1698  *      function. For example, this value could point to a data
1699  *      structure or a memory location.
1700  *
1701  *    context:
1702  *      A value of type MPRemoteContext that specifies which contexts
1703  *      (that is processes) are allowed to execute the function. See
1704  *      �Remote Call Context Option Constants� for a list of possible
1705  *      values.
1706  *
1707  *  Availability:
1708  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
1709  *    CarbonLib:        in CarbonLib 1.0 and later
1710  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
1711  }
MPRemoteCallnull1712 function MPRemoteCall( remoteProc: MPRemoteProcedure; parameter: UnivPtr; context: MPRemoteContext ): UnivPtr; external name '_MPRemoteCall';
1713 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1714 
1715 
1716 {
1717  *  MPRemoteCallCFM()   *** DEPRECATED ***
1718  *
1719  *  Deprecated:
1720  *    No longer applicable now that the Multiprocessing Utilities have
1721  *    been deprecated.
1722  *
1723  *  Summary:
1724  *    Calls a nonreentrant function and blocks the current task.
1725  *
1726  *  Discussion:
1727  *    You use this function primarily to indirectly execute Mac OS
1728  *    system software functions. The task making the remote call is
1729  *    blocked until the call completes. The amount of time taken to
1730  *    schedule the remote procedure depends on the choice of the
1731  *    designated operating context. Specifying kMPAnyRemoteContext
1732  *    offers the lowest latency, but the called procedure may not have
1733  *    access to process-specific resources such as some low-memory
1734  *    values. Specifying kMPOwningProcessRemoteContext has higher
1735  *    latency because the remote procedure is deferred until the owning
1736  *    process becomes active. However, the remote procedure is
1737  *    guaranteed to execute within the owning process. Note that with
1738  *    the exception of functions in Multiprocessing Services, you
1739  *    cannot safely call any system software functions directly from a
1740  *    preemptive task. Even if some system software function appears to
1741  *    work today when called from a preemptive task, unless explicitly
1742  *    stated otherwise there is no guarantee that subsequent versions
1743  *    of the same function will continue to work in future versions of
1744  *    system software.
1745  *
1746  *  Mac OS X threading:
1747  *    Thread safe
1748  *
1749  *  Parameters:
1750  *
1751  *    remoteProc:
1752  *      A pointer of type MPRemoteProcedure to a CFM function that
1753  *      references the application-defined function you want to call.
1754  *      See MyRemoteProcedure for more information about the form of
1755  *      this function.
1756  *
1757  *    parameter:
1758  *      A pointer to a parameter to pass to the application-defined
1759  *      function. For example, this value could point to a data
1760  *      structure or a memory location.
1761  *
1762  *    context:
1763  *      A value of type MPRemoteContext that specifies which contexts
1764  *      (that is processes) are allowed to execute the function. See
1765  *      �Remote Call Context Option Constants� for a list of possible
1766  *      values.
1767  *
1768  *  Availability:
1769  *    Mac OS X:         in version 10.4 and later in CoreServices.framework but deprecated in 10.7
1770  *    CarbonLib:        not available
1771  *    Non-Carbon CFM:   in MPLibrary 2.0 and later
1772  }
MPRemoteCallCFMnull1773 function MPRemoteCallCFM( remoteProc: MPRemoteProcedure; parameter: UnivPtr; context: MPRemoteContext ): UnivPtr; external name '_MPRemoteCallCFM';
1774 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1775 
1776 
1777 {
1778 1779    ===========================================================================================
1780    Checking API Availability
1781    =========================
1782 }
1783 
1784 
1785 {
1786    ===========================================================================================
1787    *** WARNING: You must properly check the availability of MP services before calling them!
1788    ===========================================================================================
1789 
1790    Checking for the availability of the MP API is rather ugly.  This is a historical problem,
1791    caused by the original implementation letting itself get prepared when it really wasn't
1792    usable and complicated by some important clients then depending on weak linking to "work".
1793    (And further complicated by CFM not supporting "deferred" imports, which is how many
1794    programmers think weak imports work.)
1795 
1796    The end result is that the MP API library may get prepared by CFM but be totally unusable.
1797    This means that if you import from the MP API library, you cannot simply check for a
1798    resolved import to decide if MP services are available.  Worse, if you explicitly prepare
1799    the MP API library you cannot assume that a noErr result from GetSharedLibrary means that
1800    MP services are available.
1801 
1802    � If you import from the MP API library you MUST:
1803 
1804         Use the MPLibraryIsLoaded macro (or equivalent code in languages other than C) to tell
1805         if the MP API services are available.  It is not sufficient to simply check that an
1806         imported symbol is resolved as is commonly done for other libraries.  The macro expands
1807         to the expression:
1808 
1809             ( ( (UInt32)_MPIsFullyInitialized != (UInt32)kUnresolvedCFragSymbolAddress ) &&
1810               ( _MPIsFullyInitialized () ) )
1811 
1812         This checks if the imported symbol _MPIsFullyInitialized is resolved and if resolved
1813         calls it.  Both parts must succeed for the MP API services to be available.
1814 
1815    � If you explicitly prepare the MP API library you MUST:
1816 
1817         Use code similar to the following example to tell if the MP API services are available.
1818         It is not sufficient to depend on just a noErr result from GetSharedLibrary.
1819 
1820             OSErr                       err;
1821             Boolean                     mpIsAvailable           = false;
1822             CFragConnectionID           connID                  = kInvalidID;
1823             MPIsFullyInitializedProc    mpIsFullyInitialized    = NULL;
1824 
1825             err = GetSharedLibrary  ( "\pMPLibrary", kCompiledCFragArch, kReferenceCFrag,
1826                                       &connID, NULL, NULL );
1827 
1828             if ( err == noErr ) (
1829                 err = FindSymbol    ( connID, "\p_MPIsFullyInitialized",
1830                                       (Ptr *) &mpIsFullyInitialized, NULL );
1831             )
1832 
1833             if ( err == noErr ) (
1834                 mpIsAvailable = (* mpIsFullyInitialized) ();
1835             )
1836 
1837    ===========================================================================================
1838 }
1839 
1840 
1841 {
1842  *  _MPIsFullyInitialized()   *** DEPRECATED ***
1843  *
1844  *  Mac OS X threading:
1845  *    Thread safe
1846  *
1847  *  Availability:
1848  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
1849  *    CarbonLib:        in CarbonLib 1.0 and later
1850  *    Non-Carbon CFM:   in MPLibrary 1.0 and later
1851  }
_MPIsFullyInitializednull1852 function _MPIsFullyInitialized: Boolean; external name '__MPIsFullyInitialized';
1853 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1854 
1855 
1856 type
1857 	MPIsFullyInitializedProc = function: Boolean;
1858 const
1859 	kMPUnresolvedCFragSymbolAddress = 0;
1860 	MPLibraryIsLoaded = true;
1861 {
1862 1863    ===========================================================================================
1864    Miscellaneous Services
1865    ======================
1866 }
1867 
1868 
1869 {
1870  *  _MPLibraryVersion()   *** DEPRECATED ***
1871  *
1872  *  Availability:
1873  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
1874  *    CarbonLib:        in CarbonLib 1.0 and later
1875  *    Non-Carbon CFM:   in MPLibrary 1.0 and later
1876  }
1877 procedure _MPLibraryVersion( versionCString: ConstCStringPtrPtr; major: UInt32Ptr; minor: UInt32Ptr; release: UInt32Ptr; revision: UInt32Ptr ); external name '__MPLibraryVersion';
1878 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1879 
1880 
1881 {
1882 1883    ===========================================================================================
1884    Unofficial Services
1885    ===================
1886 }
1887 
1888 
1889 {
1890    ===========================================================================================
1891    *** WARNING ***
1892    These services are not part of the officially documented multiprocessing API.  They may not
1893    be avaliable in future versions of Mac OS multiprocessing support, or in environments that
1894    have a different underlying OS architecture such as Mac OS on top of a microkernel, the
1895    Mac OS Blue Box under Mac OS X, native MP support in Mac OS X, etc.
1896    ===========================================================================================
1897 }
1898 
1899 {$ifc CALL_NOT_IN_CARBON}
1900 {
1901  *  _MPAllocateSys()
1902  *
1903  *  Availability:
1904  *    Mac OS X:         not available
1905  *    CarbonLib:        not available
1906  *    Non-Carbon CFM:   in MPLibrary 1.0 and later
1907  }
1908 
1909 
1910 { Use MPAllocateAligned instead.}
1911 {
1912  *  _MPRPC()
1913  *
1914  *  Availability:
1915  *    Mac OS X:         not available
1916  *    CarbonLib:        not available
1917  *    Non-Carbon CFM:   in MPLibrary 1.0 and later
1918  }
1919 
1920 
1921 { Use _MPRemoteCall instead.}
1922 {
1923  *  _MPTaskIsToolboxSafe()
1924  *
1925  *  Availability:
1926  *    Mac OS X:         not available
1927  *    CarbonLib:        not available
1928  *    Non-Carbon CFM:   in MPLibrary 1.0 and later
1929  }
1930 
1931 
1932 {$endc}  {CALL_NOT_IN_CARBON}
1933 
1934 {
1935  *  _MPLibraryIsCompatible()   *** DEPRECATED ***
1936  *
1937  *  Availability:
1938  *    Mac OS X:         in version 10.0 and later in CoreServices.framework but deprecated in 10.7
1939  *    CarbonLib:        in CarbonLib 1.0 and later
1940  *    Non-Carbon CFM:   in MPLibrary 1.0 and later
1941  }
_MPLibraryIsCompatiblenull1942 function _MPLibraryIsCompatible( versionCString: ConstCStringPtr; major: UInt32; minor: UInt32; release: UInt32; revision: UInt32 ): Boolean; external name '__MPLibraryIsCompatible';
1943 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_NA, __IPHONE_NA) *)
1944 
1945 {
1946 1947    ===========================================================================================
1948    Defunct Services
1949    ================
1950 }
1951 
1952 {$ifc CALL_NOT_IN_CARBON}
1953 {$ifc undefined MPIncludeDefunctServices}
1954 {$setc MPIncludeDefunctServices := 0}
1955 {$endc}
1956 {$ifc MPIncludeDefunctServices}
1957 {
1958  *  _MPDebugStr()
1959  *
1960  *  Availability:
1961  *    Mac OS X:         not available
1962  *    CarbonLib:        not available
1963  *    Non-Carbon CFM:   in MPLibraryObsolete 1.0 and later
1964  }
1965 
1966 
1967 {
1968  *  _MPStatusPString()
1969  *
1970  *  Availability:
1971  *    Mac OS X:         not available
1972  *    CarbonLib:        not available
1973  *    Non-Carbon CFM:   in MPLibraryObsolete 1.0 and later
1974  }
1975 
1976 
1977 {
1978  *  _MPStatusCString()
1979  *
1980  *  Availability:
1981  *    Mac OS X:         not available
1982  *    CarbonLib:        not available
1983  *    Non-Carbon CFM:   in MPLibraryObsolete 1.0 and later
1984  }
1985 
1986 
1987 type
1988 	MPPrintfHandler = procedure( taskID: MPTaskID; format: ConstCStringPtr; args: va_list );
1989 {
1990  *  _MPInitializePrintf()
1991  *
1992  *  Availability:
1993  *    Mac OS X:         not available
1994  *    CarbonLib:        not available
1995  *    Non-Carbon CFM:   in MPLibraryObsolete 1.0 and later
1996  }
1997 
1998 
1999 {
2000  *  _MPPrintf()
2001  *
2002  *  Availability:
2003  *    Mac OS X:         not available
2004  *    CarbonLib:        not available
2005  *    Non-Carbon CFM:   in MPLibraryObsolete 1.0 and later
2006  }
2007 
2008 
2009 {$endc}  {MPIncludeDefunctServices}
2010 {$endc}  {CALL_NOT_IN_CARBON}
2011 
2012 { ===========================================================================================}
2013 
2014 {$endc} {TARGET_OS_MAC}
2015 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
2016 
2017 end.
2018 {$endc} {not MACOSALLINCLUDE}
2019