version 1.10.2.6, 2012/08/02 09:19:31
|
version 1.10.2.7, 2012/08/02 11:37:08
|
Line 649 schedAIOWrite(sched_root_task_t * __restrict root, sch
|
Line 649 schedAIOWrite(sched_root_task_t * __restrict root, sch
|
* @fd = file descriptor |
* @fd = file descriptor |
* @bufs = Buffer's list |
* @bufs = Buffer's list |
* @nbufs = Number of Buffers |
* @nbufs = Number of Buffers |
|
* @offset = Offset from start of file, if =-1 from current position |
* return: NULL error or !=NULL new queued task |
* return: NULL error or !=NULL new queued task |
*/ |
*/ |
inline sched_task_t * | sched_task_t * |
schedLIORead(sched_root_task_t * __restrict root, sched_task_func_t func, void *arg, int fd, |
schedLIORead(sched_root_task_t * __restrict root, sched_task_func_t func, void *arg, int fd, |
struct iovec *bufs, size_t nbufs) | struct iovec *bufs, size_t nbufs, off_t offset) |
{ |
{ |
struct sigevent sig; |
struct sigevent sig; |
struct aiocb **acb; |
struct aiocb **acb; |
Line 663 schedLIORead(sched_root_task_t * __restrict root, sche
|
Line 664 schedLIORead(sched_root_task_t * __restrict root, sche
|
if (!root || !func || !bufs || !nbufs) |
if (!root || !func || !bufs || !nbufs) |
return NULL; |
return NULL; |
|
|
off = lseek(fd, 0, SEEK_CUR); | if (offset == (off_t) -1) { |
if (off == -1) { | off = lseek(fd, 0, SEEK_CUR); |
LOGERR; | if (off == -1) { |
return NULL; | LOGERR; |
} | return NULL; |
| } |
| } else |
| off = offset; |
|
|
if (!(acb = calloc(sizeof(void*), nbufs))) { |
if (!(acb = calloc(sizeof(void*), nbufs))) { |
LOGERR; |
LOGERR; |
Line 713 schedLIORead(sched_root_task_t * __restrict root, sche
|
Line 717 schedLIORead(sched_root_task_t * __restrict root, sche
|
* @fd = file descriptor |
* @fd = file descriptor |
* @bufs = Buffer's list |
* @bufs = Buffer's list |
* @nbufs = Number of Buffers |
* @nbufs = Number of Buffers |
|
* @offset = Offset from start of file, if =-1 from current position |
* return: NULL error or !=NULL new queued task |
* return: NULL error or !=NULL new queued task |
*/ |
*/ |
inline sched_task_t * |
inline sched_task_t * |
schedLIOWrite(sched_root_task_t * __restrict root, sched_task_func_t func, void *arg, int fd, |
schedLIOWrite(sched_root_task_t * __restrict root, sched_task_func_t func, void *arg, int fd, |
struct iovec *bufs, size_t nbufs) | struct iovec *bufs, size_t nbufs, off_t offset) |
{ |
{ |
struct sigevent sig; |
struct sigevent sig; |
struct aiocb **acb; |
struct aiocb **acb; |
Line 727 schedLIOWrite(sched_root_task_t * __restrict root, sch
|
Line 732 schedLIOWrite(sched_root_task_t * __restrict root, sch
|
if (!root || !func || !bufs || !nbufs) |
if (!root || !func || !bufs || !nbufs) |
return NULL; |
return NULL; |
|
|
off = lseek(fd, 0, SEEK_CUR); | if (offset == (off_t) -1) { |
if (off == -1) { | off = lseek(fd, 0, SEEK_CUR); |
LOGERR; | if (off == -1) { |
return NULL; | LOGERR; |
} | return NULL; |
| } |
| } else |
| off = offset; |
|
|
if (!(acb = calloc(sizeof(void*), nbufs))) { |
if (!(acb = calloc(sizeof(void*), nbufs))) { |
LOGERR; |
LOGERR; |