mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 20:01:56 +00:00
Merge branch 'srs.master'
This commit is contained in:
commit
922cdc5512
1 changed files with 7 additions and 0 deletions
|
@ -546,6 +546,13 @@ _st_thread_t *st_thread_create(void *(*start)(void *arg), void *arg, int joinabl
|
||||||
/* Allocate thread object and per-thread data off the stack */
|
/* Allocate thread object and per-thread data off the stack */
|
||||||
#if defined (MD_STACK_GROWS_DOWN)
|
#if defined (MD_STACK_GROWS_DOWN)
|
||||||
sp = stack->stk_top;
|
sp = stack->stk_top;
|
||||||
|
/*
|
||||||
|
* The stack segment is split in the middle. The upper half is used
|
||||||
|
* as backing store for the register stack which grows upward.
|
||||||
|
* The lower half is used for the traditional memory stack which
|
||||||
|
* grows downward. Both stacks start in the middle and grow outward
|
||||||
|
* from each other.
|
||||||
|
*/
|
||||||
sp = sp - (ST_KEYS_MAX * sizeof(void *));
|
sp = sp - (ST_KEYS_MAX * sizeof(void *));
|
||||||
ptds = (void **) sp;
|
ptds = (void **) sp;
|
||||||
sp = sp - sizeof(_st_thread_t);
|
sp = sp - sizeof(_st_thread_t);
|
||||||
|
|
Loading…
Reference in a new issue