Skip to content

Commit cd87926

Browse files
yamtjohn-sharratt
authored andcommitted
wasi_thread_start: add a comment (WebAssembly#371)
1 parent 82ac6ee commit cd87926

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libc-top-half/musl/src/thread/pthread_create.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,11 @@ static int start_c11(void *p)
274274
__attribute__((export_name("wasi_thread_start")))
275275
void wasi_thread_start(int tid, void *p)
276276
{
277+
/*
278+
* Note: it's fragile to implement wasi_thread_start in C.
279+
* On entry, we don't even have C stack (__stack_pointer)
280+
* set up. Be careful when modifying this function.
281+
*/
277282
struct start_args *args = p;
278283
__asm__(".globaltype __tls_base, i32\n"
279284
"local.get %0\n"

0 commit comments

Comments
 (0)