* Some trace generation environments don't permit direct access to VFS, * such as during a context switch where sleeping is not allowed. Under these * circumstances, queue a request to the thread to be written asynchronously * later. */
| 341 | * later. |
| 342 | */ |
| 343 | static void |
| 344 | ktr_enqueuerequest(struct thread *td, struct ktr_request *req) |
| 345 | { |
| 346 | |
| 347 | mtx_lock(&ktrace_mtx); |
| 348 | STAILQ_INSERT_TAIL(&td->td_proc->p_ktr, req, ktr_list); |
| 349 | mtx_unlock(&ktrace_mtx); |
| 350 | thread_lock(td); |
| 351 | td->td_flags |= TDF_ASTPENDING; |
| 352 | thread_unlock(td); |
| 353 | } |
| 354 | |
| 355 | /* |
| 356 | * Drain any pending ktrace records from the per-thread queue to disk. This |
no test coverage detected