thread.inc 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1999-2000 by the Free Pascal development team.
  5. Dummy multithreading support for DOS
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. const
  13. threadvarblocksize : dword = 0;
  14. type
  15. pd = ^dword;
  16. var
  17. mainprogramthreadblock : pointer;
  18. procedure init_threadvar(offset : pdword;size : dword);[public,alias: 'FPC_INIT_THREADVAR'];
  19. begin
  20. offset^:=threadvarblocksize;
  21. inc(threadblocksize,size);
  22. end;
  23. function relocate_threadvar(offset : dword) : pointer;[public,alias: 'FPC_RELOCATE_THREADVAR'];
  24. asm
  25. movl mainprogramthreadblock,%eax
  26. addl offset,%eax
  27. end;
  28. {
  29. $Log$
  30. Revision 1.4 2000-02-09 16:59:29 peter
  31. * truncated log
  32. Revision 1.3 2000/01/07 16:41:32 daniel
  33. * copyright 2000
  34. }