Introduce a highest priority job for critical thread services
authorMartin Willi <martin@revosec.ch>
Thu, 5 May 2011 08:33:26 +0000 (10:33 +0200)
committerMartin Willi <martin@revosec.ch>
Mon, 16 May 2011 13:24:15 +0000 (15:24 +0200)
src/libstrongswan/processing/jobs/job.c
src/libstrongswan/processing/jobs/job.h

index 7d16088..ccb8971 100644 (file)
@@ -15,7 +15,8 @@
 
 #include "job.h"
 
-ENUM(job_priority_names, JOB_PRIO_HIGH, JOB_PRIO_LOW,
+ENUM(job_priority_names, JOB_PRIO_CRITICAL, JOB_PRIO_LOW,
+       "critical",
        "high",
        "medium",
        "low",
index 318a4c9..d25cee0 100644 (file)
@@ -31,8 +31,10 @@ typedef enum job_priority_t job_priority_t;
  * Priority classes of jobs
  */
 enum job_priority_t {
+       /** Critical infrastructure jobs that should always been served */
+       JOB_PRIO_CRITICAL = 0,
        /** Short jobs executed with highest priority */
-       JOB_PRIO_HIGH = 0,
+       JOB_PRIO_HIGH,
        /** Default job priority */
        JOB_PRIO_MEDIUM,
        /** Low priority jobs with thread blocking operations */