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

关于非中断导致的线程切换为什么没有保存线程的上下文 #7

Open
xiaozuobo opened this issue Apr 8, 2024 · 3 comments

Comments

@xiaozuobo
Copy link

通过中断导致进程切换时,中断通用操作中有保护上下文的操作,但是为什么信号量导致的线程切换没有保护上下文,是不需要么?

@fzmyg
Copy link

fzmyg commented Apr 22, 2024

同问

@Ares-bit
Copy link

通过中断导致进程切换时,中断通用操作中有保护上下文的操作,但是为什么信号量导致的线程切换没有保护上下文,是不需要么?

纯C之间调用编译器帮你生成了保存上下文的语句,不需要自己再写了,中断是自己实现的纯汇编,要手动pushad

@Ares-bit
Copy link

同问

纯C之间调用编译器帮你生成了保存上下文的语句,不需要自己再写了,中断是自己实现的纯汇编,要手动pushad

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