* DosCalls dependency removed to avoid type redefinitions

This commit is contained in:
Tomas Hajny 2002-02-10 13:38:14 +00:00
parent 53d855b3c3
commit 1cad10952b
2 changed files with 81 additions and 5 deletions

View File

@ -1,7 +1,7 @@
{ {
$Id$ $Id$
This file is part of the Free Component Library (FCL) This file is part of the Free Component Library (FCL)
Copyright (c) 1999-2000 by Michael Van Canneyt and Florian Klaempfl Copyright (c) 1999-2002 by the Free Pascal development team
Classes unit for OS/2 Classes unit for OS/2
@ -24,12 +24,12 @@ unit Classes;
interface interface
uses uses
DosCalls, (* Needed here (i.e. before SysUtils) to avoid type clashes. *)
strings, strings,
sysutils; sysutils;
{$i classesh.inc} {$i classesh.inc}
implementation implementation
uses uses
@ -38,6 +38,7 @@ uses
{ OS - independent class implementations are in /inc directory. } { OS - independent class implementations are in /inc directory. }
{$i classes.inc} {$i classes.inc}
initialization initialization
CommonInit; CommonInit;
@ -47,7 +48,10 @@ finalization
end. end.
{ {
$Log$ $Log$
Revision 1.4 2000-12-19 00:43:07 hajny Revision 1.5 2002-02-10 13:38:14 hajny
* DosCalls dependency removed to avoid type redefinitions
Revision 1.4 2000/12/19 00:43:07 hajny
+ FCL made compilable under OS/2 + FCL made compilable under OS/2
Revision 1.3 2000/08/25 17:32:16 hajny Revision 1.3 2000/08/25 17:32:16 hajny

View File

@ -1,7 +1,7 @@
{ {
$Id$ $Id$
This file is part of the Free Component Library (FCL) This file is part of the Free Component Library (FCL)
Copyright (c) 1999-2000 by the Free Pascal development team Copyright (c) 1999-2002 by the Free Pascal development team
See the file COPYING.FPC, included in this distribution, See the file COPYING.FPC, included in this distribution,
for details about the copyright. for details about the copyright.
@ -15,11 +15,80 @@
{* TThread *} {* TThread *}
{****************************************************************************} {****************************************************************************}
(* OS/2 specific declarations - see unit DosCalls for descriptions *)
type
TByteArray = array [0..$fff0] of byte;
PByteArray = ^TByteArray;
TThreadEntry = function (Param: pointer): longint; cdecl;
TSysThreadIB = record
TID, Priority, Version: longint;
MCCount, MCForceFlag: word;
end;
PSysThreadIB = ^TSysThreadIB;
TThreadInfoBlock = record
Exh_Chain, Stack, StackLimit: pointer;
TIB2: PSysThreadIB;
Version, Ordinal: longint;
end;
PThreadInfoBlock = ^TThreadInfoBlock;
PPThreadInfoBlock = ^PThreadInfoBlock;
TProcessInfoBlock = record
PID, ParentPID, HMTE: longint;
Cmd, Env: PByteArray;
flStatus, tType: longint;
end;
PProcessInfoBlock = ^TProcessInfoBlock;
PPProcessInfoBlock = ^PProcessInfoBlock;
const
deThread = 0;
deProcess = 1;
dtSuspended = 1;
dtStack_Commited = 2;
dtWait = 0;
dtNoWait = 1;
procedure DosGetInfoBlocks (PATIB: PPThreadInfoBlock;
PAPIB: PPProcessInfoBlock); cdecl; external 'DOSCALLS' index 312;
function DosSetPriority (Scope, TrClass, Delta, PortID: longint): longint;
cdecl; external 'DOSCALLS' index 236;
procedure DosExit (Action, Result: longint); cdecl;
external 'DOSCALLS' index 233;
function DosCreateThread (var TID: longint; Address: TThreadEntry;
aParam: pointer; Flags: longint; StackSize: longint): longint; cdecl;
external 'DOSCALLS' index 311;
function DosKillThread (TID: longint): longint; cdecl;
external 'DOSCALLS' index 111;
function DosResumeThread (TID: longint): longint; cdecl;
external 'DOSCALLS' index 237;
function DosSuspendThread (TID: longint): longint; cdecl;
external 'DOSCALLS' index 238;
function DosWaitThread (var TID: longint; Option: longint): longint; cdecl;
external 'DOSCALLS' index 349;
const const
Priorities: array [TThreadPriority] of word = ($100, $200, $207, $20F, $217, Priorities: array [TThreadPriority] of word = ($100, $200, $207, $20F, $217,
$21F, $300); $21F, $300);
ThreadCount: longint = 0; ThreadCount: longint = 0;
(* Implementation of exported functions *)
procedure AddThread (T: TThread); procedure AddThread (T: TThread);
begin begin
@ -162,7 +231,10 @@ end;
{ {
$Log$ $Log$
Revision 1.4 2001-10-09 02:21:00 carl Revision 1.5 2002-02-10 13:38:14 hajny
* DosCalls dependency removed to avoid type redefinitions
Revision 1.4 2001/10/09 02:21:00 carl
* bugfix #1639 (IsMultiThread varialbe setting) * bugfix #1639 (IsMultiThread varialbe setting)
Revision 1.3 2000/12/19 00:43:07 hajny Revision 1.3 2000/12/19 00:43:07 hajny