Browse Source

+ import the win16 task apis

git-svn-id: trunk@31542 -
nickysn 10 years ago
parent
commit
f751b18754
3 changed files with 14 additions and 0 deletions
  1. 4 0
      rtl/win16/win31.pp
  2. 8 0
      rtl/win16/winprocs.pp
  3. 2 0
      rtl/win16/wintypes.pp

+ 4 - 0
rtl/win16/win31.pp

@@ -180,6 +180,10 @@ function IsBadHugeWritePtr(lp: FarPointer; cb: DWORD): BOOL; external 'KERNEL';
 function IsBadCodePtr(lpfn: FARPROC): BOOL; external 'KERNEL';
 function IsBadCodePtr(lpfn: FARPROC): BOOL; external 'KERNEL';
 function IsBadStringPtr(lpsz: LPSTR; cchMax: UINT): BOOL; external 'KERNEL';
 function IsBadStringPtr(lpsz: LPSTR; cchMax: UINT): BOOL; external 'KERNEL';
 
 
+{ Task Management }
+
+function IsTask(Task: HTASK): BOOL; external 'KERNEL';
+
 implementation
 implementation
 
 
 end.
 end.

+ 8 - 0
rtl/win16/winprocs.pp

@@ -101,6 +101,14 @@ function SetSwapAreaSize(Size: UINT): LONG; external 'KERNEL';
 procedure SwapRecording(Flag: UINT); external 'KERNEL';
 procedure SwapRecording(Flag: UINT); external 'KERNEL';
 procedure ValidateCodeSegments; external 'KERNEL';
 procedure ValidateCodeSegments; external 'KERNEL';
 
 
+{ Task Management }
+
+function GetNumTasks: UINT; external 'KERNEL';
+function GetCurrentTask: HTASK; external 'KERNEL';
+
+procedure Yield; external 'KERNEL';
+procedure DirectedYield(Task: HTASK); external 'KERNEL';
+
 implementation
 implementation
 
 
 function LOBYTE(w: Word): Byte;
 function LOBYTE(w: Word): Byte;

+ 2 - 0
rtl/win16/wintypes.pp

@@ -114,6 +114,8 @@ type
   PSegInfo = ^TSegInfo;
   PSegInfo = ^TSegInfo;
   TSegInfo = SEGINFO;
   TSegInfo = SEGINFO;
 
 
+  HTASK = THandle;
+
 implementation
 implementation
 
 
 end.
 end.