qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] linux-user: Simplify timerid checks on g_pos


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH v2] linux-user: Simplify timerid checks on g_posix_timers range
Date: Fri, 22 Aug 2014 15:27:48 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0

Hi,

Am 22.08.2014 14:09, schrieb Laurent Vivier:
> as in the kernel timer_t is an "int" (as said PMM), you should cast to
> "int" to remove garbage on 64bit hosts and check sign ...

So maybe that's the bug Alex was trying to fix downstream with the use
of unsigned types? If as you say the upper 32 bits may be garbage, then
casting from long to int would put garbage into bit 31 unless you cast
to unsigned long first. Maybe we need cast macros to fix that?
TARGET_TIMER_T() or something?

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]