1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

For #2689, Support loongarch, loongson CPU. v5.0.19

This commit is contained in:
winlin 2021-10-24 13:29:14 +08:00
parent a86f3905b2
commit 5b44cc6a17
11 changed files with 3481 additions and 6 deletions

View file

@ -187,6 +187,11 @@
#define MD_USE_BUILTIN_SETJMP
#define MD_GET_SP(_t) *((long *)&((_t)->context[0].__jb[0]))
#elif defined(__loongarch__)
/* https://github.com/ossrs/state-threads/issues/24 */
#define MD_USE_BUILTIN_SETJMP
#define MD_GET_SP(_t) *((long *)&((_t)->context[0].__jmpbuf[0]))
#else
#error "Unknown CPU architecture"
#endif /* Cases with common MD_INIT_CONTEXT and different SP locations */