Changeset 3767:9bfa5f13666f in roaraudio for include/libroar/vio_select.h


Ignore:
Timestamp:
05/04/10 18:57:58 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added select like feature for VIOs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/vio_select.h

    r3653 r3767  
    3939#include "libroar.h" 
    4040 
    41 #define ROAR_VIO_SELECT_NONE        0x00 
    42 #define ROAR_VIO_SELECT_READ        0x01 
    43 #define ROAR_VIO_SELECT_WRITE       0x02 
    44 #define ROAR_VIO_SELECT_EXCEPT      0x04 
     41#define ROAR_VIO_SELECT_NONE          0x00 
     42#define ROAR_VIO_SELECT_READ          0x01 
     43#define ROAR_VIO_SELECT_WRITE         0x02 
     44#define ROAR_VIO_SELECT_EXCEPT        0x04 
     45 
     46#define ROAR_VIO_SELECT_ACTION_NONE   0x00 
     47#define ROAR_VIO_SELECT_ACTION_SELECT 0x01 
     48#define ROAR_VIO_SELECT_ACTION_POLL   0x02 
     49#define ROAR_VIO_SELECT_ACTION_VIOS   0x04 /* VIO Select */ 
     50 
     51#define ROAR_VIO_SELECT_SETVIO(d,v,q) ((d)->vio = (v)); ((d)->fh = -1); ((d)->eventsq = (q)) 
     52#define ROAR_VIO_SELECT_SETSYSIO(d,f,q) ((d)->vio = NULL); ((d)->fh = (f)); ((d)->eventsq = (q)) 
    4553 
    4654struct roar_vio_select_internal { 
     
    5159struct roar_vio_select { 
    5260 struct roar_vio_calls * vio; 
     61 int fh; 
    5362 int eventsq; 
    5463 int eventsa; 
     64 union { 
     65  int    si; 
     66  void * vp; 
     67 } ud; 
    5568 struct roar_vio_select_internal internal; 
    5669}; 
     
    6073}; 
    6174 
     75struct roar_vio_selecttv { 
     76 int64_t sec; 
     77 int32_t nsec; 
     78}; 
     79 
     80ssize_t roar_vio_select(struct roar_vio_select * vios, size_t len, struct roar_vio_selecttv * rtv, struct roar_vio_selectctl * ctl); 
     81 
    6282#endif 
    6383 
Note: See TracChangeset for help on using the changeset viewer.