| 472 | } |
| 473 | |
| 474 | static void |
| 475 | mac_policy_fastpath_register(struct mac_policy_conf *mpc) |
| 476 | { |
| 477 | struct mac_policy_fastpath_elem *mpfe; |
| 478 | uintptr_t **ops; |
| 479 | int i; |
| 480 | |
| 481 | mac_policy_xlock_assert(); |
| 482 | |
| 483 | ops = (uintptr_t **)mpc->mpc_ops; |
| 484 | for (i = 0; i < nitems(mac_policy_fastpath_array); i++) { |
| 485 | mpfe = &mac_policy_fastpath_array[i]; |
| 486 | if (ops[mpfe->offset] != NULL) |
| 487 | mac_policy_fastpath_enable(mpfe); |
| 488 | } |
| 489 | } |
| 490 | |
| 491 | static void |
| 492 | mac_policy_fastpath_unregister(struct mac_policy_conf *mpc) |
no test coverage detected