2005-04-16 15:20:36 -07:00
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/spinlock.h>
|
|
|
|
#include <linux/list.h>
|
|
|
|
#include <linux/syscalls.h>
|
|
|
|
#include <linux/time.h>
|
|
|
|
#include <linux/sem.h>
|
|
|
|
#include <linux/msg.h>
|
|
|
|
#include <linux/shm.h>
|
|
|
|
#include <linux/ipc.h>
|
|
|
|
#include <linux/compat.h>
|
2008-12-27 09:07:10 -07:00
|
|
|
#include <asm/sys_ia32.h>
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-01-30 05:30:08 -07:00
|
|
|
asmlinkage long sys32_ipc(u32 call, int first, int second, int third,
|
|
|
|
compat_uptr_t ptr, u32 fifth)
|
2005-04-16 15:20:36 -07:00
|
|
|
{
|
|
|
|
int version;
|
|
|
|
|
|
|
|
version = call >> 16; /* hack for backward compatibility */
|
|
|
|
call &= 0xffff;
|
|
|
|
|
|
|
|
switch (call) {
|
2008-01-30 05:30:08 -07:00
|
|
|
case SEMOP:
|
2005-04-16 15:20:36 -07:00
|
|
|
/* struct sembuf is the same on 32 and 64bit :)) */
|
|
|
|
return sys_semtimedop(first, compat_ptr(ptr), second, NULL);
|
2008-01-30 05:30:08 -07:00
|
|
|
case SEMTIMEDOP:
|
2005-04-16 15:20:36 -07:00
|
|
|
return compat_sys_semtimedop(first, compat_ptr(ptr), second,
|
|
|
|
compat_ptr(fifth));
|
2008-01-30 05:30:08 -07:00
|
|
|
case SEMGET:
|
2005-04-16 15:20:36 -07:00
|
|
|
return sys_semget(first, second, third);
|
2008-01-30 05:30:08 -07:00
|
|
|
case SEMCTL:
|
2005-04-16 15:20:36 -07:00
|
|
|
return compat_sys_semctl(first, second, third, compat_ptr(ptr));
|
|
|
|
|
2008-01-30 05:30:08 -07:00
|
|
|
case MSGSND:
|
2005-04-16 15:20:36 -07:00
|
|
|
return compat_sys_msgsnd(first, second, third, compat_ptr(ptr));
|
2008-01-30 05:30:08 -07:00
|
|
|
case MSGRCV:
|
2005-04-16 15:20:36 -07:00
|
|
|
return compat_sys_msgrcv(first, second, fifth, third,
|
|
|
|
version, compat_ptr(ptr));
|
2008-01-30 05:30:08 -07:00
|
|
|
case MSGGET:
|
2005-04-16 15:20:36 -07:00
|
|
|
return sys_msgget((key_t) first, second);
|
2008-01-30 05:30:08 -07:00
|
|
|
case MSGCTL:
|
2005-04-16 15:20:36 -07:00
|
|
|
return compat_sys_msgctl(first, second, compat_ptr(ptr));
|
|
|
|
|
2008-01-30 05:30:08 -07:00
|
|
|
case SHMAT:
|
2005-04-16 15:20:36 -07:00
|
|
|
return compat_sys_shmat(first, second, third, version,
|
|
|
|
compat_ptr(ptr));
|
2008-01-30 05:30:08 -07:00
|
|
|
case SHMDT:
|
2005-04-16 15:20:36 -07:00
|
|
|
return sys_shmdt(compat_ptr(ptr));
|
2008-01-30 05:30:08 -07:00
|
|
|
case SHMGET:
|
2005-04-16 15:20:36 -07:00
|
|
|
return sys_shmget(first, (unsigned)second, third);
|
2008-01-30 05:30:08 -07:00
|
|
|
case SHMCTL:
|
2005-04-16 15:20:36 -07:00
|
|
|
return compat_sys_shmctl(first, second, compat_ptr(ptr));
|
|
|
|
}
|
|
|
|
return -ENOSYS;
|
|
|
|
}
|