blob: c6ee4007a786855b41531f0a04679561d7493f32 (
plain) (
tree)
|
|
#include <sys/shm.h>
#include "syscall.h"
#include "ipc.h"
#ifdef __NR_shmat
void *shmat(int id, const void *addr, int flag)
{
return (void *)syscall(SYS_shmat, id, addr, flag);
}
#else
void *shmat(int id, const void *addr, int flag)
{
unsigned long ret;
ret = syscall(SYS_ipc, IPCOP_shmat, id, flag, &addr, addr);
return (ret > -(unsigned long)SHMLBA) ? (void *)ret : (void *)addr;
}
#endif
|