Hi Roger,

On 22/02/2024 09:05, Roger Pau Monne wrote:
The usage of a cmpxchg loop in get_next_handle() is unnecessary, as the same
can be achieved with an atomic increment, which is both simpler to read, and
avoid any need for a loop.

The cmpxchg usage is likely a remnant of 32bit support, which didn't have an
instruction to do an atomic 64bit add, and instead a cmpxchg had to be used.

Suggested-by: Andrew Cooper <andrew.coop...@citrix.com>
Signed-of-by: Roger Pau Monné <roger....@citrix.com>
Reviewed-by: Julien Grall <jgr...@amazon.com>

Cheers,

--
Julien Grall

Reply via email to