mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
ST: Refine switch context.
This commit is contained in:
parent
ff6a608099
commit
55610cf689
2 changed files with 42 additions and 46 deletions
18
trunk/3rdparty/st-srs/common.c
vendored
18
trunk/3rdparty/st-srs/common.c
vendored
|
@ -3,21 +3,3 @@
|
|||
|
||||
#include "common.h"
|
||||
|
||||
void _st_switch_context(_st_thread_t *thread)
|
||||
{
|
||||
ST_SWITCH_OUT_CB(thread);
|
||||
|
||||
if (!_st_md_cxt_save(thread->context)) {
|
||||
_st_vp_schedule();
|
||||
}
|
||||
|
||||
ST_DEBUG_ITERATE_THREADS();
|
||||
ST_SWITCH_IN_CB(thread);
|
||||
}
|
||||
|
||||
void _st_restore_context(_st_thread_t *thread)
|
||||
{
|
||||
_st_this_thread = thread;
|
||||
_st_md_cxt_restore(thread->context, 1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue