[fpc-devel] OO rewrite - technical questions
Daniël Mantione
daniel.mantione at freepascal.org
Mon Jul 19 21:32:45 CEST 2010
Op Mon, 19 Jul 2010, schreef Hans-Peter Diettrich:
> Michael Schnell schrieb:
>
>> I do know that gcc in Linux on X86 uses a segment register. I don't know
>> how gcc works in Windows, but I suppose even Windows is assumed to restore
>> all register values of a thread after a preemption.
>
> Windows uses segment registers in exception handling, i.e. it should be
> possible. But the segment descriptor/selector must point to the correct
> thread-memory address in the address space, what can not be achieved in
> application code.
Okay, so the Windows kernel sets up the segment registers then by default,
that is interresting to know. But Linux does not, yet libpthread is using
the segment registers. What I find curious is that you can call modify_ldt
sucessfully to setup a segment, but then you cannot use it.
Daniël
More information about the fpc-devel
mailing list