citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit 8068eefe3c785d2deda1b131ed708d3dfe7534f2
parent 005b0768c37e2ab7f456eb0423db8375953f33a9
Author: Kyle Milz <kyle@0x30.net>
Date:   Wed, 15 Jun 2016 20:52:16 -0600

lib: make runtime functions static

Diffstat:
Mlib/runtime.c | 19++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/lib/runtime.c b/lib/runtime.c @@ -18,17 +18,18 @@ extern struct citrun_node *citrun_nodes[]; extern uint64_t citrun_nodes_total; -void send_metadata(int); -void send_execution_data(int); /* Make sure instrumented programs rely on this library in some way. */ int needs_to_link_against_libcitrun; -int xread(int d, const void *buf, size_t bytes_total); -int xwrite(int d, const void *buf, size_t bytes_total); +static void send_metadata(int); +static void send_execution_data(int); + +static int xread(int d, const void *buf, size_t bytes_total); +static int xwrite(int d, const void *buf, size_t bytes_total); /* Sets up connection to the server socket and drops into an io loop. */ -void * +static void * control_thread(void *arg) { struct sockaddr_un addr; @@ -68,7 +69,7 @@ control_thread(void *arg) } /* Walk the node array and send all of the static metadata information. */ -void +static void send_metadata(int fd) { struct citrun_node walk; @@ -111,7 +112,7 @@ send_metadata(int fd) * For each link in the instrumented translation unit chain send the contents * of that links execution buffers. */ -void +static void send_execution_data(int fd) { struct citrun_node walk; @@ -125,7 +126,7 @@ send_execution_data(int fd) } } -int +static int xwrite(int d, const void *buf, size_t bytes_total) { int bytes_left = bytes_total; @@ -145,7 +146,7 @@ xwrite(int d, const void *buf, size_t bytes_total) return bytes_wrote; } -int +static int xread(int d, const void *buf, size_t bytes_total) { ssize_t bytes_left = bytes_total;