[PATCH 3/3] ntdll: For Mac 64-bit, poke NtCurrentTeb()->ThreadLocalStoragePointer to the corresponding offset from %gs.

Alexandre Julliard julliard at winehq.org
Wed Jul 27 21:29:38 CDT 2016


Sebastian Lackner <sebastian at fds-team.de> writes:

> It looks like RtlRunOnceExecuteOnce is not safe to use (keyed_event not initialized yet).
> You could use pthread (like used before in init_teb_key), but probably moving to
> a function is sufficient to improve code readability. By avoiding the heavily indented
> code it would already look a bit less hacky. ;)

Simplifying the error handling would probably also help. For instance,
pthread_setspecific() is not going to fail in any meaningful way.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list