Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bake
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
8
Issues
8
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sds
bake
Commits
beeb18fc
Commit
beeb18fc
authored
Apr 18, 2016
by
Philip Carns
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shutdown rpc
parent
b3ba3813
Pipeline
#152
skipped
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
0 deletions
+56
-0
src/Makefile.subdir
src/Makefile.subdir
+4
-0
src/bake-bulk-rpc.c
src/bake-bulk-rpc.c
+38
-0
src/bake-bulk-rpc.h
src/bake-bulk-rpc.h
+14
-0
No files found.
src/Makefile.subdir
View file @
beeb18fc
...
...
@@ -2,3 +2,7 @@ src_libbake_bulk_a_SOURCES += \
src/bake-bulk.c
bin_PROGRAMS
+=
src/bake-bulk-server
src_bake_bulk_server_SOURCES
=
\
src/bake-bulk-server.c
\
src/bake-bulk-rpc.c
src/bake-bulk-rpc.c
0 → 100644
View file @
beeb18fc
/*
* (C) 2015 The University of Chicago
*
* See COPYRIGHT in top-level directory.
*/
#include <assert.h>
#include "bake-bulk-rpc.h"
/* service a remote RPC that instructs the server daemon to shut down */
static
void
bake_bulk_shutdown_ult
(
void
*
_arg
)
{
hg_handle_t
*
handle
=
_arg
;
hg_return_t
hret
;
struct
hg_info
*
hgi
;
margo_instance_id
mid
;
printf
(
"Got RPC request to shutdown
\n
"
);
hgi
=
HG_Get_info
(
*
handle
);
assert
(
hgi
);
mid
=
margo_hg_class_to_instance
(
hgi
->
hg_class
);
hret
=
margo_respond
(
mid
,
*
handle
,
NULL
);
assert
(
hret
==
HG_SUCCESS
);
HG_Destroy
(
*
handle
);
/* NOTE: we assume that the server daemon is using
* margo_wait_for_finalize() to suspend until this RPC executes, so there
* is no need to send any extra signal to notify it.
*/
margo_finalize
(
mid
);
return
;
}
DEFINE_MARGO_RPC_HANDLER
(
bake_bulk_shutdown_ult
)
src/bake-bulk-rpc.h
0 → 100644
View file @
beeb18fc
/*
* (C) 2015 The University of Chicago
*
* See COPYRIGHT in top-level directory.
*/
#ifndef __BAKE_BULK
#define __BAKE_BULK
#include <margo.h>
DECLARE_MARGO_RPC_HANDLER
(
bake_bulk_shutdown_ult
)
#endif
/* __BAKE_BULK */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment