Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 08 Dec 1999 20:57:04 -0700
From:      Brett Glass <brett@lariat.org>
To:        Tani Hosokawa <unknown@riverstyx.net>, Jonathon McKitrick <jcm@dogma.freebsd-uk.eu.org>
Cc:        Alfred Perlstein <bright@wintelcom.net>, Roelof Osinga <roelof@nisser.com>, Kris Kennaway <kris@hub.freebsd.org>, freebsd-chat <chat@FreeBSD.ORG>
Subject:   Re: Yahoo hacked last night
Message-ID:  <4.2.0.58.19991208204754.048bd8e0@localhost>
In-Reply-To: <19991208172230.A6304@riverstyx.net>
References:  <Pine.BSF.4.02A.9912090117580.39859-100000@dogma.freebsd-uk.eu.org> <4.2.0.58.19991208172738.0495eef0@localhost> <Pine.BSF.4.02A.9912090117580.39859-100000@dogma.freebsd-uk.eu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Actually, "thunk" is a general term for a small snippet of code
that the compiler must generate to create a connection between
two parts of a program.

The term was coined by the compiler writers who implemented "call by 
name" semantics for the Algol-66 compiler. When you pass an expression
by name to a subroutine, it must be evaluated in the context of the
calling routine each time the subroutine uses it as an r-value.
To allow this to happen, the caller passed to the subroutine a pointer 
to ANOTHER subroutine (a "thunk") which provided the needed r-value
on the fly. The thunk had to know how to access the stack frame which
contained the context for the expression. (Yes, it could cause
side effects in the caller's environment and had to be sensitive to 
such side effects as well.)

"Trampoline code" is another kind of thunk. 

--Brett

At 06:22 PM 12/8/1999 , Tani Hosokawa wrote:
>Dunno much about Windows kernel, but thunking is just ugly conversions between 16 and 32 bit
>operations.  Prolly used to translate 16 bit socket connection into the 32 bit network
>subsystem.  MS is just stupid.
>
>On Thu, Dec 09, 1999 at 01:18:40AM +0000, Jonathon McKitrick wrote:
> > 
> > So what exactly is 'thunk-connect' in the windows kernel, anyway?  And how
> > did M$ blame something other than segmentation for its woes?
> > 
> > 
> > -jm
> > 
> > ------------------
> > 
> > 
> > 
> > 
> > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > with "unsubscribe freebsd-chat" in the body of the message
>
>-- 
>---
>tani hosokawa
>river styx internet
>
>
>
>To Unsubscribe: send mail to majordomo@FreeBSD.org
>with "unsubscribe freebsd-chat" in the body of the message



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-chat" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4.2.0.58.19991208204754.048bd8e0>