Subversion Repositories programming

Rev

Rev 415 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 415 Rev 417
Line 39... Line 39...
39
     * @return false if we are finished, true otherwise
39
     * @return false if we are finished, true otherwise
40
     */
40
     */
41
    protected boolean step ()
41
    protected boolean step ()
42
    {
42
    {
43
        /* Check if we're completely finished */
43
        /* Check if we're completely finished */
44
        if (cur_proc == null && run_queue.isEmpty ())
44
        if (schedulerFinished ())
45
            return false;
45
            return false;
46
 
46
 
-
 
47
        /* Pull in any new processes */
-
 
48
        queueWaitingProcesses ();
-
 
49
 
47
        /* Check if we have a process, if not, load one */
50
        /* Check if we have a process, if not, load one */
48
        if (cur_proc == null)
51
        if (cur_proc == null)
49
            startProcess (run_queue.elementAt (0));
52
            startProcess (run_queue.firstElement ());
50
 
53
 
51
        /* If we're able, run the current process */
54
        /* If we're able, run the current process */
52
        if (cur_proc.time_left > 0)
55
        if (cur_proc.time_left > 0)
53
            scheduleCurrent ();
56
            scheduleCurrent ();
54
        else
57
        else