mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-15 23:21:17 +00:00
Fall back to a compromise position, which makes my mutex implementation initialiser- and structure-compatible with LinuxThreads, and ditto the upcoming condition var implementation. In particular this means that ((ThreadId)0) is an invalid thread ID, so vg_threads[0] is never used, and vg_threads[1] specially denotes the "main" thread. Remove the scheme of having a linked list of threads waiting on each mutex. It is too difficult to get the right semantics for when a signal is delivered to a thread blocked in pthread_mutex_lock(). Instead, use the old scheme of each thread stating with its .waited_on_mx field, which mutex it is waiting for. This makes pthread_mutex_unlock() less efficient, but at least it all works. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@100
39 KiB
39 KiB