[CCC DEV] Sleep (when time permits)

Matt Jadud matt at jadud.com
Mon Jun 13 19:06:59 BST 2011


On Mon, Jun 13, 2011 at 13:00, Omer Kilic <omer at concurrency.cc> wrote:
> Yup. AVR datasheet, page 40 bottom paragraph states:

Ah. Yes. Documentation. I should read it. :)

> * https://projects.cs.kent.ac.uk/projects/kroc/trac/changeset/7218

Ah. Yes. Commits in a project I am a committer on. I should read those, too. :)

> Hmm, that would be nice as an optional thing I guess. When the processor
> wakes up it will continue where it left off though so we might have to force
> the stack pointer to where the wakeup function is before issuing a sleep
> command. Alternatively we can use a flag to check if we have woken up from
> sleep every time there is a context switch.

It would probably have to be something like the flag, and further,
we'd have to have a way of stuffing a magic wake/sleep PROC at the
front of the scheduler queue... which might not be ideal. In fact, it
would probably be rather dangerous... we'd be moving into a world
where there were "special" PROCs.

I think the second approach (just put it to sleep, and structure the
process network appropriately around the external interrupt wakeup) is
the way to go.

> I started working on it but didn't have time sadly. The beamer skeleton is
> in the repository.

That was a great kickstart, actually... it spared me having to do that
from scratch. I started throwing content in, and have some pretty
pictures for the first section or two now. I'll fill in more this
afternoon.

Cheers,
Matt



More information about the developers mailing list