Mac OS 9
Threads.h
Go to the documentation of this file.
1 
19 #ifndef __THREADS__
20 #define __THREADS__
21 
22 #ifndef __MACTYPES__
23 #include <MacTypes.h>
24 #endif
25 
26 #ifndef __MIXEDMODE__
27 #include <MixedMode.h>
28 #endif
29 
30 #ifndef __MACERRORS__
31 #include <MacErrors.h>
32 #endif
33 
34 #if PRAGMA_ONCE
35 #pragma once
36 #endif
37 
38 #ifdef __cplusplus
39 extern "C"
40 {
41 #endif
42 
43 #if PRAGMA_IMPORT
44 #pragma import on
45 #endif
46 
47 #if PRAGMA_STRUCT_ALIGN
48 #pragma options align = mac68k
49 #elif PRAGMA_STRUCT_PACKPUSH
50 #pragma pack(push, 2)
51 #elif PRAGMA_STRUCT_PACK
52 #pragma pack(2)
53 #endif
54 
55  /* Thread states*/
56  typedef UInt16 ThreadState;
57  enum
58  {
59  kReadyThreadState = 0,
60  kStoppedThreadState = 1,
61  kRunningThreadState = 2
62  };
63 
64  /* Error codes have been moved to Errors.(pah)*/
65 
66  /* Thread environment characteristics*/
67  typedef void *ThreadTaskRef;
68  /* Thread characteristics*/
69  typedef UInt32 ThreadStyle;
70  enum
71  {
72  kCooperativeThread = 1L << 0,
73  kPreemptiveThread = 1L << 1
74  };
75 
76  /* Thread identifiers*/
77  typedef UInt32 ThreadID;
78  enum
79  {
80  kNoThreadID = 0,
81  kCurrentThreadID = 1,
82  kApplicationThreadID = 2
83  };
84 
85  /* Options when creating a thread*/
86  typedef UInt32 ThreadOptions;
87  enum
88  {
89  kNewSuspend = (1 << 0),
90  kUsePremadeThread = (1 << 1),
91  kCreateIfNeeded = (1 << 2),
92  kFPUNotNeeded = (1 << 3),
93  kExactMatchThread = (1 << 4)
94  };
95 
96  /* Information supplied to the custom scheduler*/
98  {
99  UInt32 InfoRecSize;
100  ThreadID CurrentThreadID;
101  ThreadID SuggestedThreadID;
102  ThreadID InterruptedCoopThreadID;
103  };
104  typedef struct SchedulerInfoRec SchedulerInfoRec;
106 
112  typedef void *voidPtr;
113  /* Prototype for thread's entry (main) routine*/
114  typedef CALLBACK_API(voidPtr, ThreadEntryProcPtr)(void *threadParam);
115  /* Prototype for custom thread scheduler routine*/
116  typedef CALLBACK_API(ThreadID,
117  ThreadSchedulerProcPtr)(SchedulerInfoRecPtr schedulerInfo);
118  /* Prototype for custom thread switcher routine*/
119  typedef CALLBACK_API(void, ThreadSwitchProcPtr)(ThreadID threadBeingSwitched,
120  void *switchProcParam);
121  /* Prototype for thread termination notification routine*/
122  typedef CALLBACK_API(void,
123  ThreadTerminationProcPtr)(ThreadID threadTerminated,
124  void *terminationProcParam);
125  /* Prototype for debugger NewThread notification*/
126  typedef CALLBACK_API(void, DebuggerNewThreadProcPtr)(ThreadID threadCreated);
127  /* Prototype for debugger DisposeThread notification*/
128  typedef CALLBACK_API(void,
129  DebuggerDisposeThreadProcPtr)(ThreadID threadDeleted);
130  /* Prototype for debugger schedule notification*/
131  typedef CALLBACK_API(ThreadID, DebuggerThreadSchedulerProcPtr)(
132  SchedulerInfoRecPtr schedulerInfo);
133  typedef TVECTOR_UPP_TYPE(ThreadEntryProcPtr) ThreadEntryUPP;
134  typedef TVECTOR_UPP_TYPE(ThreadSchedulerProcPtr) ThreadSchedulerUPP;
135  typedef TVECTOR_UPP_TYPE(ThreadSwitchProcPtr) ThreadSwitchUPP;
136  typedef TVECTOR_UPP_TYPE(ThreadTerminationProcPtr) ThreadTerminationUPP;
137  typedef TVECTOR_UPP_TYPE(DebuggerNewThreadProcPtr) DebuggerNewThreadUPP;
138  typedef TVECTOR_UPP_TYPE(DebuggerDisposeThreadProcPtr) DebuggerDisposeThreadUPP;
139  typedef TVECTOR_UPP_TYPE(DebuggerThreadSchedulerProcPtr)
140  DebuggerThreadSchedulerUPP;
149  ThreadEntryUPP
150  NewThreadEntryUPP(ThreadEntryProcPtr userRoutine);
151 #if !OPAQUE_UPP_TYPES
152  enum
153  {
154  uppThreadEntryProcInfo = 0x000000F0
155  }; /* pascal 4_bytes Func(4_bytes) */
156 #ifdef __cplusplus
157  inline ThreadEntryUPP NewThreadEntryUPP(ThreadEntryProcPtr userRoutine)
158  {
159  return userRoutine;
160  }
161 #else
162 #define NewThreadEntryUPP(userRoutine) (userRoutine)
163 #endif
164 #endif
165 
174  ThreadSchedulerUPP
175  NewThreadSchedulerUPP(ThreadSchedulerProcPtr userRoutine);
176 #if !OPAQUE_UPP_TYPES
177  enum
178  {
179  uppThreadSchedulerProcInfo = 0x000000F0
180  }; /* pascal 4_bytes Func(4_bytes) */
181 #ifdef __cplusplus
182  inline ThreadSchedulerUPP
183  NewThreadSchedulerUPP(ThreadSchedulerProcPtr userRoutine)
184  {
185  return userRoutine;
186  }
187 #else
188 #define NewThreadSchedulerUPP(userRoutine) (userRoutine)
189 #endif
190 #endif
191 
200  ThreadSwitchUPP
201  NewThreadSwitchUPP(ThreadSwitchProcPtr userRoutine);
202 #if !OPAQUE_UPP_TYPES
203  enum
204  {
205  uppThreadSwitchProcInfo = 0x000003C0
206  }; /* pascal no_return_value Func(4_bytes, 4_bytes) */
207 #ifdef __cplusplus
208  inline ThreadSwitchUPP NewThreadSwitchUPP(ThreadSwitchProcPtr userRoutine)
209  {
210  return userRoutine;
211  }
212 #else
213 #define NewThreadSwitchUPP(userRoutine) (userRoutine)
214 #endif
215 #endif
216 
225  ThreadTerminationUPP
226  NewThreadTerminationUPP(ThreadTerminationProcPtr userRoutine);
227 #if !OPAQUE_UPP_TYPES
228  enum
229  {
230  uppThreadTerminationProcInfo = 0x000003C0
231  }; /* pascal no_return_value Func(4_bytes, 4_bytes) */
232 #ifdef __cplusplus
233  inline ThreadTerminationUPP
234  NewThreadTerminationUPP(ThreadTerminationProcPtr userRoutine)
235  {
236  return userRoutine;
237  }
238 #else
239 #define NewThreadTerminationUPP(userRoutine) (userRoutine)
240 #endif
241 #endif
242 
251  DebuggerNewThreadUPP
252  NewDebuggerNewThreadUPP(DebuggerNewThreadProcPtr userRoutine);
253 #if !OPAQUE_UPP_TYPES
254  enum
255  {
256  uppDebuggerNewThreadProcInfo = 0x000000C0
257  }; /* pascal no_return_value Func(4_bytes) */
258 #ifdef __cplusplus
259  inline DebuggerNewThreadUPP
260  NewDebuggerNewThreadUPP(DebuggerNewThreadProcPtr userRoutine)
261  {
262  return userRoutine;
263  }
264 #else
265 #define NewDebuggerNewThreadUPP(userRoutine) (userRoutine)
266 #endif
267 #endif
268 
277  DebuggerDisposeThreadUPP
278  NewDebuggerDisposeThreadUPP(DebuggerDisposeThreadProcPtr userRoutine);
279 #if !OPAQUE_UPP_TYPES
280  enum
281  {
282  uppDebuggerDisposeThreadProcInfo = 0x000000C0
283  }; /* pascal no_return_value Func(4_bytes) */
284 #ifdef __cplusplus
285  inline DebuggerDisposeThreadUPP
286  NewDebuggerDisposeThreadUPP(DebuggerDisposeThreadProcPtr userRoutine)
287  {
288  return userRoutine;
289  }
290 #else
291 #define NewDebuggerDisposeThreadUPP(userRoutine) (userRoutine)
292 #endif
293 #endif
294 
303  DebuggerThreadSchedulerUPP
304  NewDebuggerThreadSchedulerUPP(DebuggerThreadSchedulerProcPtr userRoutine);
305 #if !OPAQUE_UPP_TYPES
306  enum
307  {
308  uppDebuggerThreadSchedulerProcInfo = 0x000000F0
309  }; /* pascal 4_bytes Func(4_bytes) */
310 #ifdef __cplusplus
311  inline DebuggerThreadSchedulerUPP
312  NewDebuggerThreadSchedulerUPP(DebuggerThreadSchedulerProcPtr userRoutine)
313  {
314  return userRoutine;
315  }
316 #else
317 #define NewDebuggerThreadSchedulerUPP(userRoutine) (userRoutine)
318 #endif
319 #endif
320 
329  void
330  DisposeThreadEntryUPP(ThreadEntryUPP userUPP);
331 #if !OPAQUE_UPP_TYPES
332 #ifdef __cplusplus
333  inline void DisposeThreadEntryUPP(ThreadEntryUPP) {}
334 #else
335 #define DisposeThreadEntryUPP(userUPP)
336 #endif
337 #endif
338 
347  void
348  DisposeThreadSchedulerUPP(ThreadSchedulerUPP userUPP);
349 #if !OPAQUE_UPP_TYPES
350 #ifdef __cplusplus
351  inline void DisposeThreadSchedulerUPP(ThreadSchedulerUPP) {}
352 #else
353 #define DisposeThreadSchedulerUPP(userUPP)
354 #endif
355 #endif
356 
365  void
366  DisposeThreadSwitchUPP(ThreadSwitchUPP userUPP);
367 #if !OPAQUE_UPP_TYPES
368 #ifdef __cplusplus
369  inline void DisposeThreadSwitchUPP(ThreadSwitchUPP) {}
370 #else
371 #define DisposeThreadSwitchUPP(userUPP)
372 #endif
373 #endif
374 
383  void
384  DisposeThreadTerminationUPP(ThreadTerminationUPP userUPP);
385 #if !OPAQUE_UPP_TYPES
386 #ifdef __cplusplus
387  inline void DisposeThreadTerminationUPP(ThreadTerminationUPP) {}
388 #else
389 #define DisposeThreadTerminationUPP(userUPP)
390 #endif
391 #endif
392 
401  void
402  DisposeDebuggerNewThreadUPP(DebuggerNewThreadUPP userUPP);
403 #if !OPAQUE_UPP_TYPES
404 #ifdef __cplusplus
405  inline void DisposeDebuggerNewThreadUPP(DebuggerNewThreadUPP) {}
406 #else
407 #define DisposeDebuggerNewThreadUPP(userUPP)
408 #endif
409 #endif
410 
419  void
420  DisposeDebuggerDisposeThreadUPP(DebuggerDisposeThreadUPP userUPP);
421 #if !OPAQUE_UPP_TYPES
422 #ifdef __cplusplus
423  inline void DisposeDebuggerDisposeThreadUPP(DebuggerDisposeThreadUPP) {}
424 #else
425 #define DisposeDebuggerDisposeThreadUPP(userUPP)
426 #endif
427 #endif
428 
437  void
438  DisposeDebuggerThreadSchedulerUPP(DebuggerThreadSchedulerUPP userUPP);
439 #if !OPAQUE_UPP_TYPES
440 #ifdef __cplusplus
441  inline void DisposeDebuggerThreadSchedulerUPP(DebuggerThreadSchedulerUPP) {}
442 #else
443 #define DisposeDebuggerThreadSchedulerUPP(userUPP)
444 #endif
445 #endif
446 
455  voidPtr
456  InvokeThreadEntryUPP(void *threadParam, ThreadEntryUPP userUPP);
457 #if !OPAQUE_UPP_TYPES
458 #ifdef __cplusplus
459  inline voidPtr InvokeThreadEntryUPP(void *threadParam, ThreadEntryUPP userUPP)
460  {
461  return (*userUPP)(threadParam);
462  }
463 #else
464 #define InvokeThreadEntryUPP(threadParam, userUPP) (*userUPP)(threadParam)
465 #endif
466 #endif
467 
476  ThreadID
478  ThreadSchedulerUPP userUPP);
479 #if !OPAQUE_UPP_TYPES
480 #ifdef __cplusplus
481  inline ThreadID InvokeThreadSchedulerUPP(SchedulerInfoRecPtr schedulerInfo,
482  ThreadSchedulerUPP userUPP)
483  {
484  return (*userUPP)(schedulerInfo);
485  }
486 #else
487 #define InvokeThreadSchedulerUPP(schedulerInfo, userUPP) \
488  (*userUPP)(schedulerInfo)
489 #endif
490 #endif
491 
500  void
501  InvokeThreadSwitchUPP(ThreadID threadBeingSwitched, void *switchProcParam,
502  ThreadSwitchUPP userUPP);
503 #if !OPAQUE_UPP_TYPES
504 #ifdef __cplusplus
505  inline void InvokeThreadSwitchUPP(ThreadID threadBeingSwitched,
506  void *switchProcParam,
507  ThreadSwitchUPP userUPP)
508  {
509  (*userUPP)(threadBeingSwitched, switchProcParam);
510  }
511 #else
512 #define InvokeThreadSwitchUPP(threadBeingSwitched, switchProcParam, userUPP) \
513  (*userUPP)(threadBeingSwitched, switchProcParam)
514 #endif
515 #endif
516 
525  void
526  InvokeThreadTerminationUPP(ThreadID threadTerminated,
527  void *terminationProcParam,
528  ThreadTerminationUPP userUPP);
529 #if !OPAQUE_UPP_TYPES
530 #ifdef __cplusplus
531  inline void InvokeThreadTerminationUPP(ThreadID threadTerminated,
532  void *terminationProcParam,
533  ThreadTerminationUPP userUPP)
534  {
535  (*userUPP)(threadTerminated, terminationProcParam);
536  }
537 #else
538 #define InvokeThreadTerminationUPP(threadTerminated, terminationProcParam, \
539  userUPP) \
540  (*userUPP)(threadTerminated, terminationProcParam)
541 #endif
542 #endif
543 
552  void
553  InvokeDebuggerNewThreadUPP(ThreadID threadCreated,
554  DebuggerNewThreadUPP userUPP);
555 #if !OPAQUE_UPP_TYPES
556 #ifdef __cplusplus
557  inline void InvokeDebuggerNewThreadUPP(ThreadID threadCreated,
558  DebuggerNewThreadUPP userUPP)
559  {
560  (*userUPP)(threadCreated);
561  }
562 #else
563 #define InvokeDebuggerNewThreadUPP(threadCreated, userUPP) \
564  (*userUPP)(threadCreated)
565 #endif
566 #endif
567 
576  void
577  InvokeDebuggerDisposeThreadUPP(ThreadID threadDeleted,
578  DebuggerDisposeThreadUPP userUPP);
579 #if !OPAQUE_UPP_TYPES
580 #ifdef __cplusplus
581  inline void InvokeDebuggerDisposeThreadUPP(ThreadID threadDeleted,
582  DebuggerDisposeThreadUPP userUPP)
583  {
584  (*userUPP)(threadDeleted);
585  }
586 #else
587 #define InvokeDebuggerDisposeThreadUPP(threadDeleted, userUPP) \
588  (*userUPP)(threadDeleted)
589 #endif
590 #endif
591 
600  ThreadID
602  DebuggerThreadSchedulerUPP userUPP);
603 #if !OPAQUE_UPP_TYPES
604 #ifdef __cplusplus
605  inline ThreadID
607  DebuggerThreadSchedulerUPP userUPP)
608  {
609  return (*userUPP)(schedulerInfo);
610  }
611 #else
612 #define InvokeDebuggerThreadSchedulerUPP(schedulerInfo, userUPP) \
613  (*userUPP)(schedulerInfo)
614 #endif
615 #endif
616 
626 #if TARGET_OS_MAC && TARGET_CPU_PPC && !OPAQUE_UPP_TYPES
627  /* use raw function pointers*/
628  typedef ThreadEntryProcPtr ThreadEntryTPP;
629  typedef ThreadSchedulerProcPtr ThreadSchedulerTPP;
630  typedef ThreadSwitchProcPtr ThreadSwitchTPP;
631  typedef ThreadTerminationProcPtr ThreadTerminationTPP;
632  typedef DebuggerNewThreadProcPtr DebuggerNewThreadTPP;
633  typedef DebuggerDisposeThreadProcPtr DebuggerDisposeThreadTPP;
634  typedef DebuggerThreadSchedulerProcPtr DebuggerThreadSchedulerTPP;
635 #else
636 /* use UPP's*/
637 typedef ThreadEntryUPP ThreadEntryTPP;
638 typedef ThreadSchedulerUPP ThreadSchedulerTPP;
639 typedef ThreadSwitchUPP ThreadSwitchTPP;
640 typedef ThreadTerminationUPP ThreadTerminationTPP;
641 typedef DebuggerNewThreadUPP DebuggerNewThreadTPP;
642 typedef DebuggerDisposeThreadUPP DebuggerDisposeThreadTPP;
643 typedef DebuggerThreadSchedulerUPP DebuggerThreadSchedulerTPP;
644 #endif /* TARGET_OS_MAC && TARGET_CPU_PPC && !OPAQUE_UPP_TYPES */
645 
654  OSErr
655  NewThread(ThreadStyle threadStyle, ThreadEntryTPP threadEntry,
656  void *threadParam, Size stackSize, ThreadOptions options,
657  void **threadResult, /* can be NULL */
658  ThreadID *threadMade);
659 
668  OSErr
669  SetThreadScheduler(ThreadSchedulerTPP threadScheduler);
670 
679  OSErr
680  SetThreadSwitcher(ThreadID thread, ThreadSwitchTPP threadSwitcher,
681  void *switchProcParam, Boolean inOrOut);
682 
691  OSErr
692  SetThreadTerminator(ThreadID thread, ThreadTerminationTPP threadTerminator,
693  void *terminationProcParam);
694 
703  OSErr
704  SetDebuggerNotificationProcs(DebuggerNewThreadTPP notifyNewThread,
705  DebuggerDisposeThreadTPP notifyDisposeThread,
706  DebuggerThreadSchedulerTPP notifyThreadScheduler);
707 
716  OSErr
717  CreateThreadPool(ThreadStyle threadStyle, SInt16 numToCreate, Size stackSize);
718 
727  OSErr
728  GetFreeThreadCount(ThreadStyle threadStyle, SInt16 *freeCount);
729 
738  OSErr
739  GetSpecificFreeThreadCount(ThreadStyle threadStyle, Size stackSize,
740  SInt16 *freeCount);
741 
750  OSErr
751  GetDefaultThreadStackSize(ThreadStyle threadStyle, Size *stackSize);
752 
761  OSErr
762  ThreadCurrentStackSpace(ThreadID thread, UInt32 *freeStack);
763 
772  OSErr
773  DisposeThread(ThreadID threadToDump, void *threadResult, Boolean recycleThread);
774 
783  OSErr
784  YieldToThread(ThreadID suggestedThread);
785 
794  OSErr
796 
805 #if TARGET_OS_MAC
806 #define MacGetCurrentThread GetCurrentThread
807 #endif
808  OSErr
809  MacGetCurrentThread(ThreadID *currentThreadID);
810 
819  OSErr
820  GetThreadState(ThreadID threadToGet, ThreadState *threadState);
821 
830  OSErr
831  SetThreadState(ThreadID threadToSet, ThreadState newState,
832  ThreadID suggestedThread);
833 
842  OSErr
843  SetThreadStateEndCritical(ThreadID threadToSet, ThreadState newState,
844  ThreadID suggestedThread);
845 
854  OSErr
856 
865  OSErr
867 
876  OSErr
877  GetThreadCurrentTaskRef(ThreadTaskRef *threadTRef);
878 
887  OSErr
888  GetThreadStateGivenTaskRef(ThreadTaskRef threadTRef, ThreadID threadToGet,
889  ThreadState *threadState);
890 
899  OSErr
900  SetThreadReadyGivenTaskRef(ThreadTaskRef threadTRef, ThreadID threadToSet);
901 
902 #if PRAGMA_STRUCT_ALIGN
903 #pragma options align = reset
904 #elif PRAGMA_STRUCT_PACKPUSH
905 #pragma pack(pop)
906 #elif PRAGMA_STRUCT_PACK
907 #pragma pack()
908 #endif
909 
910 #ifdef PRAGMA_IMPORT_OFF
911 #pragma import off
912 #elif PRAGMA_IMPORT
913 #pragma import reset
914 #endif
915 
916 #ifdef __cplusplus
917 }
918 #endif
919 
920 #endif /* __THREADS__ */
OSErr codes.
Basic Macintosh data types.
unsigned char Boolean
Definition: MacTypes.h:318
Mixed Mode Manager Interfaces.
OSErr SetThreadSwitcher(ThreadID thread, ThreadSwitchTPP threadSwitcher, void *switchProcParam, Boolean inOrOut)
OSErr SetDebuggerNotificationProcs(DebuggerNewThreadTPP notifyNewThread, DebuggerDisposeThreadTPP notifyDisposeThread, DebuggerThreadSchedulerTPP notifyThreadScheduler)
void DisposeThreadSwitchUPP(ThreadSwitchUPP userUPP)
ThreadID InvokeDebuggerThreadSchedulerUPP(SchedulerInfoRecPtr schedulerInfo, DebuggerThreadSchedulerUPP userUPP)
OSErr GetDefaultThreadStackSize(ThreadStyle threadStyle, Size *stackSize)
OSErr NewThread(ThreadStyle threadStyle, ThreadEntryTPP threadEntry, void *threadParam, Size stackSize, ThreadOptions options, void **threadResult, ThreadID *threadMade)
OSErr GetSpecificFreeThreadCount(ThreadStyle threadStyle, Size stackSize, SInt16 *freeCount)
ThreadSchedulerUPP NewThreadSchedulerUPP(ThreadSchedulerProcPtr userRoutine)
OSErr GetThreadStateGivenTaskRef(ThreadTaskRef threadTRef, ThreadID threadToGet, ThreadState *threadState)
DebuggerDisposeThreadUPP NewDebuggerDisposeThreadUPP(DebuggerDisposeThreadProcPtr userRoutine)
void DisposeDebuggerThreadSchedulerUPP(DebuggerThreadSchedulerUPP userUPP)
OSErr SetThreadState(ThreadID threadToSet, ThreadState newState, ThreadID suggestedThread)
void DisposeThreadSchedulerUPP(ThreadSchedulerUPP userUPP)
ThreadID InvokeThreadSchedulerUPP(SchedulerInfoRecPtr schedulerInfo, ThreadSchedulerUPP userUPP)
OSErr DisposeThread(ThreadID threadToDump, void *threadResult, Boolean recycleThread)
void DisposeThreadEntryUPP(ThreadEntryUPP userUPP)
ThreadSwitchUPP NewThreadSwitchUPP(ThreadSwitchProcPtr userRoutine)
OSErr SetThreadScheduler(ThreadSchedulerTPP threadScheduler)
OSErr SetThreadStateEndCritical(ThreadID threadToSet, ThreadState newState, ThreadID suggestedThread)
DebuggerThreadSchedulerUPP NewDebuggerThreadSchedulerUPP(DebuggerThreadSchedulerProcPtr userRoutine)
OSErr GetThreadState(ThreadID threadToGet, ThreadState *threadState)
OSErr ThreadEndCritical(void)
void DisposeDebuggerNewThreadUPP(DebuggerNewThreadUPP userUPP)
OSErr GetThreadCurrentTaskRef(ThreadTaskRef *threadTRef)
void DisposeDebuggerDisposeThreadUPP(DebuggerDisposeThreadUPP userUPP)
void DisposeThreadTerminationUPP(ThreadTerminationUPP userUPP)
OSErr CreateThreadPool(ThreadStyle threadStyle, SInt16 numToCreate, Size stackSize)
void InvokeDebuggerNewThreadUPP(ThreadID threadCreated, DebuggerNewThreadUPP userUPP)
OSErr ThreadBeginCritical(void)
OSErr ThreadCurrentStackSpace(ThreadID thread, UInt32 *freeStack)
void * voidPtr
Definition: Threads.h:112
OSErr GetFreeThreadCount(ThreadStyle threadStyle, SInt16 *freeCount)
DebuggerNewThreadUPP NewDebuggerNewThreadUPP(DebuggerNewThreadProcPtr userRoutine)
void InvokeDebuggerDisposeThreadUPP(ThreadID threadDeleted, DebuggerDisposeThreadUPP userUPP)
OSErr SetThreadReadyGivenTaskRef(ThreadTaskRef threadTRef, ThreadID threadToSet)
ThreadEntryUPP NewThreadEntryUPP(ThreadEntryProcPtr userRoutine)
void InvokeThreadSwitchUPP(ThreadID threadBeingSwitched, void *switchProcParam, ThreadSwitchUPP userUPP)
void InvokeThreadTerminationUPP(ThreadID threadTerminated, void *terminationProcParam, ThreadTerminationUPP userUPP)
OSErr YieldToAnyThread(void)
ThreadEntryUPP ThreadEntryTPP
Definition: Threads.h:637
OSErr SetThreadTerminator(ThreadID thread, ThreadTerminationTPP threadTerminator, void *terminationProcParam)
OSErr MacGetCurrentThread(ThreadID *currentThreadID)
OSErr YieldToThread(ThreadID suggestedThread)
voidPtr InvokeThreadEntryUPP(void *threadParam, ThreadEntryUPP userUPP)
ThreadTerminationUPP NewThreadTerminationUPP(ThreadTerminationProcPtr userRoutine)
Definition: Threads.h:98