thunking, the next step
Robert Collins
rbcollins@cygwin.com
Fri Nov 21 12:23:00 GMT 2003
On Fri, 2003-11-21 at 22:02, Corinna Vinschen wrote:
> >
> > Ok. Well for now, I'm going to leave the thunks in place, until / if
> > they become nothing more than if (unicode) ...W() else A(). That said,
> > all the calls we are thunking require kernel mode transitions, so I
> > really don't believe that the thunking will add any overhead on it's
> > own: the context switch going into kernel will obliterate the much
> > smaller overhead of checking which call we want to make.
>
> I don't think so. You can't take the kernel into account, really, since
> it spends its time either case.
Well, thats irrelevant anyway. I've already committed to moving the
duplication of tests out of the call path.
> Anyway, *sic* I don't like the thunking. It's fairly intrusive to the
> code. It adds another complexity level to a lot of functions which seems
> pretty unnecessary. It also adds a lot of decisions which are made on
> runtime over and over again, even though actually it would be sufficient
> from a logical level to make this decision once. Or at least only once
> per Win32 function call.
Those decisions can live elsewhere - see above. For now, it provides me
a clean way to tell what has been fixed, and what not - and to insert
tracing and debugging statements at *one* place in the code (per win32
function) rather than at multiple places.
> Btw., what does "thunk" mean literally? While I know its meaning in the
> software context, I can't find a simple translation. I looked up three
> dictionaries to no avail.
http://www.jargon.8hz.com/jargon_35.html - see thunk, and meaning 3 is
what I've been using.
Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20031121/f62790ff/attachment.sig>
More information about the Cygwin-patches
mailing list