Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Difference between _coroutine_begin & _coroutine_setcontext #54

Closed
flybrotherlixiang opened this issue Mar 20, 2019 · 1 comment
Assignees

Comments

@flybrotherlixiang
Copy link

I checked the implementation of _coroutine_begin and _coroutine_setcontext in coroutine_context.s and it appears that _coroutine_begin uses x9 as return address and _coroutine_setcontext uses x30.

Why is that necessary?

@pengyutang125
Copy link
Contributor

_coroutine_begin and _coroutine_setcontext are almost the same, but _coroutine_begin will set the lr register to 0, it can make your debug stack more clear

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants