This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: ecos state machine
- From: Nick Garnett <nickg at calivar dot demon dot co dot uk>
- To: =?gb2312?b?1cUgwcE=?= <johnsonest at hotmail dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: 03 Aug 2002 15:05:16 +0100
- Subject: Re: [ECOS] ecos state machine
- References: <F64VOhP0NYK5jgGKThp00006951@hotmail.com>
ÕÅ ÁÁ <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