diff mbox

[v2,3/3] mini-os: remove unused functions from sched.c

Message ID 1472451442-28123-4-git-send-email-jgross@suse.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jürgen Groß Aug. 29, 2016, 6:17 a.m. UTC
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 | 48 ------------------------------------------------
 1 file changed, 48 deletions(-)
diff mbox

Patch

diff --git a/sched.c b/sched.c
index 1e843d9..6f89ea4 100644
--- 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");