reentrancy of functions/context switching

In the reentrancy section of the manuals it is told that functions which need private impure data will have their own data section and that can be bound to the impure data pointer in the thread control block. When i checked this out in some test examples I found that the _impure_ptr was NOT switched with the thread context but it had always the value of the last write operation of a thread, even seen from another thread. to make it more clear: Thread A sets the pointer to 0x10000 Thread B set the pointer to 0x20000. So each thread should see its privat value when it is active, but in reality thread A and all other treads now see 0x20000. In my opinion there is a bug in the context switch routine or how shall the reentrancy problem solved otherwise. I also can’t find a callback routine which is called on a context switch so I can restore the context for my own (this function I know from other OSs).