kore

a fork of the worlds most advanced web framework
Log | Files | Refs | README | LICENSE

commit 8be316ac0c91e20f35d5526269dbbdfe625dd1a8
parent fad5c6ea6f4d56cc483596a6ccdc44a3152fbaa1
Author: Joris Vink <joris@coders.se>
Date:   Mon, 22 Oct 2018 09:00:55 +0200

Let kore_worker_make_busy() set next_lock.

Diffstat:
Msrc/worker.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/worker.c b/src/worker.c @@ -80,6 +80,7 @@ static void worker_entropy_recv(struct kore_msg *, const void *); static void worker_certificate_recv(struct kore_msg *, const void *); #endif +static u_int64_t next_lock; static struct kore_worker *kore_workers; static int worker_no_lock; static int shm_accept_key; @@ -293,9 +294,9 @@ kore_worker_entry(struct kore_worker *kw) { struct kore_runtime_call *rcall; char buf[16]; + u_int64_t now, next_prune; int quit, had_lock, r; u_int64_t timerwait, netwait; - u_int64_t now, next_prune, next_lock; #if !defined(KORE_NO_TLS) u_int64_t last_seed; #endif @@ -581,6 +582,7 @@ kore_worker_make_busy(void) if (worker->has_lock) { worker_unlock(); worker->has_lock = 0; + next_lock = kore_time_ms() + WORKER_LOCK_TIMEOUT; } }