26 Nov
2013
26 Nov
'13
11:41 a.m.
On 26 Nov 2013, at 13:55, Alan DeKok <aland@deployingradius.com> wrote:
George Chelidze wrote:
Feeling stupid to ask this, but shouldn't you use some kind of locking while reading/writing data->last_clear? Do you rely on atomicity of int?
Writes to "int" are atomic. Even if they're not, there's minimal cost to doing the "clear" 2-3 times.
A write to uint32_t on a 16bit system wouldn't be atomic, as a write to a uint64_t on a 32bit system wouldn't be atomic. But somehow I don't think this will be an issue on production systems. Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team