Hello!
On Fri, Sep 16, 2016 at 02:43:49PM -0700, Piotr Sikora wrote:
> Hey Maxim,
>
> > The "*(lock) == 0" check here is just an optimization, it only
> > ensures that the lock is likely to succed.
>
> Yes, and use of the ngx_atomic_load() doesn't affect that.
>
> Namely, in the
Hey Maxim,
> The "*(lock) == 0" check here is just an optimization, it only
> ensures that the lock is likely to succed.
Yes, and use of the ngx_atomic_load() doesn't affect that.
Namely, in the micro-benchmarks I did (heavy contention - 100 threads
trying to acquire lock, update value, release
Hello!
On Wed, Aug 17, 2016 at 05:29:32PM -0700, Piotr Sikora wrote:
> # HG changeset patch
> # User Piotr Sikora
> # Date 1471265532 25200
> # Mon Aug 15 05:52:12 2016 -0700
> # Node ID 40765d8ee4dd29089b0e60ed5b6099ac624e804e
> # Parent
# HG changeset patch
# User Piotr Sikora
# Date 1471265532 25200
# Mon Aug 15 05:52:12 2016 -0700
# Node ID 40765d8ee4dd29089b0e60ed5b6099ac624e804e
# Parent 2f2ec92c3af93c11e195fb6d805df57518fede7c
Core: add ngx_atomic_store() and ngx_atomic_load().
Those functions