Boost logo

Boost :

Subject: Re: [boost] review request for boost.context
From: Oliver Kowalke (k-oli_at_[hidden])
Date: 2010-07-28 13:52:12


Am 28.07.2010 19:21, schrieb Hartmut Kaiser:
>> The TIB is not changed (only the pointers pointing to the limit and base
>> of the stack).
>
> That will result in problems, I'm sure - at least as soon as you start
> moving context's between threads.

Hmm - boost.fiber uses boost.context and has some tests moving the boost
fibers between boost threads.
I didn't get errors until now =:o
Could you describe a scenario which will trigger an error, please?

>> AFAIK migrating Win32 Fibers between threads is not possible and cloning
>> also not - but maybe I'm wrong in this point.
>
> Moving Windows fibers between threads is definitely possible.

Isn't the TIB accessible over fs register? At least SEH handler is
accessed via fs:[0] and the structure of TIB can be accessed from fs:[0].
Wouldn't be the content of fs:[0] another if I move a Win32 fiber to
another thread (pointing to another TIB -> see stakc base and limit in
TIB)? Or do I have to use a special function form the Win32 API?

thx,
Oliver


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk