projects
/
oweals
/
musl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
use bss instead of mmap for main thread's pthread thread-specific data
[oweals/musl.git]
/
src
/
thread
/
pthread_join.c
1
#include "pthread_impl.h"
2
3
int pthread_join(pthread_t t, void **res)
4
{
5
int tmp = t->tid;
6
CANCELPT_BEGIN;
7
if (tmp) __wait(&t->tid, 0, tmp, 1);
8
CANCELPT_END;
9
if (res) *res = t->result;
10
if (t->map_base) munmap(t->map_base, t->map_size);
11
return 0;
12
}