From 01c165cd1b2ac601d5ae73d3cb5e82ccdd94ac94 Mon Sep 17 00:00:00 2001 From: Le Chi Thu Date: Tue, 3 Apr 2012 01:23:00 +0200 Subject: Initial commit --- ltp_framework/include/libtestsuite.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 ltp_framework/include/libtestsuite.h (limited to 'ltp_framework/include/libtestsuite.h') diff --git a/ltp_framework/include/libtestsuite.h b/ltp_framework/include/libtestsuite.h new file mode 100644 index 0000000..0668961 --- /dev/null +++ b/ltp_framework/include/libtestsuite.h @@ -0,0 +1,20 @@ +/* The following functions are used to synchronize father and sons processes. + * + * create_sync_pipes: create pipes used for the synchronization. Must be done + * by father process before a fork. + * + * wait_son_startup: wait a son process to reach the "notify_startup" function. + * + * notify_startup: notify the father process a son has started its execution. + */ +#include +#include +#include + +/* fifo_name is used to create named pipe. NULL means anonymous pipe. */ +#define PIPE_NAME NULL +int sync_pipe_create( int fd[], const char *pipe_name); +int sync_pipe_close(int fd[], const char *pipe_name); +int sync_pipe_wait( int fd[]); +int sync_pipe_notify( int fd[]); + -- cgit v1.2.3