Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
Beam Positoning Monitor - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Beam Positoning Monitor - Software
Commits
e9b91b23
Commit
e9b91b23
authored
Apr 19, 2016
by
Lucas Russo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
{src,include}/sm_io.*: fix smio_register_sm () to send message
The previous implementation was not thread-safe.
parent
8003ee7d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
sm_io.h
include/sm_io.h
+3
-0
sm_io.c
src/sm_io/sm_io.c
+15
-0
No files found.
include/sm_io.h
View file @
e9b91b23
...
...
@@ -124,6 +124,9 @@ smio_t *smio_new (th_boot_args_t *args, zsock_t *pipe_mgmt, zsock_t *pipe_msg,
smio_err_e
smio_destroy
(
smio_t
**
self_p
);
/* Loop through all interface sockets */
smio_err_e
smio_loop
(
smio_t
*
self
);
/* Register SMIO */
smio_err_e
smio_register_sm
(
smio_t
*
self
,
uint32_t
smio_id
,
uint64_t
base
,
uint32_t
inst_id
);
smio_err_e
smio_init_exp_ops
(
smio_t
*
self
,
disp_op_t
**
smio_exp_ops
,
const
disp_table_func_fp
*
func_fps
);
...
...
src/sm_io/sm_io.c
View file @
e9b91b23
...
...
@@ -364,6 +364,21 @@ smio_err_e smio_loop (smio_t *self)
return
err
;
}
smio_err_e
smio_register_sm
(
smio_t
*
self
,
uint32_t
smio_id
,
uint64_t
base
,
uint32_t
inst_id
)
{
assert
(
self
);
smio_err_e
err
=
SMIO_SUCCESS
;
int
zerr
=
zsock_send
(
self
->
pipe_mgmt
,
"s484"
,
"$REGISTER_SMIO"
,
smio_id
,
base
,
inst_id
);
ASSERT_TEST
(
zerr
==
0
,
"Could not register SMIO"
,
err_register_sm
,
SMIO_ERR_REGISTER_SM
);
err_register_sm:
return
err
;
}
/************************************************************/
/***************** Dispatch table callbacks *****************/
/************************************************************/
...
...
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