Rev 3593 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3593 | Serge | 1 | #include |
2 | |||
3 | void init_reent(); |
||
4 | |||
5 | void __attribute__((noreturn)) |
||
6 | __thread_startup (int (*entry)(void*), void *param, |
||
7 | void *stacklow, void *stackhigh) |
||
8 | { |
||
9 | int retval; |
||
10 | |||
11 | __asm__ __volatile__( // save stack limits |
||
3805 | Serge | 12 | "movl %0, %%fs:8 \n\t" // use TLS |
13 | "movl %1, %%fs:12 \n\t" |
||
3593 | Serge | 14 | ::"r"(stacklow), "r"(stackhigh)); |
15 | |||
16 | init_reent(); // initialize thread reentry structure |
||
17 | |||
18 | retval = entry(param); // call user thread function |
||
19 | |||
20 | _exit(retval); |
||
21 | }; |
||
22 |