sysosh.inc 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 = Pointer;
  14. ULONG_PTR = PtrUInt;
  15. TThreadID = THandle;
  16. SIZE_T = ULONG_PTR;
  17. { the fields of this record are os dependent }
  18. { and they shouldn't be used in a program }
  19. { only the type TCriticalSection is important }
  20. PRTLCriticalSection = ^TRTLCriticalSection;
  21. TRTLCriticalSection = packed record
  22. DebugInfo : pointer;
  23. LockCount : longint;
  24. RecursionCount : longint;
  25. OwningThread : THandle;
  26. LockSemaphore : THandle;
  27. SpinCount : ULONG_PTR;
  28. end;
  29. var
  30. { the following variables are only set if apptype=native and the RTL is
  31. compiled with -dKMODE (device driver)
  32. they are exported with their real types in unit DDK }
  33. // real type: PNtUnicodeString; only valid during PascalMain
  34. SysRegistryPath: Pointer = Nil;
  35. // real type: PDriverObject; only valid during PascalMain
  36. SysDriverObject: Pointer = Nil;
  37. type
  38. TTagString = String[4];
  39. {$ifdef KMODE}
  40. const
  41. DefaultPoolTag = 'fpc';
  42. var
  43. // tells the heap whether to use paged memory or not
  44. HeapUsePagedPool: Boolean = True;
  45. // the tag is a four byte string to identify the memory allocated by our
  46. // driver, which must not be empty
  47. HeapPoolTag: TTagString = DefaultPoolTag;
  48. {$endif KMODE}