aboutsummaryrefslogtreecommitdiffstats
path: root/src/libhydra/kernel/kernel_interface.c
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2012-06-21 10:10:25 +0200
committerTobias Brunner <tobias@strongswan.org>2012-06-25 17:49:12 +0200
commite0efd7c121a888625cc1d287c496f1306019b9c7 (patch)
treec0cbfe50b65c97c0f91599dec54076e9f4a24578 /src/libhydra/kernel/kernel_interface.c
parent26d77eb3e61b2ff929dff96bbb53a5d22d76ce4f (diff)
downloadstrongswan-e0efd7c121a888625cc1d287c496f1306019b9c7.tar.bz2
strongswan-e0efd7c121a888625cc1d287c496f1306019b9c7.tar.xz
Make rescheduling a job more predictable
This avoids race conditions between calls to cancel() and jobs that like to be rescheduled. If jobs were able to reschedule themselves it would theoretically be possible that two worker threads have the same job assigned (the one currently executing the job and the one executing the same but rescheduled job if it already is time to execute it), this means that cancel() could be called twice for that job. Creating a new job based on the current one and reschedule that is also OK, but rescheduling itself is more efficient for jobs that need to be executed often.
Diffstat (limited to 'src/libhydra/kernel/kernel_interface.c')
0 files changed, 0 insertions, 0 deletions