]> sourceware.org Git - systemtap.git/commit
PR17232 take #3: mutex the control messages
authorFrank Ch. Eigler <fche@redhat.com>
Sun, 10 Aug 2014 01:31:34 +0000 (21:31 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Sun, 10 Aug 2014 23:18:24 +0000 (19:18 -0400)
commit440c8ee0eb0198d7c871c842eafcefe65b096b75
tree0597f46cd544b6bc0cf02de113c5c859dd736376
parentb6c60d31f5fa2742915b3f4b7d3d6f5ee6f329e6
PR17232 take #3: mutex the control messages

As per jistone's advice, simplify control message control by imposing
a mutex over the whole receive-side handling of a ctl message.  That
precludes concurrent or reentrant messages (independent of /ctl
open-time limits or threading assumptions).  It lets the start and
exit handling functions keep track with fewer state variables.

In a way, this elaborates upon a reversion of commit #262f7598.

* runtime/transport/control.c (_stp_ctl_write_cmd): Use a new static
  cmd_mutex for ctl message handling.  Don't bother with counters and
  flags for startedness etc; let the lower level functions handle
  that.  Handle error exits via goto out instead of return to assure
  mutex unlocks.
* runtime/transport/transport.c (_stp_handle_start,
  _stp_cleanup_and_exit): Drop the stp_transport_mutex control,
  explain why unnecessary.  Be more paranoid during module-notifier
  cleanup.
runtime/transport/control.c
runtime/transport/transport.c
This page took 0.025406 seconds and 5 git commands to generate.