Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
Mock Turtle
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
Mock Turtle
Commits
87edcca1
Commit
87edcca1
authored
Jul 31, 2015
by
Tomasz Wlostowski
Committed by
Federico Vaga
Jul 31, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrtd:rt: forgot to initialize the loop queue. Counter should be also atomic
parent
c783633d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
loop-queue.c
applications/wrtd/rt/common/loop-queue.c
+3
-2
rt-fd.c
applications/wrtd/rt/fd/rt-fd.c
+0
-1
rt-tdc.c
applications/wrtd/rt/tdc/rt-tdc.c
+2
-0
No files found.
applications/wrtd/rt/common/loop-queue.c
View file @
87edcca1
...
...
@@ -41,7 +41,7 @@ void loop_queue_push(struct wrtd_trig_id *id, uint32_t seq, struct wr_timestamp
if
(
head
==
LOOP_QUEUE_SIZE
)
head
=
0
;
count
++
;
smem_atomic_add
(
&
count
,
1
)
;
}
struct
wrtd_trigger_entry
*
loop_queue_pop
()
...
...
@@ -55,7 +55,8 @@ struct wrtd_trigger_entry *loop_queue_pop()
if
(
tail
==
LOOP_QUEUE_SIZE
)
tail
=
0
;
count
--
;
smem_atomic_sub
(
&
count
,
1
);
return
rv
;
}
applications/wrtd/rt/fd/rt-fd.c
View file @
87edcca1
...
...
@@ -727,7 +727,6 @@ void do_rx()
rx_ebone
++
;
}
struct
wrtd_trigger_entry
*
ent
=
loop_queue_pop
();
if
(
ent
)
{
...
...
applications/wrtd/rt/tdc/rt-tdc.c
View file @
87edcca1
...
...
@@ -654,6 +654,8 @@ void init()
{
int
i
;
loop_queue_init
();
wr_state
=
WR_LINK_OFFLINE
;
wr_enable_lock
(
0
);
...
...
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