Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pete
firmware
Commits
d2986026
Verified
Commit
d2986026
authored
5 years ago
by
rahix
Browse files
Options
Downloads
Patches
Plain Diff
fix(dispatcher): Initialize mutex before RTOS startup
Signed-off-by:
Rahix
<
rahix@rahix.de
>
parent
3dd88fbb
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
epicardium/modules/dispatcher.c
+5
-2
5 additions, 2 deletions
epicardium/modules/dispatcher.c
epicardium/modules/hardware.c
+5
-0
5 additions, 0 deletions
epicardium/modules/hardware.c
epicardium/modules/modules.h
+1
-0
1 addition, 0 deletions
epicardium/modules/modules.h
with
11 additions
and
2 deletions
epicardium/modules/dispatcher.c
+
5
−
2
View file @
d2986026
...
...
@@ -13,14 +13,17 @@ TaskHandle_t dispatcher_task_id;
static
StaticSemaphore_t
api_mutex_data
;
SemaphoreHandle_t
api_mutex
=
NULL
;
void
dispatcher_mutex_init
(
void
)
{
api_mutex
=
xSemaphoreCreateMutexStatic
(
&
api_mutex_data
);
}
/*
* API dispatcher task. This task will sleep until an API call is issued and
* then wake up to dispatch it.
*/
void
vApiDispatcher
(
void
*
pvParameters
)
{
api_mutex
=
xSemaphoreCreateMutexStatic
(
&
api_mutex_data
);
LOG_DEBUG
(
"dispatcher"
,
"Ready."
);
while
(
1
)
{
if
(
api_dispatcher_poll
())
{
...
...
This diff is collapsed.
Click to expand it.
epicardium/modules/hardware.c
+
5
−
0
View file @
d2986026
...
...
@@ -177,6 +177,11 @@ int hardware_early_init(void)
*/
hwlock_init
();
/*
* API Dispatcher Mutex
*/
dispatcher_mutex_init
();
return
0
;
}
...
...
This diff is collapsed.
Click to expand it.
epicardium/modules/modules.h
+
1
−
0
View file @
d2986026
...
...
@@ -9,6 +9,7 @@
/* ---------- Dispatcher --------------------------------------------------- */
void
vApiDispatcher
(
void
*
pvParameters
);
void
dispatcher_mutex_init
(
void
);
extern
SemaphoreHandle_t
api_mutex
;
extern
TaskHandle_t
dispatcher_task_id
;
...
...
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