慢慢欣赏linux 用户栈与内核栈

int copy_thread_tls(unsigned long clone_flags, unsigned long sp,
	unsigned long arg, struct task_struct *p, unsigned long tls)
{
	struct pt_regs *childregs = task_pt_regs(p);
	=>#define task_pt_regs(task) \
	({									\
		unsigned long __ptr = (unsigned long)task_stack_page(task);	\
		__ptr += THREAD_SIZE - TOP_OF_KERNEL_STACK_PADDING;		\
		((struct pt_regs *)__ptr) - 1;					\
	})
		=>#define task_stack_page(task)	((void *)(task)->stack)
}

linux 内核原理学习----80x86保护模式编程二head.s
http://blog.sina.com.cn/s/blog_929354e80101ox0b.html

linux用户栈和内核栈解析
https://blog.csdn.net/u010383937/article/details/78320646

linux内核栈与用户栈
http://blog.chinaunix.net/uid-9185047-id-445158.html

linux为什么需要内核栈,系统调用时直接使用用户栈不行吗?
https://www.zhihu.com/question/43699081/answer/1060669706

linux 进程内核栈
https://zhuanlan.zhihu.com/p/296750228

linux内核栈与用户栈
https://blog.51cto.com/19880512/274610

Linux 中的各种栈:进程栈 线程栈 内核栈 中断栈
https://blog.csdn.net/yangkuanqaz85988/article/details/52403726

内核抢占
https://blog.csdn.net/weixin_37571125/article/details/77773048

结合中断上下文切换和进程上下文切换分析Linux内核一般执行过程
https://cnblogs.com/kttme/p/13130448.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值