Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
cm-projects
RIOT
Commits
920d8b88
Commit
920d8b88
authored
6 years ago
by
Kees Bakker
Browse files
Options
Downloads
Patches
Plain Diff
core: remove redundant casts
parent
d99d72c5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/mbox.c
+2
-2
2 additions, 2 deletions
core/mbox.c
core/msg.c
+1
-1
1 addition, 1 deletion
core/msg.c
with
3 additions
and
3 deletions
core/mbox.c
+
2
−
2
View file @
920d8b88
...
@@ -59,7 +59,7 @@ int _mbox_put(mbox_t *mbox, msg_t *msg, int blocking)
...
@@ -59,7 +59,7 @@ int _mbox_put(mbox_t *mbox, msg_t *msg, int blocking)
{
{
unsigned
irqstate
=
irq_disable
();
unsigned
irqstate
=
irq_disable
();
list_node_t
*
next
=
(
list_node_t
*
)
list_remove_head
(
&
mbox
->
readers
);
list_node_t
*
next
=
list_remove_head
(
&
mbox
->
readers
);
if
(
next
)
{
if
(
next
)
{
DEBUG
(
"mbox: Thread %"
PRIkernel_pid
" mbox 0x%08x: _tryput(): "
DEBUG
(
"mbox: Thread %"
PRIkernel_pid
" mbox 0x%08x: _tryput(): "
"there's a waiter.
\n
"
,
sched_active_pid
,
(
unsigned
)
mbox
);
"there's a waiter.
\n
"
,
sched_active_pid
,
(
unsigned
)
mbox
);
...
@@ -99,7 +99,7 @@ int _mbox_get(mbox_t *mbox, msg_t *msg, int blocking)
...
@@ -99,7 +99,7 @@ int _mbox_get(mbox_t *mbox, msg_t *msg, int blocking)
"got queued message.
\n
"
,
sched_active_pid
,
(
unsigned
)
mbox
);
"got queued message.
\n
"
,
sched_active_pid
,
(
unsigned
)
mbox
);
/* copy msg from queue */
/* copy msg from queue */
*
msg
=
mbox
->
msg_array
[
cib_get_unsafe
(
&
mbox
->
cib
)];
*
msg
=
mbox
->
msg_array
[
cib_get_unsafe
(
&
mbox
->
cib
)];
list_node_t
*
next
=
(
list_node_t
*
)
list_remove_head
(
&
mbox
->
writers
);
list_node_t
*
next
=
list_remove_head
(
&
mbox
->
writers
);
if
(
next
)
{
if
(
next
)
{
thread_t
*
thread
=
container_of
((
clist_node_t
*
)
next
,
thread_t
,
rq_entry
);
thread_t
*
thread
=
container_of
((
clist_node_t
*
)
next
,
thread_t
,
rq_entry
);
_wake_waiter
(
thread
,
irqstate
);
_wake_waiter
(
thread
,
irqstate
);
...
...
This diff is collapsed.
Click to expand it.
core/msg.c
+
1
−
1
View file @
920d8b88
...
@@ -406,7 +406,7 @@ void msg_queue_print(void)
...
@@ -406,7 +406,7 @@ void msg_queue_print(void)
printf
(
"Message queue of thread %"
PRIkernel_pid
"
\n
"
,
thread
->
pid
);
printf
(
"Message queue of thread %"
PRIkernel_pid
"
\n
"
,
thread
->
pid
);
printf
(
" size: %u (avail: %d)
\n
"
,
msg_queue
->
mask
+
1
,
printf
(
" size: %u (avail: %d)
\n
"
,
msg_queue
->
mask
+
1
,
cib_avail
(
(
cib_t
*
)
msg_queue
));
cib_avail
(
msg_queue
));
for
(;
i
!=
(
msg_queue
->
write_count
&
msg_queue
->
mask
);
for
(;
i
!=
(
msg_queue
->
write_count
&
msg_queue
->
mask
);
i
=
(
i
+
1
)
&
msg_queue
->
mask
)
{
i
=
(
i
+
1
)
&
msg_queue
->
mask
)
{
...
...
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