Changeset 5470:a67fd926e963 in roaraudio


Ignore:
Timestamp:
04/12/12 02:34:53 (9 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

support new flag ROAR_VIO_SELECT_NO_RETEST

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/vio_select.h

    r5381 r5470  
    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          0x0000 
     42#define ROAR_VIO_SELECT_READ          0x0001 
     43#define ROAR_VIO_SELECT_WRITE         0x0002 
     44#define ROAR_VIO_SELECT_EXCEPT        0x0004 
     45#define ROAR_VIO_SELECT_NO_RETEST     0x4000 /* uppermostt bit set */ 
    4546 
    4647#define ROAR_VIO_SELECT_ACTION_NONE   0x00 
  • libroar/vio_select.c

    r5381 r5470  
    6464 // pepaer internal structs: 
    6565 for (i = 0; i < len; i++) { 
     66  if ( vios[i].eventsq & ROAR_VIO_SELECT_NO_RETEST ) 
     67   continue; 
     68 
    6669  ROAR_DBG("roar_vio_select(vios=%p, len=%llu, rtv=%p, ctl=%p): vios[i=%i].fh=%i", vios, (long long unsigned int)len, rtv, ctl, i, vios[i].fh); 
    6770  if ( vios[i].fh == -1 ) { 
     
    111114 // check: 
    112115 for (i = 0; i < len; i++) { 
     116  if ( vios[i].eventsq & ROAR_VIO_SELECT_NO_RETEST ) 
     117   continue; 
     118 
    113119  if ( !( vios[i].internal.action == 0 || vios[i].internal.action == ROAR_VIO_SELECT_ACTION_SELECT ) ) { 
    114120   // we currently do not support non-select selects. 
     
    126132 
    127133 for (i = 0; i < len; i++) { 
     134  if ( vios[i].eventsq & ROAR_VIO_SELECT_NO_RETEST ) 
     135   continue; 
     136 
    128137  if ( vios[i].eventsq & ROAR_VIO_SELECT_READ ) { 
    129138   ROAR_DBG("roar_vio_select(vios=%p, len=%llu, rtv=%p, ctl=%p): vios[i=%i] is READ, fh=%i", vios, (long long unsigned int)len, rtv, ctl, i, vios[i].internal.fh[0]); 
     
    173182 // set eventsa: 
    174183 for (i = 0; i < len; i++) { 
     184  if ( vios[i].eventsq & ROAR_VIO_SELECT_NO_RETEST ) 
     185   continue; 
     186 
    175187  vios[i].eventsa = ROAR_VIO_SELECT_NONE; 
    176188 
Note: See TracChangeset for help on using the changeset viewer.