diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-11-23 10:41:20 +0100 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2012-11-23 11:12:08 +0100 |
commit | 0ea23c24bf06e153bb075804e195e1733fd67d3f (patch) | |
tree | 740ec1c36e1b78143350e6cb079faa187f99049d /%25252525253fid%25252525253d0715a4433cc2c602458cbcb2bf0b1de15d63439b%252525253fid%252525253d4e28e8a9cc2ce6e81833d71270a74f0f55a540fc%2525253fid%2525253d7f16e1c1d30f56d796b1e7f2286c9ccfdd97061f%25253fid%25253d7f16e1c1d30f56d796b1e7f2286c9ccfdd97061f%253fid%253d7f16e1c1d30f56d796b1e7f2286c9ccfdd97061f%3fid%3d0ea23c24bf06e153bb075804e195e1733fd67d3f?id=0ea23c24bf06e153bb075804e195e1733fd67d3f | |
parent | a80f8dcf2c6eb3b54658218bc081ee9694204dd5 (diff) |
Release screen mutex if thread dies
We did not setup a thread cleanup procedure which resulted in calcurse
freezing if a thread tried to draw on the screen after another thread
was canceled while locking the screen.
Note that this kind of cleanup handlers should be added to other mutexes
as well. This patch just removes the most common case of triggering a
deadlock.
Also note that we cannot move pthread_cleanup_push() and
pthread_cleanup_pop() into the locking/unlocking functions since both
pthread_cleanup_push() and pthread_cleanup_pop() may be implemented as
macros that must be used in pairs within the same lexical scope.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to '%25252525253fid%25252525253d0715a4433cc2c602458cbcb2bf0b1de15d63439b%252525253fid%252525253d4e28e8a9cc2ce6e81833d71270a74f0f55a540fc%2525253fid%2525253d7f16e1c1d30f56d796b1e7f2286c9ccfdd97061f%25253fid%25253d7f16e1c1d30f56d796b1e7f2286c9ccfdd97061f%253fid%253d7f16e1c1d30f56d796b1e7f2286c9ccfdd97061f%3fid%3d0ea23c24bf06e153bb075804e195e1733fd67d3f?id=0ea23c24bf06e153bb075804e195e1733fd67d3f')
0 files changed, 0 insertions, 0 deletions