| 734 | } |
| 735 | |
| 736 | void |
| 737 | ktrcsw(int out, int user, const char *wmesg) |
| 738 | { |
| 739 | struct thread *td = curthread; |
| 740 | struct ktr_request *req; |
| 741 | struct ktr_csw *kc; |
| 742 | |
| 743 | if (__predict_false(curthread->td_pflags & TDP_INKTRACE)) |
| 744 | return; |
| 745 | |
| 746 | req = ktr_getrequest(KTR_CSW); |
| 747 | if (req == NULL) |
| 748 | return; |
| 749 | kc = &req->ktr_data.ktr_csw; |
| 750 | kc->out = out; |
| 751 | kc->user = user; |
| 752 | if (wmesg != NULL) |
| 753 | strlcpy(kc->wmesg, wmesg, sizeof(kc->wmesg)); |
| 754 | else |
| 755 | bzero(kc->wmesg, sizeof(kc->wmesg)); |
| 756 | ktr_enqueuerequest(td, req); |
| 757 | ktrace_exit(td); |
| 758 | } |
| 759 | |
| 760 | void |
| 761 | ktrstruct(const char *name, const void *data, size_t datalen) |
no test coverage detected