On this platform, the pcb is allocated from the top of the kernel
stack, so it should be excluded from the total size. This makes it
consistent with other implementations.
Details
Details
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 42282 Build 39170: arc lint + arc unit
Event Timeline
Comment Actions
Doesn't this mean that in principle used might become larger than total? I think you need to base both on get_pcb_td() then.
Also did you considered using e.g. __builtin_frame_address(0) instead of &td?
Comment Actions
I suppose using &td might produce a less consistent result than __builtin_frame_address(0)? Since (I assume) there is no guarantee from the compiler that td is actually the topmost item on the stack.
Still, &td is in use now and I will just stick with this unless there's a compelling reason not to.
Comment Actions
I wonder if it is better to do something like this
register u_long esp __asm ("esp");
and then use esp instead of &td.
Apparently this works with gcc but not clang. Sigh.
sys/i386/include/proc.h | ||
---|---|---|
78–81 |