summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/lib/shmat.c
blob: d4b34c120e97f7923bbba54dc2a012ab0276d166 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>

extern void* __ipc(int,int,int,void*,const void*);

void* shmat(int shmid,const void* shmaddr,int shmflg) {
  void* raddr;
  register void* result;
  result=__ipc(SHMAT,shmid,shmflg,&raddr,shmaddr);
  if ((unsigned long)result <= -(unsigned long)8196)
    result=raddr;
  return result;
}