mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
never use stack variable for setjmp
This commit is contained in:
parent
2c01f7e943
commit
8327a57b7e
1 changed files with 680 additions and 681 deletions
3
trunk/research/st/sched.c
Normal file → Executable file
3
trunk/research/st/sched.c
Normal file → Executable file
|
@ -596,8 +596,7 @@ _st_thread_t *st_thread_create(void *(*start)(void *arg), void *arg, int joinabl
|
|||
trd->context[0].__jmpbuf[0].__pc = (__ptr_t) _st_thread_main;
|
||||
trd->context[0].__jmpbuf[0].__sp = stack->sp;
|
||||
#else
|
||||
int ret_setjmp = 0;
|
||||
if ((ret_setjmp = MD_SETJMP((trd)->context)) != 0) {
|
||||
if (MD_SETJMP((trd)->context)) {
|
||||
_st_thread_main();
|
||||
}
|
||||
MD_GET_SP(trd) = (long) (stack->sp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue