1
0
Fork 0
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:
winlin 2024-08-22 11:32:12 +08:00
parent ff6a608099
commit 55610cf689
2 changed files with 42 additions and 46 deletions

View file

@ -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);
}