tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Proposal for new syscalls: getrusagex and waitx



Hi,
On Oct,Wednesday 29 2008, at 12:19 AM, David Laight wrote:

On Sat, Oct 18, 2008 at 06:10:23PM +0000, David Holland wrote:
On Thu, Oct 16, 2008 at 10:09:39PM -0700, Matt Thomas wrote:
I'd to add return some additional data in getrusage or wait4. Extending struct rusage seems to be a losing proposition since I will need to version the syscalls and provide compatiblity shims. I might as well just add
variants that return proplib dictionaries with the information.

int getrusagex(int who, struct plistref *dict)
int waitx(pid_t wpid, int *status, int options, struct plistref *rusage);

What is a 'struct plistref' ?
If it contains pointers to other user-space structures it will be a PITA
for the kernel to process.
If the kernel has to write into it how does it know how much space there is?
If the kernel has to modify a complex structure that the app partially
initialises it a a PITA for both the kernel and app.


It is structure which contains in userspace allocated buffer with externalized proplib data and size of this buffer. Kernel know how to copyin/copyout this structure. There are proplib functions for that see prop_send_ioctl(3) and prop_copyin_ioctl(9).


Regards

Adam.



Home | Main Index | Thread Index | Old Index