]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
sched: Make struct task private to sched.c.
authorAndre Noll <maan@systemlinux.org>
Wed, 1 Jan 2014 23:36:16 +0000 (23:36 +0000)
committerAndre Noll <maan@systemlinux.org>
Sun, 25 May 2014 13:39:01 +0000 (15:39 +0200)
No direct users of struct sched remain, so we can move the definition
of this structure from sched.h to sched.c.

sched.c
sched.h

diff --git a/sched.c b/sched.c
index fb0d4d63eacda82cb4e0779d72daa56c2634a324..cad298b839b83a3f28e70912b1c85201ed589bd5 100644 (file)
--- a/sched.c
+++ b/sched.c
 #include "time.h"
 #include "error.h"
 
+struct task {
+       /** Copied from the task_info struct during task_register(). */
+       void (*pre_select)(struct sched *s, struct task *t);
+       /** Copied from the task_info struct during task_register(). */
+       int (*post_select)(struct sched *s, struct task *t);
+       /** Whether this task is active (>=0) or in error state (<0). */
+       int error;
+       /** Position of the task in the task list of the scheduler. */
+       struct list_head node;
+       /** The task name supplied when the task was registered(). */
+       char status[255];
+       /** If less than zero, the task was notified by another task. */
+       int notification;
+       /** True if task is in error state and exit status has been queried. */
+       bool dead;
+       /** Usually a pointer to the struct containing this task. */
+       void *context;
+};
+
 static struct timeval now_struct;
 struct timeval *now = &now_struct;
 
diff --git a/sched.h b/sched.h
index 6a35f0e8e56a2f7fa4609ce63906d57981dbff0b..05b6c51e725b31bba2f75bf46d1faf714e5ebe2e 100644 (file)
--- a/sched.h
+++ b/sched.h
@@ -33,31 +33,7 @@ struct sched {
        struct list_head task_list;
 };
 
-/**
- * Paraslash's task structure.
- *
- * This is considered an internal structure and will eventually be made private.
- *
- * \sa \ref sched.
- */
-struct task {
-       /** Copied from the task_info struct during task_register(). */
-       void (*pre_select)(struct sched *s, struct task *t);
-       /** Copied from the task_info struct during task_register(). */
-       int (*post_select)(struct sched *s, struct task *t);
-       /** Whether this task is active (>=0) or in error state (<0). */
-       int error;
-       /** Position of the task in the task list of the scheduler. */
-       struct list_head node;
-       /** The task name supplied when the task was registered(). */
-       char status[255];
-       /** If less than zero, the task was notified by another task. */
-       int notification;
-       /** True if task is in error state and exit status has been queried. */
-       bool dead;
-       /** Usually a pointer to the struct containing this task. */
-       void *context;
-};
+struct task;
 
 /** Information that must be supplied by callers of \ref task_register(). */
 struct task_info {