in do_IRQ you can find the following code!
#ifdef CONFIG_DEBUG_STACKOVERFLOW
{
long esp;
__asm__ __volatile__("andl %%esp,%0" :
"=r" (esp) : "0" (THREAD_SIZE - 1));
if (unlikely(esp < (sizeof(struct thread_info) + STACK_WARN))) {
printk("do_IRQ: stack overflow: %ld\n",
esp - sizeof(struct thread_info));
dump_stack();
}
}
#endif
I did not understand the meaning of this assembly asm
asm _volatile _ ("andl %% esp,% 0": "= r" (esp): "0" (THREAD_SIZE - 1)); THREAD_SIZE - 1 means what? I remember the character in the parenthesis should be a C variable, like esp in the output part, but in the input part it looks like an integer, but not the C character, could there be any help
source
share