From: Pierre-Marc Fournier Date: Mon, 23 Feb 2009 20:13:04 +0000 (-0500) Subject: libmarkers: add locking X-Git-Tag: v0.1~276 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=0b5207fadc4fb80ba7aeb9a62f613a6b9a53619f;p=ust.git libmarkers: add locking --- diff --git a/libmarkers/marker.c b/libmarkers/marker.c index 33d63c0..2fa723d 100644 --- a/libmarkers/marker.c +++ b/libmarkers/marker.c @@ -1497,7 +1497,10 @@ int marker_register_lib(struct marker *markers_start, int markers_count) pl->markers_start = markers_start; pl->markers_count = markers_count; + /* FIXME: maybe protect this with its own mutex? */ + lock_markers(); list_add(&pl->list, &libs); + unlock_markers(); new_markers(markers_start, markers_start + markers_count); @@ -1509,6 +1512,14 @@ int marker_register_lib(struct marker *markers_start, int markers_count) return 0; } +int marker_unregister_lib(struct marker *markers_start, int markers_count) +{ + /*FIXME: implement; but before implementing, marker_register_lib must + have appropriate locking. */ + + return 0; +} + static int initialized = 0; void __attribute__((constructor)) init_markers(void)