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 erroneous pthread_cond_wait mutex waiter count logic due to typo
[musl.git]
/
src
/
ipc
/
ftok.c
blob
c36b4b6003af532305ac2b461616d219f11f31b2
1
#include <sys/ipc.h>
2
#include <sys/stat.h>
3
4
key_t
ftok
(
const char
*
path
,
int
id
)
5
{
6
struct
stat st
;
7
if
(
stat
(
path
, &
st
) <
0
)
return
-
1
;
8
9
return
((
st
.
st_ino
&
0xffff
) | ((
st
.
st_dev
&
0xff
) <<
16
) | ((
id
&
0xff
u
) <<
24
));
10
}