Re: sync_set_bit() vs set_bit() -- what's the difference?
From: Jürgen Groß
Date: Wed Aug 27 2014 - 03:38:34 EST
On 08/27/2014 09:30 AM, Dexuan Cui wrote:
I'm curious about the difference. :-)
sync_set_bit() is only used in drivers/hv/ and drivers/xen/ while set_bit() is used in all other places. What makes hv/xen special?
In set_bit() the "lock" prefix will be dropped if only one processor is
present. sync_set_bit() is always attributed with "lock".
xen and hv might require "lock" semantics even if the current OS is
running on only one processor, as syncing with other processors running
other OS's might be necessary.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/