mq_notify on x64
register for notification when a message is available
sys_mq_notify(mqd_t mqdes, const struct sigevent *notification)
| number | 244 (0xf4) |
|---|---|
| abi | 64 |
| kconfig | CONFIG_POSIX_MQUEUE |
| family | mqueue see the whole family on x64 |
| entry point | sys_mq_notify |
| since | Linux 3.3 or earlier (3.3 is the first release scanned for x64) |
| man page | mq_notify(2) |
| source | elixir.bootlin.com |
Registers
| register | value |
|---|---|
rax | 244, the syscall number |
rdi | mqd_t mqdes |
rsi | const struct sigevent *notification |
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 281
- arm64 184
- arm 278
- riscv64 184
- ia32 281
- x32 1073742351
- loongarch64 184
- ppc64 266
- ppc 266
- s390x 275
- mips64 5234
- mipsn32 6238
- mipso32 4275
- alpha 436
- arc 184
- blackfin 282, removed in 4.17
- cris 281, removed in 4.17
- csky 184
- frv 281, removed in 4.17
- hexagon 184
- ia64 1266, removed in 6.7
- m32r 281, removed in 4.17
- m68k 275
- metag 184, removed in 4.17
- microblaze 281
- mn10300 281, removed in 4.17
- nds32 184, removed in 5.18
- nios2 184
- openrisc 184
- parisc 233
- score 184, removed in 4.17
- sh 281
- sparc 277
- sparc64 277
- tilegx 184, removed in 4.17
- tilepro 184, removed in 4.17
- xtensa 236
Get this as JSON: https://api.syscall.sh/v2/syscalls/x64/mq_notify