diff options
| author | Dirk Engling <erdgeist@erdgeist.org> | 2024-04-14 13:12:11 +0200 |
|---|---|---|
| committer | Dirk Engling <erdgeist@erdgeist.org> | 2024-04-14 13:12:11 +0200 |
| commit | 6ae819ae10603464da0f8ee47b189fc5fe0f21d9 (patch) | |
| tree | cdc78acd38bdcb301157a8512d58c68767754441 /ot_mutex.c | |
| parent | b8ee3dfec11d1c66bee614bfab171ada9fc2bb78 (diff) | |
remove debug fprintfs used to catch a bug
Diffstat (limited to 'ot_mutex.c')
| -rw-r--r-- | ot_mutex.c | 15 |
1 files changed, 5 insertions, 10 deletions
| @@ -205,14 +205,12 @@ int mutex_workqueue_pushchunked(ot_taskid taskid, struct iovec *iovec) { | |||
| 205 | for (task = tasklist; task; task = task->next) | 205 | for (task = tasklist; task; task = task->next) |
| 206 | if (task->taskid == taskid) { | 206 | if (task->taskid == taskid) { |
| 207 | if( iovec ) { | 207 | if( iovec ) { |
| 208 | fprintf(stderr, "mutex_workqueue_pushchunked pushing on taskid %lu\n", taskid); | 208 | if (iovec_append(&task->iovec_entries, &task->iovec, iovec) ) |
| 209 | if (!iovec_append(&task->iovec_entries, &task->iovec, iovec) ) | 209 | task->tasktype = TASK_DONE_PARTIAL; |
| 210 | return -1; | 210 | else |
| 211 | task->tasktype = TASK_DONE_PARTIAL; | 211 | task = NULL; |
| 212 | } else { | 212 | } else |
| 213 | fprintf(stderr, "mutex_workqueue_pushchunked finished taskid %lu\n", taskid); | ||
| 214 | task->tasktype = TASK_DONE; | 213 | task->tasktype = TASK_DONE; |
| 215 | } | ||
| 216 | break; | 214 | break; |
| 217 | } | 215 | } |
| 218 | 216 | ||
| @@ -220,8 +218,6 @@ fprintf(stderr, "mutex_workqueue_pushchunked finished taskid %lu\n", taskid); | |||
| 220 | pthread_mutex_unlock( &tasklist_mutex ); | 218 | pthread_mutex_unlock( &tasklist_mutex ); |
| 221 | 219 | ||
| 222 | io_trywrite( g_self_pipe[1], &byte, 1 ); | 220 | io_trywrite( g_self_pipe[1], &byte, 1 ); |
| 223 | if(!task) | ||
| 224 | fprintf(stderr, "mutex_workqueue_pushchunked taskid %lu not found\n", taskid); | ||
| 225 | 221 | ||
| 226 | /* Indicate whether the worker has to throw away results */ | 222 | /* Indicate whether the worker has to throw away results */ |
| 227 | return task ? 0 : -1; | 223 | return task ? 0 : -1; |
| @@ -240,7 +236,6 @@ int64 mutex_workqueue_popresult( int *iovec_entries, struct iovec ** iovec, int | |||
| 240 | for (task = &tasklist; *task; task = &((*task)->next)) | 236 | for (task = &tasklist; *task; task = &((*task)->next)) |
| 241 | if (((*task)->tasktype & TASK_CLASS_MASK ) == TASK_DONE) { | 237 | if (((*task)->tasktype & TASK_CLASS_MASK ) == TASK_DONE) { |
| 242 | struct ot_task *ptask = *task; | 238 | struct ot_task *ptask = *task; |
| 243 | fprintf(stderr, "Got task %lu type %d with %d entries\n", (*task)->taskid, (*task)->tasktype, ptask->iovec_entries); | ||
| 244 | *iovec_entries = ptask->iovec_entries; | 239 | *iovec_entries = ptask->iovec_entries; |
| 245 | *iovec = ptask->iovec; | 240 | *iovec = ptask->iovec; |
| 246 | sock = ptask->sock; | 241 | sock = ptask->sock; |
