Ignore:
Timestamp:
09/15/08 20:29:27 (13 years ago)
Author:
certainty
Message:

parameterize the chunksize.
prepare c-impl of sendfile so that we can distinguish errors from
waits for io so that we can yield control to other threads.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/3/sendfile/trunk/sendfile-implementation.c

    r10723 r11953  
    3535  res = sendfile(dst,src,&curoffset,to_send);
    3636 
    37   if(res == -1 && (errno != EAGAIN &&  errno != EINTR))
     37        if(res < 0){
     38                if(errno == EAGAIN || errno == EINTR)
     39      return -2;
    3840    return -1;
    39  
     41        } 
    4042 
    4143#ifdef HAVE_POSIX_FADVISE
     
    6163
    6264  if(sendfile(src,dst,offset,to_send,NULL,&res,0) < 0){
    63     if(errno != EAGAIN)
    64       return -1;
     65    if(errno == EAGAIN)
     66      return -2;
     67    return -1;
    6568  }
    6669
Note: See TracChangeset for help on using the changeset viewer.