FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 05-16-2011, 12:28 PM
Martin Sivak
 
Default Throw away the dispatcher 'skipList' and give Step a state.

----- Original Message -----
> In particular, 'scheduled' will run if not explicitly skipped,
> 'skipped'
> means 'is never going to be run' and 'requested' means 'will run and
> can
> not be skipped'.
> ---

> -
> class Step(object):
> + SCHED_UNSCHEDULED = 0
> + SCHED_SCHEDULED = 1 # will execute if not explicitly skipped
> + SCHED_SKIPPED = 2 # is never going to execute
> + SCHED_REQUESTED = 3 # will execute and can not be skipped
> + SCHED_DONE = 4 # done is a final state
> +
> + sched_state_machine = [
> + # unscheduled # scheduled # skipped # requested # done
> + [SCHED_UNSCHEDULED, SCHED_SCHEDULED, SCHED_SKIPPED, SCHED_REQUESTED,
> SCHED_DONE], # unscheduled
> + [None , SCHED_SCHEDULED, SCHED_SKIPPED, SCHED_REQUESTED,
> SCHED_DONE], # scheduled
> + [None , None , SCHED_SKIPPED, None , None], # skipped
> + [None , None , None , SCHED_REQUESTED, SCHED_DONE], # requested
> + [None , None , None , None , SCHED_DONE]] # done
> +

This really deserves much better documentation. If it specifies the matrix of allowed transitions, is column or row the starting point? Why didn't you use True/False (or True/0 to make it more visible) to mark the valid transition edges, or is there any meaning in the transition value?

--
Martin Sivák
msivak@redhat.com
Red Hat Czech
Anaconda team / Brno, CZ

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 05-17-2011, 01:52 PM
Ales Kozumplik
 
Default Throw away the dispatcher 'skipList' and give Step a state.

On 05/16/2011 02:28 PM, Martin Sivak wrote:


This really deserves much better documentation. If it specifies the matrix of allowed transitions, is column or row the starting point? Why didn't you use True/False (or True/0 to make it more visible) to mark the valid transition edges, or is there any meaning in the transition value?



I will really give it one. And you're right I am going to simplify this
by using True/False, the value was not really used (except by testing to
be None).


Ales

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 10:24 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org