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

Function msgbufinit

freebsd/kern/subr_prf.c:1026–1048  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1024}
1025
1026void
1027msgbufinit(void *ptr, int size)
1028{
1029 char *cp;
1030 static struct msgbuf *oldp = NULL;
1031 bool print_boot_tag;
1032
1033 size -= sizeof(*msgbufp);
1034 cp = (char *)ptr;
1035 print_boot_tag = !msgbufmapped;
1036 /* Attempt to fetch kern.boot_tag tunable on first mapping */
1037 if (!msgbufmapped)
1038 TUNABLE_STR_FETCH("kern.boot_tag", current_boot_tag,
1039 sizeof(current_boot_tag));
1040 msgbufp = (struct msgbuf *)(cp + size);
1041 msgbuf_reinit(msgbufp, cp, size);
1042 if (msgbufmapped && oldp != msgbufp)
1043 msgbuf_copy(oldp, msgbufp);
1044 msgbufmapped = true;
1045 if (print_boot_tag && *current_boot_tag != '\0')
1046 printf("%s\n", current_boot_tag);
1047 oldp = msgbufp;
1048}
1049
1050/* Sysctls for accessing/clearing the msgbuf */
1051static int

Callers 7

vm86_initialize_paeFunction · 0.85
vm86_initialize_nopaeFunction · 0.85
init386Function · 0.85
pmap_bootstrapFunction · 0.85
hammer_timeFunction · 0.85
initarmFunction · 0.85
initarmFunction · 0.85

Calls 3

msgbuf_reinitFunction · 0.85
msgbuf_copyFunction · 0.85
printfFunction · 0.70

Tested by

no test coverage detected