sysosh.inc 1.7 KB

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