Add priority inheritance implementation for Semaphores.
[bertos.git] / bertos / kern / proc.h
index 2def1459ef44362dac8da3699f70705ca5783c99..6aec28d3ea5d1627cc20bf4118df2fc1c2dd41a4 100644 (file)
@@ -92,6 +92,7 @@
 #ifndef KERN_PROC_H
 #define KERN_PROC_H
 
+#include "sem.h"
 #include "cfg/cfg_proc.h"
 #include "cfg/cfg_signal.h"
 #include "cfg/cfg_monitor.h"
 #include <cpu/types.h> // cpu_stack_t
 #include <cpu/frame.h> // CPU_SAVED_REGS_CNT
 
-#include <kern/signal.h>
-
 /*
  * WARNING: struct Process is considered private, so its definition can change any time
  * without notice. DO NOT RELY on any field defined here, use only the interface
@@ -117,6 +116,12 @@ typedef struct Process
 {
 #if CONFIG_KERN_PRI
        PriNode      link;        /**< Link Process into scheduler lists */
+# if CONFIG_KERN_PRI_INHERIT
+       PriNode      inh_link;    /**< Link Process into priority inheritance lists */
+       List         inh_list;    /**< Priority inheritance list for this Process */
+       Semaphore    *inh_blocked_by;  /**< Semaphore blocking this Process */
+       int          orig_pri;    /**< Process priority without considering inheritance */
+# endif
 #else
        Node         link;        /**< Link Process into scheduler lists */
 #endif