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

Function sys_msgrcv

freebsd/kern/sysv_msg.c:1398–1414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1396}
1397
1398int
1399sys_msgrcv(struct thread *td, struct msgrcv_args *uap)
1400{
1401 int error;
1402 long mtype;
1403
1404 DPRINTF(("call to msgrcv(%d, %p, %zu, %ld, %d)\n", uap->msqid,
1405 uap->msgp, uap->msgsz, uap->msgtyp, uap->msgflg));
1406
1407 if ((error = kern_msgrcv(td, uap->msqid,
1408 (char *)uap->msgp + sizeof(mtype), uap->msgsz,
1409 uap->msgtyp, uap->msgflg, &mtype)) != 0)
1410 return (error);
1411 if ((error = copyout(&mtype, uap->msgp, sizeof(mtype))) != 0)
1412 DPRINTF(("error %d copying the message type\n", error));
1413 return (error);
1414}
1415
1416static int
1417sysctl_msqids(SYSCTL_HANDLER_ARGS)

Callers

nothing calls this directly

Calls 2

kern_msgrcvFunction · 0.85
copyoutFunction · 0.50

Tested by

no test coverage detected