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
fix support for initialized TLS in static PIE binaries
[musl.git]
/
src
/
ipc
/
shmget.c
blob
b44f9d680a75ad430e12d857d7b9314bc3089fd9
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
#ifdef SYS_shmget
10
return
syscall
(
SYS_shmget
,
key
,
size
,
flag
);
11
#else
12
return
syscall
(
SYS_ipc
,
IPCOP_shmget
,
key
,
size
,
flag
);
13
#endif
14
}