MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sendfile_sync_signal

Function sendfile_sync_signal

freebsd/kern/kern_sendfile.c:122–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122static void
123sendfile_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
139counter_u64_t sfstat[sizeof(struct sfstat) / sizeof(uint64_t)];
140

Callers 2

sendfile_free_mextFunction · 0.85
sendfile_free_mext_pgFunction · 0.85

Calls 4

sendfile_sync_destroyFunction · 0.85
mtx_lockFunction · 0.70
cv_signalFunction · 0.70
mtx_unlockFunction · 0.70

Tested by

no test coverage detected