Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
blaar
bapps
Commits
ab48279c
Commit
ab48279c
authored
Apr 23, 2018
by
Filipe Gama
Browse files
Publish the name of the created channels
parent
b8149f2e
Changes
1
Hide whitespace changes
Inline
Side-by-side
f_tee/f_tee.cpp
View file @
ab48279c
...
...
@@ -23,17 +23,19 @@ int main(int argc, char **argv){
input
.
open
(
input_name
,
BLC_CHANNEL_READ
);
blc_loop_try_add_waiting_semaphore
(
input
.
sem_new_data
);
blc_loop_try_add_posting_semaphore
(
input
.
sem_ack_data
);
output1
.
create_or_open
(
output_name1
,
BLC_CHANNEL_WRITE
,
input
.
type
,
input
.
format
,
input
.
dims_nb
,
input
.
dims
);
output2
.
create_or_open
(
output_name2
,
BLC_CHANNEL_WRITE
,
input
.
type
,
input
.
format
,
input
.
dims_nb
,
input
.
dims
);
output1
.
publish
();
output2
.
publish
();
BLC_COMMAND_LOOP
(
0
){
if
(
output1
.
sem_ack_data
)
sem_wait
(
output1
.
sem_ack_data
);
memcpy
(
output1
.
data
,
input
.
data
,
output1
.
size
);
if
(
output1
.
sem_new_data
)
sem_post
(
output1
.
sem_new_data
);
if
(
output2
.
sem_ack_data
)
sem_wait
(
output2
.
sem_ack_data
);
memcpy
(
output2
.
data
,
input
.
data
,
output2
.
size
);
if
(
output2
.
sem_new_data
)
sem_post
(
output2
.
sem_new_data
);
...
...
Write
Preview
Supports
Markdown
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