Task Switching Page Dir
Posted: Thu Sep 22, 2011 5:25 pm
So guys I've got a problem, every time I load a task, shared page directory is created that will be used with all threads,
A threads gets it's own registers stacks, page directory, etc.
Now Thread's stack starts @ 0xBFFFFFFF (Doesn't really matter) and I create a page for it, but when this thread tries to create a new page directory, it is as if I write to the same stack( Because this thread gets corrupted and the other is never called, I've actually checked), but if I change so that each thread gets it's own address(0xBFFFEFFF, for example) everything is fine, to an extent.
Any help on how to properly, link page directories + copy the data into the new directory without corruption.
A threads gets it's own registers stacks, page directory, etc.
Now Thread's stack starts @ 0xBFFFFFFF (Doesn't really matter) and I create a page for it, but when this thread tries to create a new page directory, it is as if I write to the same stack( Because this thread gets corrupted and the other is never called, I've actually checked), but if I change so that each thread gets it's own address(0xBFFFEFFF, for example) everything is fine, to an extent.
Any help on how to properly, link page directories + copy the data into the new directory without corruption.