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.
13 lines
235 B
C
13 lines
235 B
C
#include <sys/sem.h>
|
|
#include "syscall.h"
|
|
#include "ipc.h"
|
|
|
|
int semop(int id, struct sembuf *buf, size_t n)
|
|
{
|
|
#ifndef SYS_ipc
|
|
return syscall(SYS_semop, id, buf, n);
|
|
#else
|
|
return syscall(SYS_ipc, IPCOP_semop, id, n, 0, buf);
|
|
#endif
|
|
}
|