source:
EcnlProtoTool/trunk/musl-1.1.18/src/ipc/shmat.c
Last change on this file was 444, checked in by , 4 years ago | |
---|---|
|
|
File size: 396 bytes |
Rev | Line | |
---|---|---|
[444] | 1 | #include <sys/shm.h> |
2 | #include "syscall.h" | |
3 | #include "ipc.h" | |
4 | ||
5 | #ifdef SYS_shmat | |
6 | void *shmat(int id, const void *addr, int flag) | |
7 | { | |
8 | return (void *)syscall(SYS_shmat, id, addr, flag); | |
9 | } | |
10 | #else | |
11 | void *shmat(int id, const void *addr, int flag) | |
12 | { | |
13 | unsigned long ret; | |
14 | ret = syscall(SYS_ipc, IPCOP_shmat, id, flag, &addr, addr); | |
15 | return (ret > -(unsigned long)SHMLBA) ? (void *)ret : (void *)addr; | |
16 | } | |
17 | #endif |
Note:
See TracBrowser
for help on using the repository browser.