]> git.proxmox.com Git - wasi-libc.git/commitdiff
wasi_thread_start: add a comment (#371)
authorYAMAMOTO Takashi <yamamoto@midokura.com>
Fri, 23 Dec 2022 14:14:21 +0000 (23:14 +0900)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 2 Aug 2023 10:24:08 +0000 (12:24 +0200)
libc-top-half/musl/src/thread/pthread_create.c

index 12fccc7a7e223ffa0b5620e518223ab906ec381c..602d503d7d20770a324415fb502cd4ddce2c24dd 100644 (file)
@@ -277,6 +277,11 @@ static int start_c11(void *p)
 __attribute__((export_name("wasi_thread_start")))
 void wasi_thread_start(int tid, void *p)
 {
+       /*
+        * Note: it's fragile to implement wasi_thread_start in C.
+        * On entry, we don't even have C stack (__stack_pointer)
+        * set up. Be careful when modifying this function.
+        */
        struct start_args *args = p;
        __asm__(".globaltype __tls_base, i32\n"
                        "local.get %0\n"