* XXXAUDIT: Shouldn't there be logic here to sleep waiting on available * pre_q space, suspending the system call until there is room? */
| 418 | * pre_q space, suspending the system call until there is room? |
| 419 | */ |
| 420 | struct kaudit_record * |
| 421 | audit_new(int event, struct thread *td) |
| 422 | { |
| 423 | struct kaudit_record *ar; |
| 424 | |
| 425 | /* |
| 426 | * Note: the number of outstanding uncommitted audit records is |
| 427 | * limited to the number of concurrent threads servicing system calls |
| 428 | * in the kernel. |
| 429 | */ |
| 430 | ar = uma_zalloc_arg(audit_record_zone, td, M_WAITOK); |
| 431 | ar->k_ar.ar_event = event; |
| 432 | |
| 433 | mtx_lock(&audit_mtx); |
| 434 | audit_pre_q_len++; |
| 435 | mtx_unlock(&audit_mtx); |
| 436 | |
| 437 | return (ar); |
| 438 | } |
| 439 | |
| 440 | void |
| 441 | audit_free(struct kaudit_record *ar) |
no test coverage detected