[Bug translator/22312] bpf: global variable locking

me at serhei dot io sourceware-bugzilla@sourceware.org
Thu Jul 12 19:57:00 GMT 2018


https://sourceware.org/bugzilla/show_bug.cgi?id=22312

Serhei Makarov <me at serhei dot io> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |me at serhei dot io

--- Comment #2 from Serhei Makarov <me at serhei dot io> ---
https://sourceware.org/ml/systemtap/2018-q3/msg00017.html describes one
possible way of doing this:

BPF_XADD(&lock_counter, 1);
value = read(lock_counter);
if (value <= 1) { ... execute probe ... } else skip probe
BPF_XADD(&lock_counter, -1);

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Systemtap mailing list