tests: mutex_api: fix code style
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
fbe4f16bc7
commit
3ad53365d6
1 changed files with 4 additions and 4 deletions
|
@ -32,7 +32,7 @@ static struct k_thread tdata;
|
||||||
static void tThread_entry_lock_forever(void *p1, void *p2, void *p3)
|
static void tThread_entry_lock_forever(void *p1, void *p2, void *p3)
|
||||||
{
|
{
|
||||||
zassert_false(k_mutex_lock((struct k_mutex *)p1, K_FOREVER) == 0,
|
zassert_false(k_mutex_lock((struct k_mutex *)p1, K_FOREVER) == 0,
|
||||||
"access locked resource from spawn thread");
|
"access locked resource from spawn thread");
|
||||||
/* should not hit here */
|
/* should not hit here */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,13 +96,13 @@ static void tmutex_test_lock_unlock(struct k_mutex *pmutex)
|
||||||
{
|
{
|
||||||
k_mutex_init(pmutex);
|
k_mutex_init(pmutex);
|
||||||
zassert_true(k_mutex_lock(pmutex, K_FOREVER) == 0,
|
zassert_true(k_mutex_lock(pmutex, K_FOREVER) == 0,
|
||||||
"fail to lock K_FOREVER");
|
"fail to lock K_FOREVER");
|
||||||
k_mutex_unlock(pmutex);
|
k_mutex_unlock(pmutex);
|
||||||
zassert_true(k_mutex_lock(pmutex, K_NO_WAIT) == 0,
|
zassert_true(k_mutex_lock(pmutex, K_NO_WAIT) == 0,
|
||||||
"fail to lock K_NO_WAIT");
|
"fail to lock K_NO_WAIT");
|
||||||
k_mutex_unlock(pmutex);
|
k_mutex_unlock(pmutex);
|
||||||
zassert_true(k_mutex_lock(pmutex, TIMEOUT) == 0,
|
zassert_true(k_mutex_lock(pmutex, TIMEOUT) == 0,
|
||||||
"fail to lock TIMEOUT");
|
"fail to lock TIMEOUT");
|
||||||
k_mutex_unlock(pmutex);
|
k_mutex_unlock(pmutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue