Skip to content

Commit 71b7ae9

Browse files
committed
quectel: Change mutex lock return code.
Signed-off-by: Nikola Neskovic <[email protected]>
1 parent 1497f27 commit 71b7ae9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ports/quectel/mpthreadport.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,8 @@ void mp_thread_mutex_init(mp_thread_mutex_t *mutex) {
271271
}
272272

273273
int mp_thread_mutex_lock(mp_thread_mutex_t *mutex, int wait) {
274-
return Helios_Mutex_Lock(*mutex, wait ? QPY_WAIT_FOREVER : QPY_NO_WAIT);
274+
int ret = Helios_Mutex_Lock(*mutex, wait ? QPY_WAIT_FOREVER : QPY_NO_WAIT);
275+
return ret == 0 ? 1 : 0;
275276
}
276277

277278
void mp_thread_mutex_unlock(mp_thread_mutex_t *mutex) {

0 commit comments

Comments
 (0)