Fwiw posix specifies readv and writev already; you may want to take a look at those.
It's not really the same, though; readv and writev are still synchronous APIs, they just do more at once.
I'm aware of readv/writev. This was supposed to cover much more, because it is with arbitrary syscalls. Open a file and if successful read from it - all with a single syscall. Another example: socket, setsockopt, bind, listen, accept in a single syscall.
My idea was to have a syscall like this:
You were supposed to give in a batchvec a sequence of system call numbers and a little mapping to arguments you provided in args. batchv_argmask is a long long - 64 bit type, this mask is divided to 4 bit fields, every field can address a long from args table. AFAIR Linux syscalls have up to 6 arguments. 6 fields for arguments and one for return value, that gives 7 fields - 28 bits and now I don't remember why I thought I need a long long.It would go like this pseudo code:
It would return a number of successfully run syscalls. It would stop on first failed one. The user would have to pick up the error code out of args table.I would be interested to know why it wouldn't work.
I started implementing it against Linux 4.15.12, but never went to test it. I have some code, but I don't believe it is my last version of the attempt.