Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TTool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mbe-tools
TTool
Commits
2a34edc6
Commit
2a34edc6
authored
7 years ago
by
Daniela Genius
Browse files
Options
Downloads
Patches
Plain Diff
bugfix asyncchannel
parent
7a4ec5b7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
MPSoC/src/asyncchannel.c
+9
-7
9 additions, 7 deletions
MPSoC/src/asyncchannel.c
with
9 additions
and
7 deletions
MPSoC/src/asyncchannel.c
+
9
−
7
View file @
2a34edc6
...
...
@@ -12,6 +12,7 @@
int
async_read_nonblocking
(
struct
mwmr_s
*
fifo
,
void
*
_ptr
,
int
lensw
){
int
i
;
i
=
mwmr_try_read
(
fifo
,
_ptr
,
lensw
);
debugInt
(
"debug bytes read
\n
"
,
i
);
return
i
;
}
...
...
@@ -22,7 +23,8 @@ int async_write_nonblocking( struct mwmr_s *fifo, void *_ptr, int lensw ){
i
=
mwmr_try_write
(
fifo
,
_ptr
,
lensw
);
if
(
i
<
lensw
){
/* the data item is thrown away */
debugInt
(
"data discarded"
);
debugInt
(
"debug bytes written
\n
"
,
i
);
debugInt
(
"data discarded"
,
lensw
-
i
);
return
i
;
}
else
{
...
...
@@ -33,7 +35,7 @@ int async_write_nonblocking( struct mwmr_s *fifo, void *_ptr, int lensw ){
void
async_read
(
struct
mwmr_s
*
fifo
,
void
*
_ptr
,
int
lensw
){
debugInt
(
"debug fifo
\n
"
,
fifo
);
debugInt
(
"debug fifo
read
\n
"
,
fifo
);
debugInt
(
"debug ptr
\n
"
,
_ptr
);
debugInt
(
"debug lensw
\n
"
,
lensw
);
debugInt
(
"debug fifo status address
\n
"
,
&
(
fifo
->
status
));
...
...
@@ -44,7 +46,7 @@ void async_read( struct mwmr_s *fifo, void *_ptr, int lensw ){
}
void
async_write
(
struct
mwmr_s
*
fifo
,
void
*
_ptr
,
int
lensw
){
debugInt
(
"debug fifo
\n
"
,
fifo
);
debugInt
(
"debug fifo
write
\n
"
,
fifo
);
debugInt
(
"debug ptr
\n
"
,
_ptr
);
debugInt
(
"debug lensw
\n
"
,
lensw
);
debugInt
(
"debug fifo status address
\n
"
,
&
(
fifo
->
status
));
...
...
@@ -113,8 +115,8 @@ void destroyAsyncchannel(asyncchannel *asyncch) {
debugInt
(
"asyncchannel address
\n
"
,
channel
->
mwmr_fifo
);
debugInt
(
"asyncchannel fifo->depth
\n
"
,
channel
->
mwmr_fifo
->
depth
);
debugInt
(
"asyncchannel fifo->width
\n
"
,
channel
->
mwmr_fifo
->
width
);
debugInt
(
"asyncchannel msg size
\n
"
,
sizeof
(
msg
));
async_read
(
channel
->
mwmr_fifo
,
&
msg
,
sizeof
(
msg
));
debugInt
(
"asyncchannel msg size
\n
"
,
sizeof
(
*
msg
));
async_read
(
channel
->
mwmr_fifo
,
&
msg
,
sizeof
(
*
msg
));
return
msg
;
}
...
...
@@ -134,6 +136,6 @@ void addMessageToAsyncChannel(asyncchannel *channel, message *msg) {
debugInt
(
"asyncchannel->fifo rptr
\n
"
,
channel
->
mwmr_fifo
->
status
->
rptr
);
debugInt
(
"asyncchannel->fifo wptr
\n
"
,
channel
->
mwmr_fifo
->
status
->
wptr
);
//async_write(channel->mwmr_fifo, &msg, 1 );
debugInt
(
"asyncchannel msg size
\n
"
,
sizeof
(
msg
));
async_write
(
channel
->
mwmr_fifo
,
&
msg
,
sizeof
(
msg
));
//DG 13.6. *msg au lieu de msg
debugInt
(
"asyncchannel msg size
\n
"
,
sizeof
(
*
msg
));
async_write
(
channel
->
mwmr_fifo
,
&
msg
,
sizeof
(
*
msg
));
//DG 13.6. *msg au lieu de msg
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment