diff options
author | David Smith <dsmith@redhat.com> | 2008-09-25 16:13:34 -0500 |
---|---|---|
committer | David Smith <dsmith@redhat.com> | 2008-09-25 16:14:02 -0500 |
commit | d107fe8044105a30f176d513ae36b91ff82cae9d (patch) | |
tree | 60878dd8dfc7af844ab433b44fb55efc58548ec0 /runtime/utrace_compatibility.h | |
parent | 25a632047a89804ffbfe6bb012af632ad4e6bdc1 (diff) | |
download | systemtap-steved-d107fe8044105a30f176d513ae36b91ff82cae9d.tar.gz systemtap-steved-d107fe8044105a30f176d513ae36b91ff82cae9d.tar.xz systemtap-steved-d107fe8044105a30f176d513ae36b91ff82cae9d.zip |
New utrace fixes.
2008-09-25 David Smith <dsmith@redhat.com>
* task_finder.c (__stp_utrace_attach): Added action flag to know
to request the thread to be stopped or not.
(stap_utrace_attach): Now just calls __stp_utrace_attach().
(__stp_utrace_task_finder_target_quiesce): Handles
utrace_set_events() errors properly.
* utrace_compatibility.h (enum utrace_resume_action): Added
utrace_resume_action enum.
(utrace_control): Added UTRACE_STOP support.
(utrace_engine_put): New.
(utrace_barrier): New.
Diffstat (limited to 'runtime/utrace_compatibility.h')
-rw-r--r-- | runtime/utrace_compatibility.h | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/runtime/utrace_compatibility.h b/runtime/utrace_compatibility.h index 80037015..27fca250 100644 --- a/runtime/utrace_compatibility.h +++ b/runtime/utrace_compatibility.h @@ -24,9 +24,11 @@ #define UTRACE_ORIG_VERSION -#define UTRACE_RESUME UTRACE_ACTION_RESUME -#define UTRACE_DETACH UTRACE_ACTION_DETACH -#define UTRACE_STOP UTRACE_ACTION_QUIESCE +enum utrace_resume_action { + UTRACE_STOP = UTRACE_ACTION_QUIESCE, + UTRACE_RESUME = UTRACE_ACTION_RESUME, + UTRACE_DETACH = UTRACE_ACTION_DETACH, +}; static inline struct utrace_attached_engine * utrace_attach_task(struct task_struct *target, int flags, @@ -38,11 +40,17 @@ utrace_attach_task(struct task_struct *target, int flags, static inline int __must_check utrace_control(struct task_struct *target, struct utrace_attached_engine *engine, - unsigned long action) + enum utrace_resume_action action) { - if (action == UTRACE_DETACH) + switch (action) { + case UTRACE_DETACH: return utrace_detach(target, engine); - return -EINVAL; + case UTRACE_STOP: + return utrace_set_flags(target, engine, + (engine->flags | UTRACE_ACTION_QUIESCE)); + default: + return -EINVAL; + } } static inline int __must_check @@ -52,6 +60,19 @@ utrace_set_events(struct task_struct *target, { return utrace_set_flags(target, engine, eventmask); } + +static inline void +utrace_engine_put(struct utrace_attached_engine *engine) +{ + return; +} + +static inline int __must_check +utrace_barrier(struct task_struct *target, + struct utrace_attached_engine *engine) +{ + return 0; +} #endif #endif /* _UTRACE_COMPATIBILITY_H_ */ |