Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
FORMUS3IC_LAS3
/
embb
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2236e99e
authored
8 years ago
by
Michael Schmid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mutex pointer
parent
5c422de0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
base_c/src/mutex.c
+4
-4
No files found.
base_c/src/mutex.c
View file @
2236e99e
...
...
@@ -167,7 +167,7 @@ int embb_mutex_init(embb_mutex_t* mutex, int type) {
}
else {
assert(type == EMBB_MUTEX_RECURSIVE);*/
mutex
=
xSemaphoreCreateRecursiveMutex
();
*
mutex
=
xSemaphoreCreateRecursiveMutex
();
/*}*/
EMBB_UNUSED
(
type
);
...
...
@@ -183,7 +183,7 @@ int embb_mutex_lock(embb_mutex_t* mutex) {
if
(
NULL
==
mutex
)
{
return
EMBB_ERROR
;
}
int
result
=
xSemaphoreTakeRecursive
(
mutex
,
portMAX_DELAY
);
int
result
=
xSemaphoreTakeRecursive
(
*
mutex
,
portMAX_DELAY
);
if
(
result
!=
1
)
return
EMBB_ERROR
;
return
EMBB_SUCCESS
;
}
...
...
@@ -193,7 +193,7 @@ int embb_mutex_try_lock(embb_mutex_t* mutex) {
return
EMBB_ERROR
;
}
int
result
=
xSemaphoreTakeRecursive
(
mutex
,
0
);
int
result
=
xSemaphoreTakeRecursive
(
*
mutex
,
0
);
if
(
result
!=
1
)
return
EMBB_ERROR
;
return
EMBB_SUCCESS
;
}
...
...
@@ -202,7 +202,7 @@ int embb_mutex_unlock(embb_mutex_t* mutex) {
if
(
NULL
==
mutex
)
{
return
EMBB_ERROR
;
}
int
result
=
xSemaphoreGiveRecursive
(
mutex
);
int
result
=
xSemaphoreGiveRecursive
(
*
mutex
);
if
(
result
!=
1
)
return
EMBB_ERROR
;
return
EMBB_SUCCESS
;
}
...
...
This diff is collapsed.
Click to expand it.
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