From 167217bec15c9c7aa70ba2a3dc9c689b3cd91872 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Mon, 14 May 2001 14:19:32 +0000 Subject: import new version of dietlibc --- mdk-stage1/dietlibc/sparc/shmat.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 mdk-stage1/dietlibc/sparc/shmat.c (limited to 'mdk-stage1/dietlibc/sparc/shmat.c') diff --git a/mdk-stage1/dietlibc/sparc/shmat.c b/mdk-stage1/dietlibc/sparc/shmat.c new file mode 100644 index 000000000..73b2d89a9 --- /dev/null +++ b/mdk-stage1/dietlibc/sparc/shmat.c @@ -0,0 +1,19 @@ +#include +#include +#include +#include + +extern void* __ipc(); + +#ifndef PAGE_SIZE +#define PAGE_SIZE 4096 +#endif + +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)PAGE_SIZE) + result=raddr; + return result; +} -- cgit v1.2.1