Skip to content

Commit ebd3240

Browse files
authored
wasi_thread_start: add a comment (#371)
1 parent b8aa399 commit ebd3240

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

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

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

0 commit comments

Comments
 (0)