Skip to content

Commit 348b772

Browse files
committed
comment and print mutex value
1 parent d5ade32 commit 348b772

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

espnet/espnet.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ static void *_mutex_create(void) {
7070
return NULL;
7171
}
7272

73+
// simplified mutex to continue with call stack
7374
unsigned int mutx = 0;
7475

7576
static void *_recursive_mutex_create(void) {
@@ -80,12 +81,14 @@ static void _mutex_delete(void *mutex) {
8081
printf("called: _mutex_delete: %p\n", mutex);
8182
}
8283
static int32_t _mutex_lock(void *mutex) {
83-
printf("called: _mutex_lock: %p\n", mutex);
84+
printf("called: _mutex_lock: %p (%d)\n", mutex, *(unsigned int*)mutex);
85+
// simplified mutex to continue with call stack
8486
*(unsigned int*)mutex = 1;
8587
return 0;
8688
}
8789
static int32_t _mutex_unlock(void *mutex) {
88-
printf("called: _mutex_unlock: %p\n", mutex);
90+
printf("called: _mutex_unlock: %p (%d)\n", mutex, *(unsigned int*)mutex);
91+
// simplified mutex to continue with call stack
8992
*(unsigned int*)mutex = 0;
9093
return 0;
9194
}

0 commit comments

Comments
 (0)