diff options
| -rw-r--r-- | Changes | 1 | ||||
| -rw-r--r-- | eio.c | 6 | ||||
| -rw-r--r-- | eio.h | 4 | 
3 files changed, 8 insertions, 3 deletions
| @@ -5,5 +5,6 @@ TODO: maybe add mincore support? available on at leats darwin, solaris, linux, f  1.0  	- added msync, mtouch support (untested).          - fixed custom support. +        - use a more robust feed-add detection method.  	- "outbundled" from IO::AIO. @@ -606,12 +606,12 @@ static void grp_try_feed (eio_req *grp)  {    while (grp->size < grp->int2 && !EIO_CANCELLED (grp))      { -      int old_len = grp->size; +      grp->flags &= ~EIO_FLAG_GROUPADD;        EIO_FEED (grp);        /* stop if no progress has been made */ -      if (old_len == grp->size) +      if (!(grp->flags & EIO_FLAG_GROUPADD))          {            grp->feed = 0;            break; @@ -1483,6 +1483,8 @@ void eio_grp_add (eio_req *grp, eio_req *req)  {    assert (("cannot add requests to IO::AIO::GRP after the group finished", grp->int1 != 2)); +  grp->flags |= EIO_FLAG_GROUPADD; +    ++grp->size;    req->grp = grp; @@ -112,10 +112,12 @@ struct eio_req    eio_req *grp, *grp_prev, *grp_next, *grp_first; /* private */  }; +/* _private_ flags */  enum {    EIO_FLAG_CANCELLED = 0x01, /* request was cancelled */    EIO_FLAG_PTR1_FREE = 0x02, /* need to free(ptr1) */ -  EIO_FLAG_PTR2_FREE = 0x04  /* need to free(ptr2) */ +  EIO_FLAG_PTR2_FREE = 0x04, /* need to free(ptr2) */ +  EIO_FLAG_GROUPADD  = 0x08  /* some request was added to the group */  };  enum { | 
