repo.or.cz
/
musl.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
ipc: prefer SYS_ipc when it is defined
[musl.git]
/
src
/
ipc
/
shmget.c
blob
7521b5fa3fcab7ed55260bcca5b7cbe9d6b77482
1
#include <sys/shm.h>
2
#include <stdint.h>
3
#include
"syscall.h"
4
#include
"ipc.h"
5
6
int
shmget
(
key_t key
,
size_t
size
,
int
flag
)
7
{
8
if
(
size
>
PTRDIFF_MAX
)
size
=
SIZE_MAX
;
9
#ifndef SYS_ipc
10
return
syscall
(
SYS_shmget
,
key
,
size
,
flag
);
11
#else
12
return
syscall
(
SYS_ipc
,
IPCOP_shmget
,
key
,
size
,
flag
);
13
#endif
14
}