343 if(!asr->read_complete) { |
343 if(!asr->read_complete) { |
344 // write completed => new asynchronous read |
344 // write completed => new asynchronous read |
345 asr->aio->offset += asr->aio->result; |
345 asr->aio->offset += asr->aio->result; |
346 size_t length = asr->end - asr->offset; |
346 size_t length = asr->end - asr->offset; |
347 asr->aio->nbytes = AIO_BUF_SIZE < length ? AIO_BUF_SIZE : length; |
347 asr->aio->nbytes = AIO_BUF_SIZE < length ? AIO_BUF_SIZE : length; |
|
348 asr->read_inprogress = TRUE; |
348 if(system_aio_read(asr->aio)) { |
349 if(system_aio_read(asr->aio)) { |
349 asr->error = TRUE; |
350 asr->error = TRUE; |
350 return 1; |
351 return 1; |
351 } |
352 } |
352 } |
353 } |