|
From: | Richard Henderson |
Subject: | Re: [Qemu-devel] [PATCH v2 14/45] tcg: define CF_PARALLEL and use it for TB hashing |
Date: | Mon, 17 Jul 2017 13:46:25 -1000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 07/16/2017 10:03 AM, Emilio G. Cota wrote:
+/* mask cflags for hashing/comparison */ +static inline uint32_t mask_cf(uint32_t cflags) +{ + uint32_t mask = 0; + + mask |= CF_PARALLEL; + return cflags & mask; +}
Surely we don't need a function for this, just a define near all the other CF_ definitions.
+ +/* current cflags, masked for hashing/comparison */ +static inline uint32_t curr_cf_mask(void) +{ + uint32_t val = 0; + + if (parallel_cpus) { + val |= CF_PARALLEL; + } + return val; +}
Better as curr_cflags? What's the "mask" part of this? Also, let's write this more directly, e.g. return parallel_cpus ? CF_PARALLEL : 0; until we have something more to put here. r~
[Prev in Thread] | Current Thread | [Next in Thread] |