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)
Wed, Dec 18, 4:10 AM
Unknown Object (File)
Wed, Dec 18, 3:22 AM
Unknown Object (File)
Nov 22 2024, 3:45 PM
Unknown Object (File)
Nov 22 2024, 9:42 AM
Unknown Object (File)
Nov 18 2024, 12:59 AM
Unknown Object (File)
Nov 17 2024, 12:27 PM
Unknown Object (File)
Nov 16 2024, 1:24 PM
Unknown Object (File)
Nov 16 2024, 12:08 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
No Lint Coverage
Unit
No Test Coverage

Event Timeline

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

const struct rusage *ru? Same below.

sys/i386/linux/linux.h
744

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

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

This revision was automatically updated to reflect the committed changes.