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

Function sys_kmq_open

freebsd/kern/uipc_mqueue.c:2119–2135  ·  view source on GitHub ↗

* Syscall to open a message queue. */

Source from the content-addressed store, hash-verified

2117 * Syscall to open a message queue.
2118 */
2119int
2120sys_kmq_open(struct thread *td, struct kmq_open_args *uap)
2121{
2122 struct mq_attr attr;
2123 int flags, error;
2124
2125 if ((uap->flags & O_ACCMODE) == O_ACCMODE || uap->flags & O_EXEC)
2126 return (EINVAL);
2127 flags = FFLAGS(uap->flags);
2128 if ((flags & O_CREAT) != 0 && uap->attr != NULL) {
2129 error = copyin(uap->attr, &attr, sizeof(attr));
2130 if (error)
2131 return (error);
2132 }
2133 return (kern_kmq_open(td, uap->path, flags, uap->mode,
2134 uap->attr != NULL ? &attr : NULL));
2135}
2136
2137/*
2138 * Syscall to unlink a message queue.

Callers 1

linux_mq_openFunction · 0.85

Calls 2

kern_kmq_openFunction · 0.85
copyinFunction · 0.50

Tested by

no test coverage detected