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




On Oct 28, 2008, at 4:19 PM, 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's already used by ioctls for plists. Basically the kernel allocates VM and puts the dictionary in it returning the location and size. User code is responsible
munmap it after its done with it.



Home | Main Index | Thread Index | Old Index