Re: Duff's Device
- From: "Rod Pemberton" <do_not_have@xxxxxxxxxxx>
- Date: Thu, 28 Sep 2006 16:50:23 -0400
"Hallvard B Furuseth" <h.b.furuseth@xxxxxxxxxxx> wrote in message
news:hbf.20060928qwu6@xxxxxxxxxxxxxxxx
Anyone know why Duff's device is usually written
like this (snip) instead of this? (snip)
Yes.
This is his original post:
http://groups.google.com/group/net.lang.c/msg/66008138e07aa94c?hl=en
This is another post from him with clarifications to various questions from
individuals on c.l.c:
http://groups.google.com/group/comp.lang.c/msg/bb78298175c42411?hl=en
From the original post, he (indirectly) states that the design of Duff'sDevice in C was the direct result of his understanding of how to generate
efficient unrolled loops in assembly language for the VAX. At least, that
is the one thing other than Duff's Device that you should get from his
message...
FYI, others have pointed out Simon Tatham's "Coroutines in C":
http://www.chiark.greenend.org.uk/~sgtatham/coroutines.html
Protothreads is also based on a similar mechanism:
http://www.sics.se/~adam/pt/
Rod Pemberton
.
- References:
- Duff's Device
- From: Hallvard B Furuseth
- Duff's Device
- Prev by Date: Re: C99 Versus ANSI.
- Next by Date: Re: Which compiler for a learner of C?
- Previous by thread: Re: Duff's Device
- Next by thread: How to let the process exit if the signal its waiting for doesn't arrive
- Index(es):
Relevant Pages
|