summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authorRoland Grunberg <rgrunber@redhat.com>2009-11-06 14:09:06 -0500
committerRoland Grunberg <rgrunber@redhat.com>2009-11-06 14:09:06 -0500
commit079915a57182ed3e5981190ccf8216c674aa4406 (patch)
tree50f5da998baded364e7908236a6ce9a18106ddaf /tapsets.cxx
parent4be13c03169ded00a0a6b0e7e7ce8d008aaa51d0 (diff)
downloadsystemtap-steved-079915a57182ed3e5981190ccf8216c674aa4406.tar.gz
systemtap-steved-079915a57182ed3e5981190ccf8216c674aa4406.tar.xz
systemtap-steved-079915a57182ed3e5981190ccf8216c674aa4406.zip
PR10849: Support MAXSKIPPED handling on RHEL4 through implementation of atomic_cmpxchg
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index 17e315e9..21704f69 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -228,7 +228,7 @@ common_probe_entryfn_epilogue (translator_output* o,
// Check for excessive skip counts.
o->newline() << "if (unlikely (atomic_read (& skipped_count) > MAXSKIPPED)) {";
- o->newline(1) << "if (unlikely (atomic_cmpxchg(& session_state, STAP_SESSION_RUNNING, STAP_SESSION_ERROR) == STAP_SESSION_RUNNING))";
+ o->newline(1) << "if (unlikely (pseudo_atomic_cmpxchg(& session_state, STAP_SESSION_RUNNING, STAP_SESSION_ERROR) == STAP_SESSION_RUNNING))";
o->newline() << "_stp_error (\"Skipped too many probes, check MAXSKIPPED or try again with stap -t for more details.\");";
o->newline(-1) << "}";
@@ -4640,7 +4640,7 @@ uprobe_derived_probe_group::emit_module_decls (systemtap_session& s)
s.op->newline() << "#endif";
// NB: duplicates common_entryfn_epilogue, but then this is not a probe entry fn epilogue.
s.op->newline() << "if (unlikely (atomic_inc_return (& skipped_count) > MAXSKIPPED)) {";
- s.op->newline(1) << "if (unlikely (atomic_cmpxchg(& session_state, STAP_SESSION_RUNNING, STAP_SESSION_ERROR) == STAP_SESSION_RUNNING))";
+ s.op->newline(1) << "if (unlikely (pseudo_atomic_cmpxchg(& session_state, STAP_SESSION_RUNNING, STAP_SESSION_ERROR) == STAP_SESSION_RUNNING))";
s.op->newline() << "_stp_error (\"Skipped too many probes, check MAXSKIPPED or try again with stap -t for more details.\");";
s.op->newline(-1) << "}";
s.op->newline(-1) << "}";