Files
semi-libc/src/ipc/shmdt.c
T
Szabolcs Nagy 4acfc287d8 ipc: prefer SYS_ipc when it is defined
Linux v5.1 introduced ipc syscalls on targets where previously only
SYS_ipc was available, change the logic such that the ipc code keeps
using SYS_ipc which works backward compatibly on older kernels.

This changes behaviour on microblaze which had both mechanisms, now
SYS_ipc will be used instead of separate syscalls.
2019-07-01 14:17:59 -04:00

13 lines
209 B
C

#include <sys/shm.h>
#include "syscall.h"
#include "ipc.h"
int shmdt(const void *addr)
{
#ifndef SYS_ipc
return syscall(SYS_shmdt, addr);
#else
return syscall(SYS_ipc, IPCOP_shmdt, 0, 0, 0, addr);
#endif
}