linux/arch/x86/ia32/ipc32.c
<<
>>
Prefs
   1#include <linux/kernel.h>
   2#include <linux/spinlock.h>
   3#include <linux/list.h>
   4#include <linux/syscalls.h>
   5#include <linux/time.h>
   6#include <linux/sem.h>
   7#include <linux/msg.h>
   8#include <linux/shm.h>
   9#include <linux/ipc.h>
  10#include <linux/compat.h>
  11#include <asm/sys_ia32.h>
  12
  13asmlinkage long sys32_ipc(u32 call, int first, int second, int third,
  14                          compat_uptr_t ptr, u32 fifth)
  15{
  16        int version;
  17
  18        version = call >> 16; /* hack for backward compatibility */
  19        call &= 0xffff;
  20
  21        switch (call) {
  22        case SEMOP:
  23                /* struct sembuf is the same on 32 and 64bit :)) */
  24                return sys_semtimedop(first, compat_ptr(ptr), second, NULL);
  25        case SEMTIMEDOP:
  26                return compat_sys_semtimedop(first, compat_ptr(ptr), second,
  27                                                compat_ptr(fifth));
  28        case SEMGET:
  29                return sys_semget(first, second, third);
  30        case SEMCTL:
  31                return compat_sys_semctl(first, second, third, compat_ptr(ptr));
  32
  33        case MSGSND:
  34                return compat_sys_msgsnd(first, second, third, compat_ptr(ptr));
  35        case MSGRCV:
  36                return compat_sys_msgrcv(first, second, fifth, third,
  37                                         version, compat_ptr(ptr));
  38        case MSGGET:
  39                return sys_msgget((key_t) first, second);
  40        case MSGCTL:
  41                return compat_sys_msgctl(first, second, compat_ptr(ptr));
  42
  43        case SHMAT:
  44                return compat_sys_shmat(first, second, third, version,
  45                                        compat_ptr(ptr));
  46        case SHMDT:
  47                return sys_shmdt(compat_ptr(ptr));
  48        case SHMGET:
  49                return sys_shmget(first, (unsigned)second, third);
  50        case SHMCTL:
  51                return compat_sys_shmctl(first, second, compat_ptr(ptr));
  52        }
  53        return -ENOSYS;
  54}
  55