Signed-off-by: Angus Salkeld <asalkeld(a)redhat.com>
---
tests/Makefile.am | 14 +++
tests/bmc.c | 153 +++++++++++++++++++++++++++
tests/bmcpt.c | 192 ++++++++++++++++++++++++++++++++++
tests/bms.c | 298 +++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 657 insertions(+), 0 deletions(-)
create mode 100644 tests/bmc.c
create mode 100644 tests/bmcpt.c
create mode 100644 tests/bms.c
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 98fa6cf..91e42e4 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -28,6 +28,20 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
+noinst_PROGRAMS = bmc bmcpt bms
+
+bmc_SOURCES = bmc.c
+bmc_CFLAGS = -I$(top_srcdir)/include
+bmc_LDADD = -lrt $(top_builddir)/lib/libqbipcc.la $(top_builddir)/lib/libqbpoll.la
+
+bmcpt_SOURCES = bmcpt.c
+bmcpt_CFLAGS = -I$(top_srcdir)/include
+bmcpt_LDADD = -lrt $(top_builddir)/lib/libqbipcc.la $(top_builddir)/lib/libqbpoll.la
+
+bms_SOURCES = bms.c
+bms_CFLAGS = -I$(top_srcdir)/include
+bms_LDADD = -lrt $(top_builddir)/lib/libqbipcs.la $(top_builddir)/lib/libqbpoll.la
+
if HAVE_CHECK
TESTS = check_hash check_plugin
diff --git a/tests/bmc.c b/tests/bmc.c
new file mode 100644
index 0000000..d518e98
--- /dev/null
+++ b/tests/bmc.c
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 2009 Red Hat, Inc.
+ *
+ * All rights reserved.
+ *
+ * Author: Steven Dake (sdake(a)redhat.com)
+ *
+ * This software licensed under BSD license, the text of which follows:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * - Neither the name of the MontaVista Software, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <qb/qbipcc.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <string.h>
+#include <sys/time.h>
+#include <time.h>
+
+#define ITERATIONS 10000
+
+static struct timeval tv1, tv2, tv_elapsed;
+
+#define timersub(a, b, result) \
+do { \
+ (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
+ (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
+ if ((result)->tv_usec < 0) { \
+ --(result)->tv_sec; \
+ (result)->tv_usec += 1000000; \
+ } \
+} while (0)
+
+FILE *mbs_fp;
+
+FILE *ops_fp;
+
+static void bm_start (void)
+{
+ gettimeofday (&tv1, NULL);
+}
+
+static void bm_finish (const char *operation, int size)
+{
+ float ops_per_sec;
+ float mbs_per_sec;
+
+ gettimeofday (&tv2, NULL);
+ timersub (&tv2, &tv1, &tv_elapsed);
+
+ ops_per_sec =
+ ((float)ITERATIONS) / (((float)tv_elapsed.tv_sec) +
(((float)tv_elapsed.tv_usec) / 1000000.0));
+
+ mbs_per_sec =
+ ((((float)ITERATIONS) * size) / (((float)tv_elapsed.tv_sec) +
(((float)tv_elapsed.tv_usec) / 1000000.0))) / (1024.0*1024.0);
+
+
+ fprintf (ops_fp, "%d %9.3f\n", size, ops_per_sec);
+ fflush (ops_fp);
+ fprintf (mbs_fp, "%d %9.3f\n", size, mbs_per_sec);
+ fflush (mbs_fp);
+
+ printf ("write size %d OPs/sec %9.3f ", size, ops_per_sec);
+ printf ("MB/sec %9.3f\n", mbs_per_sec);
+}
+
+qb_hdb_handle_t bmc_ipc_handle;
+
+static void bmc_connect (void)
+{
+ unsigned int res;
+
+ res = qb_ipcc_service_connect ("qb_ipcs_bm",
+ 0,
+ 8192*128,
+ 8192*128,
+ 8192*128,
+ &bmc_ipc_handle);
+}
+
+static char buffer[1024*1024];
+static void bmc_send_nozc (unsigned int size)
+{
+ struct iovec iov[2];
+ qb_ipc_request_header_t req_header;
+ qb_ipc_response_header_t res_header;
+ int res;
+
+ req_header.id = 0;
+ req_header.size = sizeof (qb_ipc_request_header_t) + size;
+
+ iov[0].iov_base = &req_header;
+ iov[0].iov_len = sizeof (qb_ipc_request_header_t);
+ iov[1].iov_base = buffer;
+ iov[1].iov_len = size;
+
+repeat_send:
+ res = qb_ipcc_msg_send_reply_receive (
+ bmc_ipc_handle,
+ iov,
+ 2,
+ &res_header,
+ sizeof (qb_ipc_response_header_t));
+ if (res != 0) {
+ goto repeat_send;
+ }
+}
+
+qb_ipc_request_header_t *global_zcb_buffer;
+
+int main (void)
+{
+ int i, j;
+
+ bmc_connect();
+
+ ops_fp = fopen ("opsec", "w");
+ mbs_fp = fopen ("mbsec", "w");
+
+ for (j = 1; j < 499; j++) {
+ bm_start();
+ for (i = 0; i < ITERATIONS; i++) {
+ bmc_send_nozc (1000 * j);
+ }
+ bm_finish("send_nozc", 1000 * j);
+ }
+ return EXIT_SUCCESS;
+}
+
diff --git a/tests/bmcpt.c b/tests/bmcpt.c
new file mode 100644
index 0000000..850379f
--- /dev/null
+++ b/tests/bmcpt.c
@@ -0,0 +1,192 @@
+/*
+ * Copyright (c) 2009 Red Hat, Inc.
+ *
+ * All rights reserved.
+ *
+ * Author: Steven Dake (sdake(a)redhat.com)
+ *
+ * This software licensed under BSD license, the text of which follows:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * - Neither the name of the MontaVista Software, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <qb/qbipcc.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <string.h>
+#include <sys/time.h>
+#include <time.h>
+#include <signal.h>
+
+#define ITERATIONS 10000000
+
+struct bm_ctx {
+ qb_hdb_handle_t bmc_ipc_handle;
+ struct timeval tv1;
+ struct timeval tv2;
+ struct timeval tv_elapsed;
+ float mbs;
+ int multi;
+ unsigned int counter;
+};
+
+#define timersub(a, b, result) \
+do { \
+ (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
+ (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
+ if ((result)->tv_usec < 0) { \
+ --(result)->tv_sec; \
+ (result)->tv_usec += 1000000; \
+ } \
+} while (0)
+
+static void bm_start (struct bm_ctx *ctx)
+{
+ gettimeofday (&ctx->tv1, NULL);
+}
+static void bm_finish (struct bm_ctx *ctx, const char *operation, int size)
+{
+ float ops_per_sec;
+ float mbs_per_sec;
+
+ gettimeofday (&ctx->tv2, NULL);
+ timersub (&ctx->tv2, &ctx->tv1, &ctx->tv_elapsed);
+
+ ops_per_sec =
+ ((float)ctx->counter) / (((float)ctx->tv_elapsed.tv_sec) +
(((float)ctx->tv_elapsed.tv_usec) / 1000000.0));
+
+ mbs_per_sec =
+ ((((float)ctx->counter) * size) / (((float)ctx->tv_elapsed.tv_sec)
+ (((float)ctx->tv_elapsed.tv_usec) / 1000000.0))) / (1024.0*1024.0);
+
+
+ ctx->mbs = ops_per_sec;
+}
+
+static void bmc_connect (struct bm_ctx *ctx)
+{
+ unsigned int res;
+
+ res = qb_ipcc_service_connect ("qb_ipcs_bm",
+ 0,
+ 8192*128,
+ 8192*128,
+ 8192*128,
+ &ctx->bmc_ipc_handle);
+}
+
+static void bmc_disconnect (struct bm_ctx *ctx)
+{
+ qb_ipcc_service_disconnect (ctx->bmc_ipc_handle);
+}
+
+static char buffer[1024*1024];
+static void bmc_send_nozc (struct bm_ctx *ctx, unsigned int size)
+{
+ struct iovec iov[2];
+ qb_ipc_request_header_t req_header;
+ qb_ipc_response_header_t res_header;
+ int res;
+
+ req_header.id = 0;
+ req_header.size = sizeof (qb_ipc_request_header_t) + size;
+
+ iov[0].iov_base = &req_header;
+ iov[0].iov_len = sizeof (qb_ipc_request_header_t);
+ iov[1].iov_base = buffer;
+ iov[1].iov_len = size;
+
+repeat_send:
+ res = qb_ipcc_msg_send_reply_receive (
+ ctx->bmc_ipc_handle,
+ iov,
+ 2,
+ &res_header,
+ sizeof (qb_ipc_response_header_t));
+ if (res != 0) {
+ goto repeat_send;
+ }
+}
+
+unsigned int alarm_notice = 0;
+static void sigalrm_handler (int num)
+{
+ alarm_notice = 1;
+}
+
+static void *benchmark (void *ctx) {
+ struct bm_ctx *bm_ctx = (struct bm_ctx *)ctx;
+
+ bmc_connect(bm_ctx);
+
+ bm_start(bm_ctx);
+ for (;;) {
+ bm_ctx->counter++;
+ bmc_send_nozc (bm_ctx, 1000 * bm_ctx->multi);
+ if (alarm_notice) {
+ bm_finish (bm_ctx, "send_nozc", 1000 * bm_ctx->multi);
+ bmc_disconnect (bm_ctx);
+ return (NULL);
+ }
+ }
+}
+
+#define THREADS 4
+
+int main (void)
+{
+ struct bm_ctx bm_ctx[THREADS];
+ pthread_t threads[THREADS];
+ pthread_attr_t thread_attr[THREADS];
+ int i, j;
+ float total_mbs;
+ void *retval;
+
+
+ signal (SIGALRM, sigalrm_handler);
+ for (j = 0 ; j < 500; j++) {
+ alarm_notice = 0;
+ alarm (3);
+ for (i = 0; i < THREADS; i++) {
+ bm_ctx[i].multi = j + 100;
+ bm_ctx[i].counter = 0;
+ pthread_attr_init (&thread_attr[i]);
+
+ pthread_attr_setdetachstate (&thread_attr[i], PTHREAD_CREATE_JOINABLE);
+ pthread_create (&threads[i], &thread_attr[i], benchmark, &bm_ctx[i]);
+ }
+ for (i = 0; i < THREADS; i++) {
+ pthread_join (threads[i], &retval);
+ }
+ total_mbs = 0;
+ for (i = 0; i < THREADS; i++) {
+ total_mbs = total_mbs + bm_ctx[i].mbs;
+ }
+ printf ("%d ", 1000 * bm_ctx[0].multi);
+ printf ("%9.3f\n", total_mbs);
+ }
+ return EXIT_SUCCESS;
+}
diff --git a/tests/bms.c b/tests/bms.c
new file mode 100644
index 0000000..feb096a
--- /dev/null
+++ b/tests/bms.c
@@ -0,0 +1,298 @@
+/*
+ * Copyright (c) 2002-2006 MontaVista Software, Inc.
+ * Copyright (c) 2006-2009 Red Hat, Inc.
+ *
+ * All rights reserved.
+ *
+ * Author: Steven Dake (sdake(a)redhat.com)
+ *
+ * This software licensed under BSD license, the text of which follows:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * - Neither the name of the MontaVista Software, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <pthread.h>
+#include <assert.h>
+#include <sys/types.h>
+#include <sys/poll.h>
+#include <sys/uio.h>
+#include <sys/mman.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <signal.h>
+#include <sched.h>
+#include <time.h>
+#include <stdarg.h>
+#include <sched.h>
+
+#include <qb/qbpoll.h>
+#include <qb/qbipcs.h>
+
+static qb_hdb_handle_t bms_poll_handle;
+
+struct lib_handler {
+ void (*lib_handler_fn) (void *conn, const void *msg);
+};
+
+struct service_engine {
+ unsigned int private_data_size;
+ int (*lib_init_fn) (void *conn);
+ int (*lib_exit_fn) (void *conn);
+ struct lib_handler *lib_engine;
+};
+
+static void bms_benchmark_one_fn (void *conn, const void *msg)
+{
+ qb_ipc_response_header_t res;
+
+ qb_ipcs_response_send (conn, &res, sizeof (res));
+}
+
+int ii=0;
+static void bms_benchmark_two_fn (void *conn, const void *msg)
+{
+ const qb_ipc_request_header_t *req = msg;
+ const char *req_buf = (char*)msg + sizeof (qb_ipc_request_header_t);
+ qb_ipc_response_header_t res_done;
+
+ qb_ipc_response_header_t res;
+ struct iovec iovec[2];
+
+ res.size = req->size - sizeof (qb_ipc_request_header_t) + sizeof
(qb_ipc_response_header_t);
+ res.error = 0;
+ iovec[0].iov_base = &res;
+ iovec[0].iov_len = sizeof (res);
+ iovec[1].iov_base = (void *)req_buf;
+ iovec[1].iov_len = req->size - sizeof (qb_ipc_request_header_t);
+
+ qb_ipcs_dispatch_iov_send (conn, iovec, 2);
+ res_done.size = sizeof (qb_ipc_response_header_t);
+ res_done.error = 0;
+ qb_ipcs_response_send (conn, &res_done, sizeof (res_done));
+}
+
+static int bms_lib_init_fn (void *conn)
+{
+ return (0);
+}
+
+static int bms_lib_exit_fn (void *conn)
+{
+ return (0);
+}
+
+static struct lib_handler bms_lib_engine_one[] = {
+ { /* entry 0 */
+ .lib_handler_fn = bms_benchmark_one_fn,
+ },
+ { /* entry 0 */
+ .lib_handler_fn = bms_benchmark_two_fn,
+ }
+};
+
+static struct service_engine services[1] = {
+ {
+ .private_data_size = 0,
+ .lib_init_fn = bms_lib_init_fn,
+ .lib_exit_fn = bms_lib_exit_fn,
+ .lib_engine = bms_lib_engine_one,
+ }
+};
+
+static void bms_serialize_lock (void)
+{
+}
+
+static void bms_serialize_unlock (void)
+{
+}
+
+/*
+ * Provides the glue from bms to the IPC Service
+ */
+static int bms_private_data_size_get (unsigned int service)
+{
+ return (services[service].private_data_size);
+}
+
+static qb_ipcs_init_fn_lvalue bms_init_fn_get (unsigned int service)
+{
+ return (services[service].lib_init_fn);
+}
+
+static qb_ipcs_exit_fn_lvalue bms_exit_fn_get (unsigned int service)
+{
+ return (services[service].lib_exit_fn);
+}
+
+static qb_ipcs_handler_fn_lvalue bms_handler_fn_get (unsigned int service, unsigned int
id)
+{
+ return (services[service].lib_engine[id].lib_handler_fn);
+}
+
+
+static int bms_security_valid (int euid, int egid)
+{
+ printf("%s:%d %s\n", __FILE__, __LINE__, __func__);
+ if (euid == 0 || egid == 0) {
+ return (1);
+ }
+ return (0);
+}
+
+static int bms_service_available (unsigned int service)
+{
+ printf("%s:%d %s\n", __FILE__, __LINE__, __func__);
+ return (service < 1);
+}
+
+static int bms_sending_allowed (
+ unsigned int service,
+ unsigned int id,
+ const void *msg,
+ void *sending_allowed_private_data)
+{
+ return (1);
+}
+
+static void bms_sending_allowed_release (void *sending_allowed_private_data)
+{
+}
+
+static void ipc_log_printf (const char *format, ...) __attribute__((format(printf, 1,
2)));
+static void ipc_log_printf (const char *format, ...)
+{
+ va_list ap;
+
+ va_start (ap, format);
+
+ vfprintf (stderr, format, ap);
+
+ va_end (ap);
+}
+
+static void ipc_fatal_error (const char *error_msg)
+{
+ printf ("FATAL Error: %s\n", error_msg);
+ exit (1);
+}
+
+static int bms_poll_handler_accept (
+ qb_hdb_handle_t handle,
+ int fd,
+ int revent,
+ void *context)
+{
+ printf("%s:%d %s\n", __FILE__, __LINE__, __func__);
+ return (qb_ipcs_handler_accept (fd, revent, context));
+}
+
+static int bms_poll_handler_dispatch (
+ qb_hdb_handle_t handle,
+ int fd,
+ int revent,
+ void *context)
+{
+ return (qb_ipcs_handler_dispatch (fd, revent, context));
+}
+
+
+static void bms_poll_accept_add (
+ int fd)
+{
+ printf("%s:%d %s\n", __FILE__, __LINE__, __func__);
+ qb_poll_dispatch_add (bms_poll_handle, fd, POLLIN|POLLNVAL, 0,
bms_poll_handler_accept);
+}
+
+static void bms_poll_dispatch_add (
+ int fd,
+ void *context)
+{
+ printf("%s:%d %s\n", __FILE__, __LINE__, __func__);
+ qb_poll_dispatch_add (bms_poll_handle, fd, POLLIN|POLLNVAL, context,
+ bms_poll_handler_dispatch);
+}
+
+static void bms_poll_dispatch_modify (
+ int fd,
+ int events)
+{
+ printf("%s:%d %s\n", __FILE__, __LINE__, __func__);
+ qb_poll_dispatch_modify (bms_poll_handle, fd, events,
+ bms_poll_handler_dispatch);
+}
+
+struct sched_param sched_param = {
+ .sched_priority = 99,
+};
+
+struct qb_ipcs_init_state ipc_init_state = {
+ .socket_name = "qb_ipcs_bm",
+ .sched_policy = 0,
+ .sched_param = NULL,
+ .malloc = malloc,
+ .free = free,
+ .log_printf = ipc_log_printf,
+ .fatal_error = ipc_fatal_error,
+ .security_valid = bms_security_valid,
+ .service_available = bms_service_available,
+ .private_data_size_get = bms_private_data_size_get,
+ .serialize_lock = bms_serialize_lock,
+ .serialize_unlock = bms_serialize_unlock,
+ .sending_allowed = bms_sending_allowed,
+ .sending_allowed_release = bms_sending_allowed_release,
+ .poll_accept_add = bms_poll_accept_add,
+ .poll_dispatch_add = bms_poll_dispatch_add,
+ .poll_dispatch_modify = bms_poll_dispatch_modify,
+ .init_fn_get = bms_init_fn_get,
+ .exit_fn_get = bms_exit_fn_get,
+ .handler_fn_get = bms_handler_fn_get
+};
+
+static void sigusr1_handler (int num)
+{
+}
+
+int main (int argc, char **argv)
+{
+ signal (SIGUSR1, sigusr1_handler);
+
+ bms_poll_handle = qb_poll_create ();
+
+ qb_ipcs_ipc_init (&ipc_init_state);
+
+ qb_poll_run (bms_poll_handle);
+
+ return EXIT_SUCCESS;
+}
--
1.6.6.1