On Mon, Jan 27, 2014 at 05:15:39PM -0500, Dongsheng Yang wrote:+/**Who would ever want to use/rely on this? It doesn't make any sense. And
+ * task_prio - return the priority value of a given task.
+ * @p: the task in question.
+ *
+ * Return: The priority value as seen by users in /proc.
+ * RT tasks are offset by -200. Normal tasks are centered
+ * around 0, value goes from -16 to +15.
+ */
+static inline int task_prio(const struct task_struct *p)
+{
+ return p->prio - MAX_RT_PRIO;
+}
therefore it shouldn't ever be considered time critical.
+/**Urgh, no. Just remove the macro already. Although arguably we should
+ * task_nice - return the nice value of a given task.
+ * @p: the task in question.
+ *
+ * Return: The nice value [ -20 ... 0 ... 19 ].
+ */
+static inline int task_nice(const struct task_struct *p)
+{
+ return TASK_NICE(p);
+}
remove ->static_prio and clean up that entire mess.