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

Function sysctl_ctx_entry_add

freebsd/kern/kern_sysctl.c:658–670  ·  view source on GitHub ↗

Add an entry to the context */

Source from the content-addressed store, hash-verified

656
657/* Add an entry to the context */
658struct sysctl_ctx_entry *
659sysctl_ctx_entry_add(struct sysctl_ctx_list *clist, struct sysctl_oid *oidp)
660{
661 struct sysctl_ctx_entry *e;
662
663 SYSCTL_ASSERT_WLOCKED();
664 if (clist == NULL || oidp == NULL)
665 return(NULL);
666 e = malloc(sizeof(struct sysctl_ctx_entry), M_SYSCTLOID, M_WAITOK);
667 e->entry = oidp;
668 TAILQ_INSERT_HEAD(clist, e, link);
669 return (e);
670}
671
672/* Find an entry in the context */
673struct sysctl_ctx_entry *

Callers 1

sysctl_add_oidFunction · 0.85

Calls 1

mallocFunction · 0.85

Tested by

no test coverage detected