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

Function freebsd32_kmq_open

freebsd/kern/uipc_mqueue.c:2753–2771  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2751}
2752
2753int
2754freebsd32_kmq_open(struct thread *td, struct freebsd32_kmq_open_args *uap)
2755{
2756 struct mq_attr attr;
2757 struct mq_attr32 attr32;
2758 int flags, error;
2759
2760 if ((uap->flags & O_ACCMODE) == O_ACCMODE || uap->flags & O_EXEC)
2761 return (EINVAL);
2762 flags = FFLAGS(uap->flags);
2763 if ((flags & O_CREAT) != 0 && uap->attr != NULL) {
2764 error = copyin(uap->attr, &attr32, sizeof(attr32));
2765 if (error)
2766 return (error);
2767 mq_attr_from32(&attr32, &attr);
2768 }
2769 return (kern_kmq_open(td, uap->path, flags, uap->mode,
2770 uap->attr != NULL ? &attr : NULL));
2771}
2772
2773int
2774freebsd32_kmq_setattr(struct thread *td, struct freebsd32_kmq_setattr_args *uap)

Callers

nothing calls this directly

Calls 3

mq_attr_from32Function · 0.85
kern_kmq_openFunction · 0.85
copyinFunction · 0.50

Tested by

no test coverage detected