mq_unlink on x64
remove a message queue
sys_mq_unlink(const char *name)
| number | 241 (0xf1) |
|---|---|
| abi | common |
| kconfig | CONFIG_POSIX_MQUEUE |
| family | mqueue see the whole family on x64 |
| entry point | sys_mq_unlink |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | mq_unlink(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 241, the syscall number |
rdi | const char *name |
rax | the return value |
Then run syscall to enter the kernel.
The syscall instruction clobbers rcx (the return address lands in rcx) and r11 (the flags land in r11).
Since Linux 5.14 the kernel reads the syscall number from eax and ignores the upper 32 bits of rax. Older kernels fail with ENOSYS when those bits are not zero, and mov eax, N clears them, so it works on both.
Same syscall on other architectures
- x86 278
- arm64 181
- arm 275
- riscv64 181
- ia32 278
- x32 1073742065
- loongarch64 181
- ppc64 263
- ppc 263
- s390x 272
- mips64 5231
- mipsn32 6235
- mipso32 4272
- alpha 433
- arc 181
- blackfin 279, removed in 4.17
- cris 278, removed in 4.17
- csky 181
- frv 278, removed in 4.17
- hexagon 181
- ia64 1263, removed in 6.7
- m32r 278, removed in 4.17
- m68k 272
- metag 181, removed in 4.17
- microblaze 278
- mn10300 278, removed in 4.17
- nds32 181, removed in 5.18
- nios2 181
- openrisc 181
- parisc 230
- score 181, removed in 4.17
- sh 278
- sparc 274
- sparc64 274
- tilegx 181, removed in 4.17
- tilepro 181, removed in 4.17
- xtensa 233
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/mq_unlink