[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [PATCH 3/3] mini-os: remove unused functions from sched.c



Juergen Gross, on Fri 26 Aug 2016 16:35:36 +0200, wrote:
> sched.c contains some functions nobody is using. Remove them.
> 
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>

Reviewed-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>

> ---
>  sched.c | 48 ------------------------------------------------
>  1 file changed, 48 deletions(-)
> 
> 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");
> -- 
> 2.6.6
> 

-- 
Samuel
<b> lisons de l'assembleur c
 -+- #sos - CrisC forever -+-

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/cgi-bin/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.