mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
ST: Simplify it, only Linux/Darwin, epoll/kqueue, single process. 5.0.2
commit f4872e528cad07f8ea683cc8cb26e34111bad1b5 Author: winlin <winlin@vip.126.com> Date: Fri Feb 26 09:13:21 2021 +0800 ST: For #2188: Remove sendmmsg from ST. commit aaeb8919bd4a026268e0600398cb1e9ad477663f Author: winlin <winlin@vip.126.com> Date: Thu Mar 11 08:09:54 2021 +0800 ST: Refine utest script. commit d1ac9da53060b6bfa82b5d041da4c2ad9bd6b90a Author: winlin <winlin@vip.126.com> Date: Wed Mar 3 11:02:25 2021 +0800 ST: Support fast utest and coverage commit 8400115b83c022e33f59422dbf6d85ee46fb9edb Author: winlin <winlin@vip.126.com> Date: Fri Feb 26 07:02:19 2021 +0800 ST: Always use unserialized accept for linux or darwin commit c3686f2bca80d2c139239b08975575b1bb981ffa Author: winlin <winlin@vip.126.com> Date: Fri Feb 26 06:54:05 2021 +0800 ST: Refine ARFLAGS by disable the verbose log commit aaa5c4f863eba278c4ed2b29a46297fb01a4ed63 Author: winlin <winlin@vip.126.com> Date: Thu Feb 25 08:58:46 2021 +0800 ST: Stack always grows from top to down. commit dddd466e5c2e418c6f4896cd8bf701130052b3d9 Author: winlin <winlin@vip.126.com> Date: Thu Feb 25 08:51:31 2021 +0800 ST: Ignore process fork, for single process only commit 7906cb5f6e78c916cb8b8d9522275bfc086bb6a3 Author: winlin <winlin@vip.126.com> Date: Thu Feb 25 08:50:59 2021 +0800 ST: Fix build warnings commit d94921b84a3b6cf88ace2c766cc2bfedb9c0602e Author: winlin <winlin@vip.126.com> Date: Thu Feb 25 07:27:45 2021 +0800 ST: Remove select and poll support, only epoll and kqueue commit 76d202514615f78d1a8f2b15778f3dac5abf4abb Author: winlin <winlin@vip.126.com> Date: Thu Feb 25 07:10:47 2021 +0800 ST: Remove multiple OS support, except Linux and Darwin. commit 13c4ba345c61170e86dde486a174378ca235f442 Author: winlin <winlin@vip.126.com> Date: Thu Feb 25 06:59:35 2021 +0800 ST: Remove __ia64__ CPU support commit 46c06e4a11879cfeb828382e44f11287782ce4b5 Author: winlin <winlin@vip.126.com> Date: Wed Feb 24 11:37:27 2021 +0800 ST: Remove unused files for ST
This commit is contained in:
parent
9709ca3b7e
commit
442cf615c0
37 changed files with 116 additions and 6176 deletions
48
trunk/3rdparty/st-srs/sched.c
vendored
48
trunk/3rdparty/st-srs/sched.c
vendored
|
@ -503,10 +503,15 @@ void _st_del_sleep_q(_st_thread_t *thread)
|
|||
void _st_vp_check_clock(void)
|
||||
{
|
||||
_st_thread_t *thread;
|
||||
st_utime_t elapsed, now;
|
||||
|
||||
st_utime_t now;
|
||||
#if defined(DEBUG) && defined(DEBUG_STATS)
|
||||
st_utime_t elapsed;
|
||||
#endif
|
||||
|
||||
now = st_utime();
|
||||
#if defined(DEBUG) && defined(DEBUG_STATS)
|
||||
elapsed = now < _ST_LAST_CLOCK? 0 : now - _ST_LAST_CLOCK; // Might step back.
|
||||
#endif
|
||||
_ST_LAST_CLOCK = now;
|
||||
|
||||
#if defined(DEBUG) && defined(DEBUG_STATS)
|
||||
|
@ -620,9 +625,6 @@ _st_thread_t *st_thread_create(void *(*start)(void *arg), void *arg, int joinabl
|
|||
_st_stack_t *stack;
|
||||
void **ptds;
|
||||
char *sp;
|
||||
#ifdef __ia64__
|
||||
char *bsp;
|
||||
#endif
|
||||
|
||||
/* Adjust stack size */
|
||||
if (stk_size == 0)
|
||||
|
@ -633,23 +635,7 @@ _st_thread_t *st_thread_create(void *(*start)(void *arg), void *arg, int joinabl
|
|||
return NULL;
|
||||
|
||||
/* Allocate thread object and per-thread data off the stack */
|
||||
#if defined (MD_STACK_GROWS_DOWN)
|
||||
sp = stack->stk_top;
|
||||
#ifdef __ia64__
|
||||
/*
|
||||
* 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 -= (stk_size >> 1);
|
||||
bsp = sp;
|
||||
/* Make register stack 64-byte aligned */
|
||||
if ((unsigned long)bsp & 0x3f)
|
||||
bsp = bsp + (0x40 - ((unsigned long)bsp & 0x3f));
|
||||
stack->bsp = bsp + _ST_STACK_PAD_SIZE;
|
||||
#endif
|
||||
sp = sp - (ST_KEYS_MAX * sizeof(void *));
|
||||
ptds = (void **) sp;
|
||||
sp = sp - sizeof(_st_thread_t);
|
||||
|
@ -659,21 +645,7 @@ _st_thread_t *st_thread_create(void *(*start)(void *arg), void *arg, int joinabl
|
|||
if ((unsigned long)sp & 0x3f)
|
||||
sp = sp - ((unsigned long)sp & 0x3f);
|
||||
stack->sp = sp - _ST_STACK_PAD_SIZE;
|
||||
#elif defined (MD_STACK_GROWS_UP)
|
||||
sp = stack->stk_bottom;
|
||||
thread = (_st_thread_t *) sp;
|
||||
sp = sp + sizeof(_st_thread_t);
|
||||
ptds = (void **) sp;
|
||||
sp = sp + (ST_KEYS_MAX * sizeof(void *));
|
||||
|
||||
/* Make stack 64-byte aligned */
|
||||
if ((unsigned long)sp & 0x3f)
|
||||
sp = sp + (0x40 - ((unsigned long)sp & 0x3f));
|
||||
stack->sp = sp + _ST_STACK_PAD_SIZE;
|
||||
#else
|
||||
#error Unknown OS
|
||||
#endif
|
||||
|
||||
|
||||
memset(thread, 0, sizeof(_st_thread_t));
|
||||
memset(ptds, 0, ST_KEYS_MAX * sizeof(void *));
|
||||
|
||||
|
@ -683,7 +655,6 @@ _st_thread_t *st_thread_create(void *(*start)(void *arg), void *arg, int joinabl
|
|||
thread->start = start;
|
||||
thread->arg = arg;
|
||||
|
||||
#ifndef __ia64__
|
||||
/* Merge from https://github.com/michaeltalyansky/state-threads/commit/cce736426c2320ffec7c9820df49ee7a18ae638c */
|
||||
#if defined(__arm__) && !defined(MD_USE_BUILTIN_SETJMP) && __GLIBC_MINOR__ >= 19
|
||||
volatile void * lsp = PTR_MANGLE(stack->sp);
|
||||
|
@ -693,9 +664,6 @@ _st_thread_t *st_thread_create(void *(*start)(void *arg), void *arg, int joinabl
|
|||
#else
|
||||
_ST_INIT_CONTEXT(thread, stack->sp, _st_thread_main);
|
||||
#endif
|
||||
#else
|
||||
_ST_INIT_CONTEXT(thread, stack->sp, stack->bsp, _st_thread_main);
|
||||
#endif
|
||||
|
||||
/* If thread is joinable, allocate a termination condition variable */
|
||||
if (joinable) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue