Page MenuHomeFreeBSD

Linuxulator. struct rusage conversion (0).
ClosedPublic

Authored by dchagin on Mar 25 2015, 4:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jan 18, 9:35 AM
Unknown Object (File)
Sat, Jan 18, 4:37 AM
Unknown Object (File)
Mon, Jan 13, 5:10 PM
Unknown Object (File)
Sat, Jan 11, 12:28 PM
Unknown Object (File)
Wed, Jan 8, 5:09 PM
Unknown Object (File)
Dec 30 2024, 10:44 AM
Unknown Object (File)
Dec 26 2024, 1:05 AM
Unknown Object (File)
Dec 25 2024, 5:14 PM
Subscribers

Details

Summary

To reduce code duplication introduce linux_copyout_rusage method. Use it in linux_wait4() system call and move linux_wait4() to the MI path. While here add a prototype for the static bsd_to_linux_rusage().

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dchagin retitled this revision from to Linuxulator. struct rusage conversion (0)..
dchagin updated this object.
sys/amd64/linux32/linux.h
783 ↗(On Diff #4403)

const struct rusage *ru? Same below.

sys/i386/linux/linux.h
744 ↗(On Diff #4403)

Is this because the Linux struct rusage is exactly the same as the FreeBSD one for i386?
If so, a comment that says it would be nice.

(To be honest I'd prefer l_rusage being defined for both architectures and bsd_to_linux_rusage() simply do a copy, but it's just nitpicking; current way works too.)

sys/amd64/linux32/linux32_machdep.c
923 ↗(On Diff #4403)

Could this now be moved to common code, eg linux/linux_misc.c?

This revision was automatically updated to reflect the committed changes.