GitLab maintenance scheduled for Tomorrow, 2020-03-31, from 17:00 to 18:00 CT - Services will be unavailable during this time.

Commit a509eecd authored by Philip Carns's avatar Philip Carns

refactor

parent a93f0ac0
...@@ -2,5 +2,5 @@ noinst_PROGRAMS += examples/multiplex/margo-example-mp-server ...@@ -2,5 +2,5 @@ noinst_PROGRAMS += examples/multiplex/margo-example-mp-server
examples_multiplex_margo_example_mp_server_SOURCES = \ examples_multiplex_margo_example_mp_server_SOURCES = \
examples/multiplex/margo-example-mp-server.c \ examples/multiplex/margo-example-mp-server.c \
examples/multiplex/svc1.c \ examples/multiplex/svc1-server.c \
examples/multiplex/svc2.c examples/multiplex/svc2-server.c
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
#include <abt-snoozer.h> #include <abt-snoozer.h>
#include <margo.h> #include <margo.h>
#include "svc1.h" #include "svc1-server.h"
#include "svc2.h" #include "svc2-server.h"
/* example server program that starts a skeleton for sub-services within /* example server program that starts a skeleton for sub-services within
* this process to register with * this process to register with
......
/*
* (C) 2015 The University of Chicago
*
* See COPYRIGHT in top-level directory.
*/
#ifndef __SVC1_CLIENT
#define __SVC1_CLIENT
#include <margo.h>
#endif /* __SVC1_CLIENT */
...@@ -4,27 +4,19 @@ ...@@ -4,27 +4,19 @@
* See COPYRIGHT in top-level directory. * See COPYRIGHT in top-level directory.
*/ */
#ifndef __SVC1 #ifndef __SVC1_PROTO
#define __SVC1 #define __SVC1_PROTO
#include <margo.h> #include <margo.h>
/* this is an example service that will be registered as a unit on a
* centralized progress engine */
int svc1_register(margo_instance_id mid, ABT_pool pool, uint32_t mplex_id);
void svc1_deregister(margo_instance_id mid, ABT_pool pool, uint32_t mplex_id);
MERCURY_GEN_PROC(svc1_do_thing_out_t, ((int32_t)(ret))) MERCURY_GEN_PROC(svc1_do_thing_out_t, ((int32_t)(ret)))
MERCURY_GEN_PROC(svc1_do_thing_in_t, MERCURY_GEN_PROC(svc1_do_thing_in_t,
((int32_t)(input_val))\ ((int32_t)(input_val))\
((hg_bulk_t)(bulk_handle))) ((hg_bulk_t)(bulk_handle)))
DECLARE_MARGO_RPC_HANDLER(svc1_do_thing_ult)
MERCURY_GEN_PROC(svc1_do_other_thing_out_t, ((int32_t)(ret))) MERCURY_GEN_PROC(svc1_do_other_thing_out_t, ((int32_t)(ret)))
MERCURY_GEN_PROC(svc1_do_other_thing_in_t, MERCURY_GEN_PROC(svc1_do_other_thing_in_t,
((int32_t)(input_val))\ ((int32_t)(input_val))\
((hg_bulk_t)(bulk_handle))) ((hg_bulk_t)(bulk_handle)))
DECLARE_MARGO_RPC_HANDLER(svc1_do_other_thing_ult)
#endif /* __SVC1 */ #endif /* __SVC1_PROTO */
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
*/ */
#include <assert.h> #include <assert.h>
#include "svc1.h" #include "svc1-proto.h"
#include "svc1-server.h"
static void svc1_do_thing_ult(hg_handle_t handle) static void svc1_do_thing_ult(hg_handle_t handle)
{ {
......
/*
* (C) 2015 The University of Chicago
*
* See COPYRIGHT in top-level directory.
*/
#ifndef __SVC1_SERVER
#define __SVC1_SERVER
#include <margo.h>
int svc1_register(margo_instance_id mid, ABT_pool pool, uint32_t mplex_id);
void svc1_deregister(margo_instance_id mid, ABT_pool pool, uint32_t mplex_id);
#endif /* __SVC1_SERVER */
/*
* (C) 2015 The University of Chicago
*
* See COPYRIGHT in top-level directory.
*/
#ifndef __SVC2_CLIENT
#define __SVC2_CLIENT
#include <margo.h>
#endif /* __SVC2_CLIENT */
...@@ -4,27 +4,19 @@ ...@@ -4,27 +4,19 @@
* See COPYRIGHT in top-level directory. * See COPYRIGHT in top-level directory.
*/ */
#ifndef __SVC2 #ifndef __SVC2_PROTO
#define __SVC2 #define __SVC2_PROTO
#include <margo.h> #include <margo.h>
/* this is an example service that will be registered as a unit on a
* centralized progress engine */
int svc2_register(margo_instance_id mid, ABT_pool pool, uint32_t mplex_id);
void svc2_deregister(margo_instance_id mid, ABT_pool pool, uint32_t mplex_id);
MERCURY_GEN_PROC(svc2_do_thing_out_t, ((int32_t)(ret))) MERCURY_GEN_PROC(svc2_do_thing_out_t, ((int32_t)(ret)))
MERCURY_GEN_PROC(svc2_do_thing_in_t, MERCURY_GEN_PROC(svc2_do_thing_in_t,
((int32_t)(input_val))\ ((int32_t)(input_val))\
((hg_bulk_t)(bulk_handle))) ((hg_bulk_t)(bulk_handle)))
DECLARE_MARGO_RPC_HANDLER(svc2_do_thing_ult)
MERCURY_GEN_PROC(svc2_do_other_thing_out_t, ((int32_t)(ret))) MERCURY_GEN_PROC(svc2_do_other_thing_out_t, ((int32_t)(ret)))
MERCURY_GEN_PROC(svc2_do_other_thing_in_t, MERCURY_GEN_PROC(svc2_do_other_thing_in_t,
((int32_t)(input_val))\ ((int32_t)(input_val))\
((hg_bulk_t)(bulk_handle))) ((hg_bulk_t)(bulk_handle)))
DECLARE_MARGO_RPC_HANDLER(svc2_do_other_thing_ult)
#endif /* __SVC2 */ #endif /* __SVC2_PROTO */
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
*/ */
#include <assert.h> #include <assert.h>
#include "svc2.h" #include "svc2-proto.h"
#include "svc2-server.h"
static void svc2_do_thing_ult(hg_handle_t handle) static void svc2_do_thing_ult(hg_handle_t handle)
{ {
......
/*
* (C) 2015 The University of Chicago
*
* See COPYRIGHT in top-level directory.
*/
#ifndef __SVC2_SERVER
#define __SVC2_SERVER
#include <margo.h>
int svc2_register(margo_instance_id mid, ABT_pool pool, uint32_t mplex_id);
void svc2_deregister(margo_instance_id mid, ABT_pool pool, uint32_t mplex_id);
#endif /* __SVC2_SERVER */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment