diff options
Diffstat (limited to 'ot_sync.c')
| -rw-r--r-- | ot_sync.c | 7 |
1 files changed, 4 insertions, 3 deletions
| @@ -14,6 +14,7 @@ | |||
| 14 | #include "ot_fmt.h" | 14 | #include "ot_fmt.h" |
| 15 | #include "ot_iovec.h" | 15 | #include "ot_iovec.h" |
| 16 | #include "ot_mutex.h" | 16 | #include "ot_mutex.h" |
| 17 | #include "ot_workqueue.h" | ||
| 17 | #include "ot_scan.h" | 18 | #include "ot_scan.h" |
| 18 | #include "ot_stats.h" | 19 | #include "ot_stats.h" |
| 19 | #include "ot_sync.h" | 20 | #include "ot_sync.h" |
| @@ -139,10 +140,10 @@ static void *sync_worker(void *args) { | |||
| 139 | 140 | ||
| 140 | while (1) { | 141 | while (1) { |
| 141 | ot_tasktype tasktype = TASK_SYNC_OUT; | 142 | ot_tasktype tasktype = TASK_SYNC_OUT; |
| 142 | ot_taskid taskid = mutex_workqueue_poptask(&tasktype); | 143 | ot_taskid taskid = workqueue_poptask(&tasktype); |
| 143 | sync_make(&iovec_entries, &iovector); | 144 | sync_make(&iovec_entries, &iovector); |
| 144 | stats_issue_event(ws, EVENT_SYNC_OUT, FLAG_TCP, iovec_length(&iovec_entries, &iovector)); | 145 | stats_issue_event(ws, EVENT_SYNC_OUT, FLAG_TCP, iovec_length(&iovec_entries, &iovector)); |
| 145 | if (mutex_workqueue_pushresult(taskid, iovec_entries, iovector)) | 146 | if (workqueue_pushresult(taskid, iovec_entries, iovector)) |
| 146 | iovec_free(&iovec_entries, &iovector); | 147 | iovec_free(&iovec_entries, &iovector); |
| 147 | } | 148 | } |
| 148 | return NULL; | 149 | return NULL; |
| @@ -158,7 +159,7 @@ void sync_deinit( ) { | |||
| 158 | } | 159 | } |
| 159 | 160 | ||
| 160 | void sync_deliver( int64_t socket ) { | 161 | void sync_deliver( int64_t socket ) { |
| 161 | mutex_workqueue_pushtask( socket, TASK_SYNC_OUT ); | 162 | workqueue_pushtask( socket, TASK_SYNC_OUT ); |
| 162 | } | 163 | } |
| 163 | 164 | ||
| 164 | #endif | 165 | #endif |
