diff options
Diffstat (limited to 'ot_mutex.c')
| -rw-r--r-- | ot_mutex.c | 9 |
1 files changed, 5 insertions, 4 deletions
| @@ -8,11 +8,10 @@ | |||
| 8 | #include <pthread.h> | 8 | #include <pthread.h> |
| 9 | #include <stdio.h> | 9 | #include <stdio.h> |
| 10 | #include <stdlib.h> | 10 | #include <stdlib.h> |
| 11 | #include <unistd.h> | ||
| 11 | #include <string.h> | 12 | #include <string.h> |
| 12 | #include <sys/uio.h> | 13 | #include <sys/uio.h> |
| 13 | 14 | ||
| 14 | /* Libowfat */ | ||
| 15 | #include "io.h" | ||
| 16 | 15 | ||
| 17 | /* Opentracker */ | 16 | /* Opentracker */ |
| 18 | #include "ot_iovec.h" | 17 | #include "ot_iovec.h" |
| @@ -193,7 +192,8 @@ int mutex_workqueue_pushresult(ot_taskid taskid, size_t iovec_entries, struct io | |||
| 193 | /* Release lock */ | 192 | /* Release lock */ |
| 194 | pthread_mutex_unlock(&tasklist_mutex); | 193 | pthread_mutex_unlock(&tasklist_mutex); |
| 195 | 194 | ||
| 196 | io_trywrite(g_self_pipe[1], &byte, 1); | 195 | /* A full pipe has already done this nudge's job, so a failure is fine */ |
| 196 | (void)!write(g_self_pipe[1], &byte, 1); | ||
| 197 | 197 | ||
| 198 | /* Indicate whether the worker has to throw away results */ | 198 | /* Indicate whether the worker has to throw away results */ |
| 199 | return task ? 0 : -1; | 199 | return task ? 0 : -1; |
| @@ -221,7 +221,8 @@ int mutex_workqueue_pushchunked(ot_taskid taskid, struct iovec *iovec) { | |||
| 221 | /* Release lock */ | 221 | /* Release lock */ |
| 222 | pthread_mutex_unlock(&tasklist_mutex); | 222 | pthread_mutex_unlock(&tasklist_mutex); |
| 223 | 223 | ||
| 224 | io_trywrite(g_self_pipe[1], &byte, 1); | 224 | /* A full pipe has already done this nudge's job, so a failure is fine */ |
| 225 | (void)!write(g_self_pipe[1], &byte, 1); | ||
| 225 | 226 | ||
| 226 | /* Indicate whether the worker has to throw away results */ | 227 | /* Indicate whether the worker has to throw away results */ |
| 227 | return task ? 0 : -1; | 228 | return task ? 0 : -1; |
