Fix some coding style issues, fix doc typo and refine some codes (#392)

This commit is contained in:
Wenyong Huang
2020-09-20 08:20:45 +08:00
committed by GitHub
parent 7c8ccc7c26
commit e501a6963b
20 changed files with 155 additions and 227 deletions

View File

@ -36,11 +36,8 @@ os_mutex_lock(korp_mutex *mutex)
assert(mutex);
ret = pthread_mutex_lock(mutex);
if (0 != ret) {
os_printf("vm mutex lock failed (ret=%d)!\n", ret);
exit(-1);
}
return ret;
return ret == 0 ? BHT_OK : BHT_ERROR;
}
int
@ -50,11 +47,8 @@ os_mutex_unlock(korp_mutex *mutex)
assert(mutex);
ret = pthread_mutex_unlock(mutex);
if (0 != ret) {
os_printf("vm mutex unlock failed (ret=%d)!\n", ret);
exit(-1);
}
return ret;
return ret == 0 ? BHT_OK : BHT_ERROR;
}
uint8 *