home *** CD-ROM | disk | FTP | other *** search
/ Solo Programadores 22 / SOLO_22.iso / packages / win32ada / data.z / win32-perthread.adb < prev    next >
Encoding:
Text File  |  1995-11-17  |  1.8 KB  |  46 lines

  1. -- $Source: /home/harp/1/proto/monoBANK/winnt/win32-perthread.adb,v $ 
  2. -- $Revision: 1.3 $ $Date: 95/02/02 15:56:27 $ $Author: mg $ 
  3. -------------------------------------------------------------------------------
  4. --
  5. -- THIS FILE AND ANY ASSOCIATED DOCUMENTATION IS FURNISHED "AS IS" WITHOUT 
  6. -- WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 
  7. -- TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR 
  8. -- PURPOSE.  The user assumes the entire risk as to the accuracy and the 
  9. -- use of this file.
  10. --
  11. -- Copyright (c) Intermetrics, Inc. 1995
  12. -- Royalty-free, unlimited, worldwide, non-exclusive use, modification, 
  13. -- reproduction and further distribution of this file is permitted.
  14. --
  15. -------------------------------------------------------------------------------
  16.  
  17.  
  18. package body Win32.PerThread is
  19.  
  20.     -- type Per_Thread_Object is (Errno, Doserrno, Fpecode, Pxcptinfoptrs);
  21.  
  22.     function Get_Address (Which: Per_Thread_Object) return System.Address is
  23.  
  24.         function Errno_Addr return System.Address;
  25.         pragma Import(C, Errno_Addr, "_errno");
  26.  
  27.         function DOSErrno_Addr return System.Address;
  28.         pragma Import(C, DOSErrno_Addr, "__doserrno");
  29.  
  30.         function Fpecode_Addr return System.Address;
  31.         pragma Import(C, Fpecode_Addr, "__fpecode");
  32.  
  33.         function Pxcptinfoptrs_Addr return System.Address;
  34.         pragma Import(C, Pxcptinfoptrs_Addr, "__pxcptinfoptrs");
  35.  
  36.     begin
  37.         case Which is
  38.             when Errno         => return Errno_Addr;
  39.             when DOSErrno      => return DOSErrno_Addr;
  40.             when Fpecode       => return Fpecode_Addr;
  41.             when Pxcptinfoptrs => return Pxcptinfoptrs_Addr;
  42.         end case;
  43.     end Get_Address;
  44.  
  45. end Win32.PerThread;
  46.