staceyson/qemu-devel-1.4.0 — pull request #1 by zxombie (2013-04-02 22:19:22+00:00)
Title: Stop qemu-arm crashing with threads

The two commits stop qemu-arm crashing when used with a threaded application. There is still a problem with qemu as it exits before the thread function is called.

One patch fixes thread local storage data, used to store a pointer to the cpu state in each thread. Without this the pointer can be set to NULL as cpu_single_env is a global value that should be thread local. If cpu_exec is called by multiple threads one will set it to NULL, then another may reload it and dereference the NULL pointer.

The target_thr_param fixes the definition of target_thr_param to reflect it's definition on FreeBSD.