si_c21g.pp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2005 by Michael Van Canneyt, Peter Vreman,
  4. & Daniel Mantione, members of the Free Pascal development team.
  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. unit si_c21g;
  12. interface
  13. {$i si_intf.inc}
  14. implementation
  15. {$i sysnr.inc}
  16. {$i si_impl.inc}
  17. {$i si_c21.inc}
  18. var
  19. gmon_started: boolean;
  20. gmon_start : record end;external name 'PASCALMAIN';
  21. gmon_etext : record end;external name '_etext';
  22. procedure atexit(p: pointer); cdecl; external;
  23. procedure monstartup (main,etext : pointer); cdecl; external;
  24. procedure _mcleanup; cdecl; external;
  25. procedure __gmon_start__; cdecl; public;
  26. begin
  27. if not gmon_started then
  28. begin
  29. gmon_started:=true;
  30. monstartup(@gmon_start,@gmon_etext);
  31. atexit(@_mcleanup);
  32. end;
  33. end;
  34. end.