This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ecos state machine


ÕÅ ÁÁ <johnsonest@hotmail.com> writes:

> Dear nickg,
>      I have accepted your delete-safety policy.
> about ecos state machine:
>                         RUNNING    = 0,          // Thread is runnable
> or running
>         SLEEPING   = 1,          // Thread is waiting for something to
> happen
>         COUNTSLEEP = 2,          // Sleep in counted manner
>         SUSPENDED  = 4,          // Suspend count is non-zero
>         CREATING   = 8,          // Thread is being created
>         EXITED     =16,
>        SLEEPSET   = (SLEEPING | COUNTSLEEP)
> i am confused that why so many states needed?
>  specially:
>         COUNTSLEEP(if it is not needed,  neither SLEEPSET.if it is
> needed,why COUNTSUSPENDED not needed? )
>         CREATING?? never used!
>         SLEEPSET??
> in same time, OS can exist on only one state!
> if let you draw a state machine,it will be miscellaneous ,right?
> i feel that READY,RUNNING,SUSPENDED,SLEEP(delay or wait source),EXITED
> are enough.no matter thread (self,other).right?

The aparrently superfluous states are there to support the semantics
needed by uITRON. 

-- 
Nick Garnett - eCos Kernel Architect


--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]