linux-user: rlimit conversion between host and target.
commit81bbe906c89b6b7af58a1eeb96ec5a0bfdc3386f
authortakasi-y@ops.dti.ne.jp <takasi-y@ops.dti.ne.jp>
Sun, 11 Apr 2010 19:07:35 +0000 (12 04:07 +0900)
committerAurelien Jarno <aurelien@aurel32.net>
Tue, 18 May 2010 17:30:10 +0000 (18 19:30 +0200)
treee38bc6a84bd2966bed3ee6d1f8318f02f8c6a8fd
parentc69ea0dff27ccc6663f8ecb4a70f762f4559672c
linux-user: rlimit conversion between host and target.

rlim_t conversion between host and target added.
Otherwise there are some incorrect case like
- RLIM_INFINITY on 32bit target -> 64bit host.
- RLIM_INFINITY on 64bit host -> mips and sparc target ?
- Big value(for 32bit target) on 64bit host -> 32bit target.

One is added into getrlimit, setrlimit, and ugetrlimit. It converts both
RLIM_INFINITY and value bigger than target can hold(>31bit) to RLIM_INFINITY.

Another one is added to guest_stack_size calculation introduced by
703e0e89. The rule is mostly same except the result on the case is keeping
the value of guest_stack_size.

Slightly tested for SH4, and x86_64 -linux-user on x86_64-pc-linux host.

Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp>
Acked-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
linux-user/main.c
linux-user/syscall.c
linux-user/syscall_defs.h