File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change 22
33 @file IntrOS: osmutex.c
44 @author Rajmund Szymanski
5- @date 29.08 .2018
5+ @date 23.10 .2018
66 @brief This file provides set of functions for IntrOS.
77
88 ******************************************************************************
@@ -49,7 +49,7 @@ void mtx_init( mtx_t *mtx )
4949unsigned mtx_take ( mtx_t * mtx )
5050/* -------------------------------------------------------------------------- */
5151{
52- unsigned event ;
52+ unsigned event = E_FAILURE ;
5353
5454 assert (mtx );
5555 assert (mtx -> owner != System .cur );
@@ -61,10 +61,6 @@ unsigned mtx_take( mtx_t *mtx )
6161 mtx -> owner = System .cur ;
6262 event = E_SUCCESS ;
6363 }
64- else
65- {
66- event = E_FAILURE ;
67- }
6864 }
6965 sys_unlock ();
7066
@@ -82,7 +78,7 @@ void mtx_wait( mtx_t *mtx )
8278unsigned mtx_give ( mtx_t * mtx )
8379/* -------------------------------------------------------------------------- */
8480{
85- unsigned event ;
81+ unsigned event = E_FAILURE ;
8682
8783 assert (mtx );
8884
@@ -93,10 +89,6 @@ unsigned mtx_give( mtx_t *mtx )
9389 mtx -> owner = 0 ;
9490 event = E_SUCCESS ;
9591 }
96- else
97- {
98- event = E_FAILURE ;
99- }
10092 }
10193 sys_unlock ();
10294
You can’t perform that action at this time.
0 commit comments