X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;ds=sidebyside;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2Fgui%2Flttvwindow%2Flttvwindow%2Flttvwindowtraces.h;h=68fbc92108480cf6aeab122adf4b9694ca9230d3;hb=b052368a0d53ff62ed9110fbafdb857a2b034ca8;hp=20ea0c43f599279495224963cc8e655c6f0ae7d8;hpb=51705146eabfc882972ca6bc815dc78addcee896;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindowtraces.h b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindowtraces.h index 20ea0c43..68fbc921 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindowtraces.h +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindowtraces.h @@ -47,7 +47,8 @@ extern LttvTraceInfo LTTV_TRACES, LTTV_HOOK_ADDER, LTTV_HOOK_REMOVER, LTTV_IN_PROGRESS, - LTTV_READY; + LTTV_READY, + LTTV_LOCK; @@ -231,4 +232,30 @@ void lttvwindowtraces_unregister_computation_hooks void lttvwindowtraces_unregister_requests(LttvAttributeName module_name); +/** + * Lock a trace so no other instance can use it. + * + * @param trace The trace to lock. + * @return 0 on success, -1 if cannot get lock. + */ +gint lttvwindowtraces_lock(LttvTrace *trace); + + +/** + * Unlock a trace. + * + * @param trace The trace to unlock. + * @return 0 on success, -1 if cannot unlock (not locked ?). + */ +gint lttvwindowtraces_unlock(LttvTrace *trace); + +/** + * Verify if a trace is locked. + * + * @param trace The trace to verify. + * @return TRUE if locked, FALSE is unlocked. + */ +gint lttvwindowtraces_get_lock_state(LttvTrace *trace); + + #endif //LTTVWINDOWTRACES_H