diff options
author | Clément Lassieur <clement@lassieur.org> | 2018-08-05 21:10:07 +0200 |
---|---|---|
committer | Clément Lassieur <clement@lassieur.org> | 2018-08-16 19:19:23 +0200 |
commit | e66e545b69c3adfba6fd1adb0f018f85ceed495f (patch) | |
tree | 14d85b55d5c8b574dd5bf1c79ca7e12186e4f561 /tests | |
parent | 4db99f647b3677086a2007763726d05a59b0cdcb (diff) | |
download | cuirass-e66e545b69c3adfba6fd1adb0f018f85ceed495f.tar cuirass-e66e545b69c3adfba6fd1adb0f018f85ceed495f.tar.gz |
utils: Avoid deadlock when WITH-CRITICAL-SECTION calls are nested.
* src/cuirass/utils.scm (%critical-section-args): New parameter.
(make-critical-section): Put ARGS into a parameter, so that
CALL-WITH-CRITICAL-SECTION knows when it's called from the critical section.
In that case it would just apply PROC to ARGS.
(call-with-critical-section): If already in the critical section, apply PROC
to %CRITICAL-SECTION-ARGS instead of sending the message through the critical
section channel.
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions