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

Function msg_freehdr

freebsd/kern/sysv_msg.c:386–410  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

384MODULE_VERSION(sysvmsg, 1);
385
386static void
387msg_freehdr(struct msg *msghdr)
388{
389 while (msghdr->msg_ts > 0) {
390 short next;
391 if (msghdr->msg_spot < 0 || msghdr->msg_spot >= msginfo.msgseg)
392 panic("msghdr->msg_spot out of range");
393 next = msgmaps[msghdr->msg_spot].next;
394 msgmaps[msghdr->msg_spot].next = free_msgmaps;
395 free_msgmaps = msghdr->msg_spot;
396 nfree_msgmaps++;
397 msghdr->msg_spot = next;
398 if (msghdr->msg_ts >= msginfo.msgssz)
399 msghdr->msg_ts -= msginfo.msgssz;
400 else
401 msghdr->msg_ts = 0;
402 }
403 if (msghdr->msg_spot != -1)
404 panic("msghdr->msg_spot != -1");
405 msghdr->msg_next = free_msghdrs;
406 free_msghdrs = msghdr;
407#ifdef MAC
408 mac_sysvmsg_cleanup(msghdr);
409#endif
410}
411
412static void
413msq_remove(struct msqid_kernel *msqkptr)

Callers 3

msq_removeFunction · 0.85
kern_msgsndFunction · 0.85
kern_msgrcvFunction · 0.85

Calls 2

mac_sysvmsg_cleanupFunction · 0.85
panicFunction · 0.70

Tested by

no test coverage detected