summaryrefslogtreecommitdiffstats
path: root/tapset-procfs.cxx
diff options
context:
space:
mode:
authorDavid Smith <dsmith@redhat.com>2010-03-01 15:17:09 -0600
committerDavid Smith <dsmith@redhat.com>2010-03-01 15:17:09 -0600
commitbfbbb76e5d0294cc1d44f42ab6c2d91149067b6c (patch)
tree24bba7fe93496f46cdaa558040c8c3433c4d6510 /tapset-procfs.cxx
parent6861e05642c23c569ef34d49bfa3fe83e2badc11 (diff)
downloadsystemtap-steved-bfbbb76e5d0294cc1d44f42ab6c2d91149067b6c.tar.gz
systemtap-steved-bfbbb76e5d0294cc1d44f42ab6c2d91149067b6c.tar.xz
systemtap-steved-bfbbb76e5d0294cc1d44f42ab6c2d91149067b6c.zip
Fixed PR 11336 by using a wait queue to wait on procfs file availability.
* runtime/procfs-probes.c: Removed old kernel 2.6.16 code. Simplified _spp_lock macros. (_stp_proc_open_file): If file is busy, use a wait queue to wait on it being available. (_stp_proc_release_file): Decrease open count. * tapset-procfs.cxx (emit_module_init): Updated procfs probe initialization/shutdown routine names. (emit_module_exit): Ditto.
Diffstat (limited to 'tapset-procfs.cxx')
-rw-r--r--tapset-procfs.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/tapset-procfs.cxx b/tapset-procfs.cxx
index aea01a7a..c888ff74 100644
--- a/tapset-procfs.cxx
+++ b/tapset-procfs.cxx
@@ -373,7 +373,7 @@ procfs_derived_probe_group::emit_module_init (systemtap_session& s)
s.op->newline(1) << "probe_point = spp->write_pp;";
s.op->indent(-1);
- s.op->newline() << "_spp_lock_init(spp);";
+ s.op->newline() << "_spp_init(spp);";
s.op->newline() << "rc = _stp_create_procfs(spp->path, i, &_stp_proc_fops);";
s.op->newline() << "if (rc) {";
@@ -381,7 +381,7 @@ procfs_derived_probe_group::emit_module_init (systemtap_session& s)
s.op->newline() << "for (i = 0; i < " << probes_by_path.size() << "; i++) {";
s.op->newline(1) << "spp = &stap_procfs_probes[i];";
- s.op->newline() << "_spp_lock_shutdown(spp);";
+ s.op->newline() << "_spp_shutdown(spp);";
s.op->newline(-1) << "}";
s.op->newline() << "break;";
s.op->newline(-1) << "}";
@@ -400,7 +400,7 @@ procfs_derived_probe_group::emit_module_exit (systemtap_session& s)
s.op->newline() << "_stp_close_procfs();";
s.op->newline() << "for (i = 0; i < " << probes_by_path.size() << "; i++) {";
s.op->newline(1) << "struct stap_procfs_probe *spp = &stap_procfs_probes[i];";
- s.op->newline() << "_spp_lock_shutdown(spp);";
+ s.op->newline() << "_spp_shutdown(spp);";
s.op->newline(-1) << "}";
}