Msgget implements msgget(2).
(t *kernel.Task, sysno uintptr, args arch.SyscallArguments)
| 27 | |
| 28 | // Msgget implements msgget(2). |
| 29 | func Msgget(t *kernel.Task, sysno uintptr, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error) { |
| 30 | key := ipc.Key(args[0].Int()) |
| 31 | flag := args[1].Int() |
| 32 | |
| 33 | private := key == linux.IPC_PRIVATE |
| 34 | create := flag&linux.IPC_CREAT == linux.IPC_CREAT |
| 35 | exclusive := flag&linux.IPC_EXCL == linux.IPC_EXCL |
| 36 | mode := linux.FileMode(flag & 0777) |
| 37 | |
| 38 | r := t.IPCNamespace().MsgqueueRegistry() |
| 39 | queue, err := r.FindOrCreate(t, key, mode, private, create, exclusive) |
| 40 | if err != nil { |
| 41 | return 0, nil, err |
| 42 | } |
| 43 | return uintptr(queue.ID()), nil, nil |
| 44 | } |
| 45 | |
| 46 | // Msgsnd implements msgsnd(2). |
| 47 | func Msgsnd(t *kernel.Task, sysno uintptr, args arch.SyscallArguments) (uintptr, *kernel.SyscallControl, error) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…