sysosh.inc 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2001 by Free Pascal development team
  4. This file implements all the base types and limits required
  5. for a minimal POSIX compliant subset required to port the compiler
  6. to a new OS.
  7. See the file COPYING.FPC, included in this distribution,
  8. for details about the copyright.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12. **********************************************************************}
  13. {Platform specific information}
  14. type
  15. THandle = PtrInt;
  16. TThreadID = THandle;
  17. TOSTimestamp = Longint;
  18. PRTLCriticalSection = ^TRTLCriticalSection;
  19. TRTLCriticalSection = record
  20. { This must actually be bigger or equal to sizeof(TSignalSemaphore)
  21. which seems to be 46 bytes on MorphOS and Amiga/m68k,
  22. 56 bytes on AROS/x86 ABIv0 and 104 bytes on AROS x64}
  23. {$ifdef CPU64}
  24. semaphore: array[0..128] of byte;
  25. {$else}
  26. semaphore: array[0..63] of byte;
  27. {$endif}
  28. end;
  29. { BeginThread flags we support in AThreads }
  30. const
  31. CREATE_SUSPENDED = 1;
  32. STACK_SIZE_PARAM_IS_A_RESERVATION = 2;
  33. { Thread Init/Exit Procedure support }
  34. Procedure AddThreadInitProc(Proc: TProcedure);
  35. Procedure AddThreadExitProc(Proc: TProcedure);
  36. Procedure DoThreadInitProcChain;
  37. Procedure DoThreadExitProcChain;