Sign in
cobalt
/
cobalt
/
97b64f26fb12c9eab352139c26f0b01d1cb6d0b9
/
.
/
third_party
/
musl
/
src
/
thread
/
pthread_attr_setstack.c
blob: 1eddcbd6ebb4f834e54f34f810f8c6795eaa6135 [
file
] [
log
] [
blame
]
#include
"pthread_impl.h"
int
pthread_attr_setstack
(
pthread_attr_t
*
a
,
void
*
addr
,
size_t
size
)
{
if
(
size
-
PTHREAD_STACK_MIN
>
SIZE_MAX
/
4
)
return
EINVAL
;
a
->
_a_stackaddr
=
(
size_t
)
addr
+
size
;
a
->
_a_stacksize
=
size
;
return
0
;
}