Sign in
cobalt
/
cobalt
/
08336faa599332e3e3bf29b7ad38ef023018b55e
/
.
/
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
;
}