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

  1. /***************************************************************************
  2. *
  3. * Module Name: VFDPDF.H
  4. *
  5. * OS/2 public header file.
  6. *
  7. * Copyright (c) 1993  IBM Corporation
  8. *
  9. * Virtual Floppy Device Driver VDD/PDD Communication Interface
  10. *
  11. */
  12.  
  13. #pragma checkout( suspend )
  14.    #ifndef __CHKHDR__
  15.       #pragma checkout( suspend )
  16.    #endif
  17. #pragma checkout( resume )
  18.  
  19. #ifndef __VFDPFD__
  20. #define __VFDPFD__
  21.  
  22. /* Floppy PDD component definitions */
  23.  
  24. #define FLPY_NAME       "FLPY$"
  25.  
  26.  
  27. /***    PDD function commands
  28.  *
  29.  *  Format:
  30.  *      (*fpfnPFDProc)(PFDCMD_*, ul1, ul2);
  31.  *
  32.  *  PFDCMD_REGISTER:
  33.  *      ENTRY
  34.  *          ul1 == segment of 16:32 VDD entry point
  35.  *          ul2 ==  offset of 16:32 VDD entry point
  36.  *      EXIT
  37.  *          Returns TRUE
  38.  *      CONTEXT
  39.  *          Init-time
  40.  *
  41.  *  PFDCMD_DEREGISTER:
  42.  *      ENTRY
  43.  *          ul1 == 0                    //not used
  44.  *          ul2 == 0                    //not used
  45.  *      EXIT
  46.  *          Returns TRUE
  47.  *      CONTEXT
  48.  *          Task-time
  49.  *
  50.  *  PFDCMD_REQFLOPPY:
  51.  *      ENTRY
  52.  *          ul1 == 0                    //not used
  53.  *          ul2 == 0                    //not used
  54.  *      EXIT-SUCCESS
  55.  *          returns TRUE - ownership granted
  56.  *      EXIT-FAILURE
  57.  *          return FALSE - floppy currently busy
  58.  *                         delay ownership notification required
  59.  *      CONTEXT
  60.  *          VDM Task-time
  61.  *      NOTE
  62.  *          This request is non-blocking.
  63.  *
  64.  *  PFDCMD_FREEFLOPPY:
  65.  *      ENTRY
  66.  *          ul1 == 0                    //not used
  67.  *          ul2 == 0                    //not used
  68.  *      EXIT
  69.  *          Returns TRUE
  70.  *      CONTEXT
  71.  *          VDM Task-time
  72.  *      NOTE
  73.  *          VFD may call PFD to free the floppy even if PFD has never
  74.  *          requested it.  This may occur if the VDM owner has died
  75.  *          in which case the ownership is returned to the PFD.
  76.  */
  77.  
  78.  
  79. #define PFDCMD_REGISTER         PDDCMD_REGISTER         /* register VDD          */
  80. #define PFDCMD_DEREGISTER       (PFDCMD_REGISTER+1)     /* de-register of VDD    */
  81. #define PFDCMD_REQFLOPPY        (PFDCMD_REGISTER+2)     /* req. floppy ownership */
  82. #define PFDCMD_FREEFLOPPY       (PFDCMD_REGISTER+3)     /* free floppy ownership */
  83. #define PFDCMD_HOOKIRQ6         (PFDCMD_REGISTER+4)     /* HOOK IRQ6 INTS */
  84.  
  85. #define PFDCMD_LASTEVENT        PFDCMD_FREEFLOPPY
  86.  
  87.  
  88. /***    VDD function commands
  89.  *
  90.  *  Format:
  91.  *      (*fpfnVFDProc)(VFDCMD_*, ul1, ul2);
  92.  *
  93.  *  VFDCMD_REQFLOPPY:
  94.  *      ENTRY
  95.  *          ul1 == 0
  96.  *          ul2 == 0
  97.  *      EXIT-SUCCESS
  98.  *          returns TRUE - ownership granted
  99.  *      EXIT-FAILURE
  100.  *          returns FALSE - floppy currently busy
  101.  *                          delay ownership notification required
  102.  *      CONTEXT
  103.  *          Task-time
  104.  *          Interrupt-time
  105.  *      NOTE
  106.  *          This request is non-blocking.
  107.  *
  108.  *  VFDCMD_FREEFLOPPY:
  109.  *      ENTRY
  110.  *          ul1 == 0
  111.  *          ul2 == 0
  112.  *      EXIT-SUCCESS
  113.  *          Returns TRUE
  114.  *      EXIT-FAILURE
  115.  *          Returns FALSE - ownership not accepted because requester has died
  116.  *      CONTEXT
  117.  *          Task-time
  118.  *          Interrupt-time
  119.  *
  120.  *  VFDCMD_INTERRUPTEVENT:
  121.  *      ENTRY
  122.  *          ul1 == 0
  123.  *          ul2 == 0
  124.  *      EXIT
  125.  *          Returns TRUE
  126.  *      CONTEXT
  127.  *          Interrupt-time
  128.  */
  129.  
  130. #define VFDCMD_REQFLOPPY        0x00
  131. #define VFDCMD_FREEFLOPPY       0x01
  132. #define VFDCMD_INTERRUPTEVENT   0x02
  133.  
  134. #define VFDCMD_LASTEVENT        VFDCMD_INTERRUPTEVENT
  135.  
  136. #endif /* __VFDPFD__ */
  137.  
  138. #pragma checkout( suspend )
  139.    #ifndef __CHKHDR__
  140.       #pragma checkout( resume )
  141.    #endif
  142. #pragma checkout( resume )
  143.