| 1 |
|
| /* |
| 2 |
|
| dummy mutexes, for non-threaded builds |
| 3 |
|
| */ |
| 4 |
|
| |
| 5 |
|
| #include "imageri.h" |
| 6 |
|
| |
| 7 |
|
| #include <pthread.h> |
| 8 |
|
| |
| 9 |
|
| /* documented in mutexwin.c */ |
| 10 |
|
| |
| 11 |
|
| struct i_mutex_tag { |
| 12 |
|
| int dummy; |
| 13 |
|
| }; |
| 14 |
|
| |
| 15 |
|
| i_mutex_t |
| 16 |
116 |
| i_mutex_new(void) { |
| 17 |
|
| i_mutex_t m; |
| 18 |
|
| |
| 19 |
116 |
| m = malloc(sizeof(*m)); |
| 20 |
116 |
▶ | if (!m) |
Branch: 1 branch
| Branch | True | False | Total |
| if (!m) |
0 |
116 |
116 |
|
| 21 |
0 |
| i_fatal(3, "Cannot allocate mutex object"); |
| 22 |
|
| |
| 23 |
116 |
| return m; |
| 24 |
|
| } |
| 25 |
|
| |
| 26 |
|
| void |
| 27 |
0 |
| i_mutex_destroy(i_mutex_t m) { |
| 28 |
0 |
| free(m); |
| 29 |
0 |
| } |
| 30 |
|
| |
| 31 |
|
| void |
| 32 |
62679 |
| i_mutex_lock(i_mutex_t m) { |
| 33 |
|
| (void)m; |
| 34 |
62679 |
| } |
| 35 |
|
| |
| 36 |
|
| void |
| 37 |
62679 |
| i_mutex_unlock(i_mutex_t m) { |
| 38 |
|
| (void)m; |
| 39 |
62679 |
| } |