This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/22312] bpf: global variable locking
- From: "me at serhei dot io" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Thu, 12 Jul 2018 19:57:34 +0000
- Subject: [Bug translator/22312] bpf: global variable locking
- Auto-submitted: auto-generated
- References: <bug-22312-6586@http.sourceware.org/bugzilla/>
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.