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
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
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
card10
firmware
Merge requests
!221
improve error logging
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
improve error logging
swym/firmware:hwlock_pc
into
master
Overview
3
Commits
3
Pipelines
4
Changes
2
All threads resolved!
Show all comments
Merged
swym
requested to merge
swym/firmware:hwlock_pc
into
master
5 years ago
Overview
3
Commits
3
Pipelines
4
Changes
2
All threads resolved!
Show all comments
Expand
hw-lock: log return address when lock is busy
pmic: print strerror(errno)
Edited
5 years ago
by
swym
0
0
Merge request reports
Compare
master
version 3
bb5bae05
5 years ago
version 2
531420d6
5 years ago
version 1
31cbb504
5 years ago
master (base)
and
latest version
latest version
a5ac02a6
3 commits,
5 years ago
version 3
bb5bae05
3 commits,
5 years ago
version 2
531420d6
2 commits,
5 years ago
version 1
31cbb504
1 commit,
5 years ago
2 files
+
19
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
epicardium/modules/hw-lock.c
+
14
−
2
Options
@@ -25,13 +25,25 @@ int hwlock_acquire(enum hwlock_periph p, TickType_t wait)
if
(
p
>=
_HWLOCK_MAX
)
{
return
-
EINVAL
;
}
TaskHandle_t
task
=
xTaskGetCurrentTaskHandle
();
if
(
xSemaphoreTake
(
hwlock_mutex
[
p
],
wait
)
!=
pdTRUE
)
{
LOG_WARN
(
"hwlock"
,
"Lock %u is busy."
,
p
);
LOG_WARN
(
"hwlock"
,
"Lock %u is busy, held by: %s, attempt to accquire by: %s"
,
p
,
pcTaskGetName
(
hwlock_tasks
[
p
]),
pcTaskGetName
(
task
)
);
LOG_DEBUG
(
"hwlock"
,
"...attempted to lock from pc %p"
,
__builtin_return_address
(
0
)
);
return
-
EBUSY
;
}
hwlock_tasks
[
p
]
=
xTaskGetCurrentTaskHandle
()
;
hwlock_tasks
[
p
]
=
task
;
return
0
;
}
Loading