| 120 | } |
| 121 | |
| 122 | static void |
| 123 | sendfile_sync_signal(struct sendfile_sync *sfs) |
| 124 | { |
| 125 | mtx_lock(&sfs->mtx); |
| 126 | KASSERT(sfs->count > 0, ("sendfile sync %p not busy", sfs)); |
| 127 | if (--sfs->count == 0) { |
| 128 | if (!sfs->waiting) { |
| 129 | /* The sendfile() waiter was interrupted by a signal. */ |
| 130 | sendfile_sync_destroy(sfs); |
| 131 | return; |
| 132 | } else { |
| 133 | cv_signal(&sfs->cv); |
| 134 | } |
| 135 | } |
| 136 | mtx_unlock(&sfs->mtx); |
| 137 | } |
| 138 | |
| 139 | counter_u64_t sfstat[sizeof(struct sfstat) / sizeof(uint64_t)]; |
| 140 |
no test coverage detected