sysosh.inc 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. {
  2. Basic Native NT stuff
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 2009 by Sven Barth
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. { Platform specific information }
  12. type
  13. THandle = PtrUInt;
  14. TThreadID = THandle;
  15. TOSTimestamp = Longint;
  16. { the fields of this record are os dependent }
  17. { and they shouldn't be used in a program }
  18. { only the type TCriticalSection is important }
  19. PRTLCriticalSection = ^TRTLCriticalSection;
  20. TRTLCriticalSection = packed record
  21. DebugInfo : pointer;
  22. LockCount : longint;
  23. RecursionCount : longint;
  24. OwningThread : THandle;
  25. LockSemaphore : THandle;
  26. SpinCount : LongWord; // PtrUInt?
  27. end;
  28. var
  29. { the following variables are only set if apptype=native and the RTL is
  30. compiled with -dKMODE (device driver)
  31. they are exported with their real types in unit DDK }
  32. // real type: PNtUnicodeString; only valid during PascalMain
  33. SysRegistryPath: Pointer = Nil;
  34. // real type: PDriverObject; only valid during PascalMain
  35. SysDriverObject: Pointer = Nil;
  36. type
  37. TTagString = String[4];
  38. {$ifdef KMODE}
  39. const
  40. DefaultPoolTag = 'fpc';
  41. var
  42. // tells the heap whether to use paged memory or not
  43. HeapUsePagedPool: Boolean = True;
  44. // the tag is a four byte string to identify the memory allocated by our
  45. // driver, which must not be empty
  46. HeapPoolTag: TTagString = DefaultPoolTag;
  47. {$endif KMODE}