diff options
Diffstat (limited to 'components/lwp/lwp.c')
| -rw-r--r-- | components/lwp/lwp.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/components/lwp/lwp.c b/components/lwp/lwp.c index c27f4ca172..96ebdd866c 100644 --- a/components/lwp/lwp.c +++ b/components/lwp/lwp.c @@ -1403,3 +1403,17 @@ void lwp_user_setting_restore(rt_thread_t thread) } } #endif /* ARCH_MM_MMU */ + +void lwp_uthread_ctx_save(void *ctx) +{ + rt_thread_t thread; + thread = rt_thread_self(); + thread->user_ctx.ctx = ctx; +} + +void lwp_uthread_ctx_restore(void) +{ + rt_thread_t thread; + thread = rt_thread_self(); + thread->user_ctx.ctx = RT_NULL; +} |
