flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > threading and stack pointers |
Author |
|
cod3b453 22 Feb 2007, 17:17
Ideally, everything needs to be saved in order for the state in which a thread executes never changes and not have to worry about which registers a thread can and can't use. So each thread needs to have an allocated register store for GPRs including selectors and flags (mov, pushf, popf), FPU (fsave, frstore) and SSE (fxstore, fxrstor) in a lookup table somewhere in memory.
Where you put this table is up to you, just make sure its in ring 0 memory and your OS keeps track of the base address and size of the table, the entries can then be found using the thread's id as an offset. |
|||
22 Feb 2007, 17:17 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.