]> xenbits.xensource.com Git - people/pauldu/mini-os.git/commitdiff
mini-os: remove unused functions from sched.c
authorJuergen Gross <jgross@suse.com>
Mon, 29 Aug 2016 06:17:22 +0000 (08:17 +0200)
committerWei Liu <wei.liu2@citrix.com>
Mon, 29 Aug 2016 10:12:04 +0000 (11:12 +0100)
sched.c contains some functions nobody is using. Remove them.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
sched.c

diff --git a/sched.c b/sched.c
index 1e843d92ddb8f7b1d37858197670073a593d0dbd..6f89ea4ddef7a0c1dc7fa86d469ca5fd05fd7b59 100644 (file)
--- a/sched.c
+++ b/sched.c
@@ -63,16 +63,6 @@ static int threads_started;
 
 struct thread *main_thread;
 
-void inline print_runqueue(void)
-{
-    struct thread *th;
-    MINIOS_TAILQ_FOREACH(th, &thread_list, thread_list)
-    {
-        printk("   Thread \"%s\", runnable=%d\n", th->name, is_runnable(th));
-    }
-    printk("\n");
-}
-
 void schedule(void)
 {
     struct thread *prev, *next, *thread, *tmp;
@@ -245,44 +235,6 @@ void idle_thread_fn(void *unused)
     }
 }
 
-DECLARE_MUTEX(mutex);
-
-void th_f1(void *data)
-{
-    struct timeval tv1, tv2;
-
-    for(;;)
-    {
-        down(&mutex);
-        printk("Thread \"%s\" got semaphore, runnable %d\n", current->name, is_runnable(current));
-        schedule();
-        printk("Thread \"%s\" releases the semaphore\n", current->name);
-        up(&mutex);
-        
-        
-        gettimeofday(&tv1, NULL);
-        for(;;)
-        {
-            gettimeofday(&tv2, NULL);
-            if(tv2.tv_sec - tv1.tv_sec > 2) break;
-        }
-                
-        
-        schedule(); 
-    }
-}
-
-void th_f2(void *data)
-{
-    for(;;)
-    {
-        printk("Thread OTHER executing, data 0x%p\n", data);
-        schedule();
-    }
-}
-
-
-
 void init_sched(void)
 {
     printk("Initialising scheduler\n");