Use CRITICAL job priority class for long running dispatcher jobs

This commit is contained in:
Martin Willi
2011-05-16 15:24:15 +02:00
parent 1c8f58adb9
commit 14bf2f689d
25 changed files with 54 additions and 50 deletions
+2 -2
View File
@@ -478,8 +478,8 @@ receiver_t *receiver_create()
this->rng->get_bytes(this->rng, SECRET_LENGTH, this->secret);
memcpy(this->secret_old, this->secret, SECRET_LENGTH);
this->job = callback_job_create((callback_job_cb_t)receive_packets,
this, NULL, NULL);
this->job = callback_job_create_with_prio((callback_job_cb_t)receive_packets,
this, NULL, NULL, JOB_PRIO_CRITICAL);
lib->processor->queue_job(lib->processor, (job_t*)this->job);
return &this->public;
+2 -2
View File
@@ -183,8 +183,8 @@ sender_t * sender_create()
.mutex = mutex_create(MUTEX_TYPE_DEFAULT),
.got = condvar_create(CONDVAR_TYPE_DEFAULT),
.sent = condvar_create(CONDVAR_TYPE_DEFAULT),
.job = callback_job_create((callback_job_cb_t)send_packets,
this, NULL, NULL),
.job = callback_job_create_with_prio((callback_job_cb_t)send_packets,
this, NULL, NULL, JOB_PRIO_CRITICAL),
.send_delay = lib->settings->get_int(lib->settings,
"charon.send_delay", 0),
.send_delay_type = lib->settings->get_int(lib->settings,