summaryrefslogtreecommitdiffstats
path: root/src/threads/mutex.h
Commit message (Collapse)AuthorAgeLines
* Introduce read-write-update locks and guards to prevent deadlocksFrédéric Brière2019-12-27-0/+68
| | | | | | | | | | | | | | | | | | | | This converts t_rwmutex and t_rwmutex_guard into a read-write-update[*] lock and guard, in an attempt to circumvent the various deadlocks that were introduced with the addition of lines_mtx in 38bb6b7. [*] For more details, see https://stackoverflow.com/a/18785300 and http://lkml.iu.edu/hypermail/linux/kernel/0004.3/0117.html. Note that this is not a real fix; this would require analyzing and refactoring phone.cpp, which is well beyond my abilities. This is at best a workaround that appears to conveniently dodge all the deadlocks I've encountered so far. (It would have been more proper to introduce a separate class for this purpose, but this would have required modifying over 80 lines just to change one type for another. As phone_users_mtx is the only other instance of this class, the impact of subverting t_rwmutex directly is minimal.)
* Create t_rwmutex_guard base classFrédéric Brière2019-12-26-5/+10
| | | | (Doing this ahead of time to simplify the next commit a bit.)
* Move t_rwmutex_reader/writer definitions into mutex.cppFrédéric Brière2019-10-02-16/+4
| | | | | These classes are about to get more complex, so let's move them ahead of time into mutex.cpp.
* Replace (old) FSF postal address with URL in header filesFrédéric Brière2016-10-02-2/+1
| | | | | | Wording copied from https://www.gnu.org/licenses/gpl-howto.en.html Fixes #25, fixes #71
* Partial lock rework in t_phone (#17). If the app starts crashing or ↵Lubos Dolezel2015-07-07-0/+42
| | | | freezing, this commit is probably to blame.
* initial checkinMichal Kubecek2015-04-13-0/+86
Check in contents of upstream 1.4.2 tarball, exclude generated files.