HFI1: use local write if private data is present; fix lenght alignment

This commit is contained in:
Balazs Gerofi
2017-08-17 11:40:09 +09:00
parent 39deff4e10
commit 60f6862db2
2 changed files with 7 additions and 4 deletions

View File

@ -3096,9 +3096,12 @@ SYSCALL_DECLARE(writev)
struct iovec *iovec = (struct iovec *)ihk_mc_syscall_arg1(ctx);
int iovcnt = ihk_mc_syscall_arg2(ctx);
void *private_data = proc->fd_priv_table[fd];
//if (private_data) hfi1_aio_write(private_data, iovec, iovcnt);
//return 1;
return syscall_generic_forwarding(__NR_writev, ctx);
if (private_data) {
return hfi1_aio_write(private_data, iovec, iovcnt);
}
else {
return syscall_generic_forwarding(__NR_writev, ctx);
}
}
SYSCALL_DECLARE(read)