home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12osp1.exe / include / os2 / vtdptd.h < prev    next >
C/C++ Source or Header  |  1997-04-02  |  4KB  |  147 lines

  1. /***************************************************************************
  2. *
  3. * Module Name: Vtdpdt.h
  4. *
  5. * OS/2 public header file.
  6. *
  7. * Copyright (c) 1993  IBM Corporation
  8. *
  9. * Virtual Timer Device Driver VDD/PDD Communication Interface
  10. *
  11. *      All Rights Reserved
  12. *
  13. *
  14. */
  15.  
  16. #pragma checkout( suspend )
  17.    #ifndef __CHKHDR__
  18.       #pragma checkout( suspend )
  19.    #endif
  20. #pragma checkout( resume )
  21.  
  22. #ifndef __VTDPTD__
  23. #define __VTDPTD__
  24.  
  25. // Floppy PDD component definitions
  26.  
  27. #define PTD_NAME        "TIMER$"
  28.  
  29.  
  30. /***    PDD function commands
  31.  *
  32.  *  Format:
  33.  *      (*fpfnPTimerProc)(PTDCMD_*, ul1, ul2);
  34.  *
  35.  *  PTDCMD_REGISTER:
  36.  *      ENTRY
  37.  *          ul1 == segment of 16:32 VDD entry point
  38.  *          ul2 ==  offset of 16:32 VDD entry point
  39.  *      EXIT
  40.  *          returns TRUE
  41.  *      CONTEXT
  42.  *          Init-time
  43.  *
  44.  *  PTDCMD_DEREGISTER:
  45.  *      ENTRY
  46.  *          ul1 == 0                    //not used
  47.  *          ul2 == 0                    //not used
  48.  *      EXIT
  49.  *          returns TRUE
  50.  *      CONTEXT
  51.  *          Task-time
  52.  *
  53.  *  PTDCMD_ENABLETICK:
  54.  *      ENTRY
  55.  *          ul1 == 0                    //not used
  56.  *          ul2 == 0                    //not used
  57.  *      EXIT
  58.  *          returns TRUE
  59.  *      CONTEXT
  60.  *          VDM Task-time
  61.  *
  62.  *  PTDCMD_DISABLETICK:
  63.  *      ENTRY
  64.  *          ul1 == 0                    //not used
  65.  *          ul2 == 0                    //not used
  66.  *      EXIT
  67.  *          returns TRUE
  68.  *      CONTEXT
  69.  *          VDM Task-time
  70.  */
  71.  
  72.  
  73. #define PTDCMD_REGISTER         PDDCMD_REGISTER         //register VDD
  74. #define PTDCMD_DEREGISTER       (PTDCMD_REGISTER+1)     //de-register of VDD
  75. #define PTDCMD_ENABLETICK       (PTDCMD_REGISTER+2)     //enable tick int.
  76. #define PTDCMD_DISABLETICK      (PTDCMD_REGISTER+3)     //disable tick int.
  77.  
  78. #define PTDCMD_LASTEVENT        PTDCMD_DISABLETICK
  79.  
  80.  
  81. /***    VDD function commands
  82.  *
  83.  *  Format:
  84.  *      (*fpfnVTimerProc)(VTDCMD_*, ul1, ul2);
  85.  *
  86.  *  VTDCMD_TICKEVENT:
  87.  *      ENTRY
  88.  *          ul1 == 0                    //not used
  89.  *          ul2 == 0                    //not used
  90.  *      EXIT
  91.  *          returns TRUE
  92.  *      CONTEXT
  93.  *          Interrupt-time
  94.  *
  95.  *  VTDCMD_PREEMPTT0:
  96.  *      ENTRY
  97.  *          ul1 == 0                    //not used
  98.  *          ul2 == 0                    //not used
  99.  *      EXIT
  100.  *          returns TRUE
  101.  *      CONTEXT
  102.  *          Task-time
  103.  *
  104.  *  VTDCMD_RELEASET0:
  105.  *      ENTRY
  106.  *          ul1 == 0                    //not used
  107.  *          ul2 == 0                    //not used
  108.  *      EXIT
  109.  *          returns TRUE
  110.  *      CONTEXT
  111.  *          Task-time
  112.  *
  113.  *  VTDCMD_PREEMPTT2:
  114.  *      ENTRY
  115.  *          ul1 == 0                    //not used
  116.  *          ul2 == 0                    //not used
  117.  *      EXIT
  118.  *          returns TRUE
  119.  *      CONTEXT
  120.  *          Task-time
  121.  *
  122.  *  VTDCMD_RELEASET2:
  123.  *      ENTRY
  124.  *          ul1 == 0                    //not used
  125.  *          ul2 == 0                    //not used
  126.  *      EXIT
  127.  *          returns TRUE
  128.  *      CONTEXT
  129.  *          Task-time
  130.  */
  131.  
  132. #define VTDCMD_TICKEVENT        0x00
  133. #define VTDCMD_PREEMPTT0        0x01
  134. #define VTDCMD_RELEASET0        0x02
  135. #define VTDCMD_PREEMPTT2        0x03
  136. #define VTDCMD_RELEASET2        0x04
  137.  
  138. #define VTDCMD_LASTEVENT        VTDCMD_RELEASET2
  139.  
  140. #endif /* __VTDPTD__ */
  141.  
  142. #pragma checkout( suspend )
  143.    #ifndef __CHKHDR__
  144.       #pragma checkout( resume )
  145.    #endif
  146. #pragma checkout( resume )
  147.