public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* kernel/sched.c questions
@ 2001-04-04 19:52 Sardañons, Eliel
  2001-04-04 20:08 ` Tim Walberg
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Sardañons, Eliel @ 2001-04-04 19:52 UTC (permalink / raw)
  To: linux-kernel

Hello, I would like to know why you put this two functions:
void scheduling_functions_start_here(void) { }
...
void scheduling_functions_end_here(void) { }

why you put 'case TASK_RUNNING'

switch (prev->state) {
                case TASK_INTERRUPTIBLE:
                        if (signal_pending(prev)) {
                                prev->state = TASK_RUNNING;
                                break;
                        }
                default:
                        del_from_runqueue(prev);
                case TASK_RUNNING:
}

and the last one:

in the function schedule() you always use this syntax:

-----
if (a_condition)
    goto bebe;
bebe_back


bebe:
    do_bebe();
    goto bebe_back;
------
why not just doing:
   
   if (a_condition)
         do_bebe();


I know that goto's are better but finaly you are jumping to a function and
then calling the function. I think you can improve performance doing this.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-04-05 20:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-04 19:52 kernel/sched.c questions Sardañons, Eliel
2001-04-04 20:08 ` Tim Walberg
2001-04-04 20:20   ` Andi Kleen
2001-04-04 20:21     ` Bjorn Wesen
2001-04-04 21:22   ` Richard B. Johnson
2001-04-04 20:29 ` Stuart MacDonald
2001-04-05 20:28 ` Steven Walter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox