Flux OSKit 中 trap_state 的存放位置

Aiur · Zellux at 
写 fork 函数的时候发现实际传给 trap handler 的 ts 地址和用(struct trap_state *) (KSTACK_TOP(old))) - 1 计算出来的结果不一样,后者比前者小 0x10。另外 ts 的实际地址加上 ts 的大小(92 个字节)后就超出了内核栈的范围。/* * This structure corresponds to the state of user registers * as saved upon kernel trap/interrupt entry. * As always, it is only a default implement……