what's a callback?

J

John Larkin

Guest
A few programmers I've known have used the term "callback", which
somehow related to executing a deferred subroutine or something. Does
anybody know anything about this term or its conventions? If I google
it, I just get a lot of telephone-type references.

I'm doing a thing now where, in an interrupt service routine, if I
think I'm out of time I set a flag to remind me to finish some chores
next time or so. I'm not sure if that qualifies as a "callback."

John
 
On Sun, 19 Dec 2004 12:09:55 -0800, the renowned John Larkin
<john@spamless.usa> wrote:

A few programmers I've known have used the term "callback", which
somehow related to executing a deferred subroutine or something. Does
anybody know anything about this term or its conventions? If I google
it, I just get a lot of telephone-type references.

I'm doing a thing now where, in an interrupt service routine, if I
think I'm out of time I set a flag to remind me to finish some chores
next time or so. I'm not sure if that qualifies as a "callback."

John
AFAIUI, a callback handler is essentially like asychronous logic- it's
a routine (that you register with some other piece of software) that
gets called when some specific set of conditions arise.

The business of sharing resources between threads in a threaded
environment (where you can, for some purposes, pretend that the
computer is executing multiple bits of software simultaneously) is
fairly complex and involves a lot of fairly odd terminology (mutex,
semaphore etc.) Most of my stuff doesn't have an RTOS so neither the
facilities or the complexity are there.


Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
 
John Larkin wrote:
A few programmers I've known have used the term "callback", which
somehow related to executing a deferred subroutine or something. Does
anybody know anything about this term or its conventions? If I google
it, I just get a lot of telephone-type references.

I'm doing a thing now where, in an interrupt service routine, if I
think I'm out of time I set a flag to remind me to finish some chores
next time or so. I'm not sure if that qualifies as a "callback."

John
No- that is called "setting a flag to remind you to finish some chores"
and is an example of *re-entrant code*:) Why in the world would that be
called "callback" unless you collect useless jargon?
 
On Sun, 19 Dec 2004 21:32:42 GMT, Fred Bloggs <nospam@nospam.com>
wrote:

John Larkin wrote:
A few programmers I've known have used the term "callback", which
somehow related to executing a deferred subroutine or something. Does
anybody know anything about this term or its conventions? If I google
it, I just get a lot of telephone-type references.

I'm doing a thing now where, in an interrupt service routine, if I
think I'm out of time I set a flag to remind me to finish some chores
next time or so. I'm not sure if that qualifies as a "callback."

John

No- that is called "setting a flag to remind you to finish some chores"
and is an example of *re-entrant code*:)
The isr is not re-entrant. It just runs periodically to completion (in
about 12 usec) and takes various paths each run, depending on what
needs to be done. The flag makes sure I get all the necessary stuff
done, sooner or later.

Why in the world would that be
called "callback" unless you collect useless jargon?
Well, I like to learn things. Sorry.

John
 
"Fred Bloggs" <nospam@nospam.com> wrote in message

No- that is called "setting a flag to remind you to finish some
chores"
and is an example of *re-entrant code*:) Why in the world would that
be
called "callback" unless you collect useless jargon?
That's certainly the most unique definition of re-entrancy that I've
seen.

When I think of re-entrant code, I think of code that has no local
variable storage associated to it. I also think of code that can call
itself recursively or be executed in several threads across multiple
processors concurrently with only one copy in memory.
 
On Sun, 19 Dec 2004 15:43:11 -0500, Spehro Pefhany

<speffSNIP@interlogDOTyou.knowwhat> wrote:

The business of sharing resources between threads in a threaded
environment (where you can, for some purposes, pretend that the
computer is executing multiple bits of software simultaneously) is
fairly complex and involves a lot of fairly odd terminology (mutex,
semaphore etc.) Most of my stuff doesn't have an RTOS so neither the
facilities or the complexity are there.
Little ticktock state machines can be very powerful in the right
circumstances. And very reliable.

John
 
On Sun, 19 Dec 2004 21:50:21 GMT, "Anthony Fremont"
<spam@anywhere.com> wrote:

"Fred Bloggs" <nospam@nospam.com> wrote in message

No- that is called "setting a flag to remind you to finish some
chores"
and is an example of *re-entrant code*:) Why in the world would that
be
called "callback" unless you collect useless jargon?

That's certainly the most unique definition of re-entrancy that I've
seen.

When I think of re-entrant code, I think of code that has no local
variable storage associated to it. I also think of code that can call
itself recursively or be executed in several threads across multiple
processors concurrently with only one copy in memory.

AKA "pure" code.

John
 
"John Larkin" <john@spamless.usa> wrote in message
news:2onbs01b2vcbsmls7bd7qqdlo8kvafuolk@4ax.com...
A few programmers I've known have used the term "callback", which
somehow related to executing a deferred subroutine or something. Does
anybody know anything about this term or its conventions? If I google
it, I just get a lot of telephone-type references.

I'm doing a thing now where, in an interrupt service routine, if I
think I'm out of time I set a flag to remind me to finish some chores
next time or so. I'm not sure if that qualifies as a "callback."
My experience with them is that when a piece of system software loads, such
as a device driver, that any application might want to call without knowing
where it is located, the driver will load an address in a system table (tied
to hardware or software interrupts, perhaps) so the application can find the
function when needed.
 
John Larkin <john@spamless.usa> wrote:

A few programmers I've known have used the term "callback", which
somehow related to executing a deferred subroutine or something. Does
anybody know anything about this term or its conventions?
When you pass the address of a subroutine (usually in your code) to
something so that something can call the passed subroutine the subroutine
would often be called a callback.

Typically used for things like a list iterating routine where the callback
would be called for each item in the list.
 
"John Larkin" <john@spamless.usa> wrote in message
news:2onbs01b2vcbsmls7bd7qqdlo8kvafuolk@4ax.com...
A few programmers I've known have used the term "callback", which
somehow related to executing a deferred subroutine or something. Does
anybody know anything about this term or its conventions? If I google
it, I just get a lot of telephone-type references.

I'm doing a thing now where, in an interrupt service routine, if I
think I'm out of time I set a flag to remind me to finish some chores
next time or so. I'm not sure if that qualifies as a "callback."

John



It's just windows hyperbola. Click a (say) button somewhere and the ID
number you gave the button is stored on the "message" stack. At some point
in your prog' you may wish to rummage through the messages to see if that
particular number has turned up.
If you've a PowerBasic for windows, the help file makes a (bad!) effort to
describe it.
regards
john
 
"john jardine" <john@jjdesigns.fsnet.co.uk> wrote in message
news:cq58nu$v5j$1@newsg2.svr.pol.co.uk...
describe it.
regards
john
Cunt... what is the recipe for haggis?
Aye?
Aye?
Aye?

DNA
 
On Sun, 19 Dec 2004 20:36:53 -0500, Spehro Pefhany wrote:
....
Don't forget to prick your haggis.

Traditional Haggis (from Evelyn Hlabse, esh2@po.CWRU.Edu)
[abomination snipped]
http://www.tulsascots.com/photos/haggis.jpg
http://haradakun.cool.ne.jp/shashin/haggis.jpg
Gagg! Looks kinda like The Maggot That Destroyed Cleveland.

Thanks!
Rich
 
On Sun, 19 Dec 2004 18:42:28 -0800, the renowned John Larkin
<john@spamless.usa> wrote:

Serves approximately 11, if you invite me.
John
There's always someone who wants to bogart the haggis.


Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
 
"Kryten" <kryten_droid_obfusticator@ntlworld.com> wrote in message
news:6Jsxd.101$iz.11@newsfe1-win.ntli.net...
And what is the deal with oysters?
It's a fish built like a nut...
Actually, I've heard it compared to something else altogether.
 
John Larkin wrote:
A few programmers I've known have used the term "callback", which
somehow related to executing a deferred subroutine or something. Does
anybody know anything about this term or its conventions? If I google
it, I just get a lot of telephone-type references.

I'm doing a thing now where, in an interrupt service routine, if I
think I'm out of time I set a flag to remind me to finish some chores
next time or so. I'm not sure if that qualifies as a "callback."

John
That's a flag. Here's a good explanation of callbacks:

http://www.tutok.sk/fastgl/callback.html

Best,

Mike Monett
 
I read in sci.electronics.design that John Larkin <john@spamless.usa>
wrote (in <thuds05o27kn180mjet5m7pad3331rthi6@4ax.com>) about 'what's a
callback?', on Mon, 20 Dec 2004:

and if of course not
self-modifying, so that it can be executed by multiple threads without
hassle.
A veritable model of recidivism!
--
Regards, John Woodgate, OOO - Own Opinions Only.
The good news is that nothing is compulsory.
The bad news is that everything is prohibited.
http://www.jmwa.demon.co.uk Also see http://www.isce.org.uk
 
On Sun, 19 Dec 2004 23:37:28 -0500, Spehro Pefhany
<speffSNIP@interlogDOTyou.knowwhat> wrote:

On Sun, 19 Dec 2004 18:42:28 -0800, the renowned John Larkin
john@spamless.usa> wrote:


Serves approximately 11, if you invite me.
John

There's always someone who wants to bogart the haggis.
Oh, no, you misunderstand; I am not a HaggisHog. I just meant that I
would kindly give up my share to the other 11 hungry diners.

Oatmeal is disgusting anyhow. If more people knew about grits, they
wouldn't make it at all.

John
 
I read in sci.electronics.design that Boris Mohar <borism_-void-
_@sympatico.ca> wrote (in <u62es05or1funpn48pp79m00s1b4n6uq4e@4ax.com>)
about 'what's a callback?', on Mon, 20 Dec 2004:
Looks like a giant maggot.. Fancy some geoduck?
I can't even pronounce it.
--
Regards, John Woodgate, OOO - Own Opinions Only.
The good news is that nothing is compulsory.
The bad news is that everything is prohibited.
http://www.jmwa.demon.co.uk Also see http://www.isce.org.uk
 
On Mon, 20 Dec 2004 00:08:08 -0500, Spehro Pefhany
<speffSNIP@interlogDOTyou.knowwhat> wrote:

A lot of things must be like that. Raw oysters, for example.

And what is the deal with oysters?

Exactly.
A properly-made fried oyster po-boy sandwich is one of the crowning
achievements of civilization. Add a cold beer, and it's # 1.

John
 
On Mon, 20 Dec 2004 12:16:38 -0500, Boris Mohar wrote:
On Sun, 19 Dec 2004 20:36:53 -0500, Spehro Pefhany
....
http://www.tulsascots.com/photos/haggis.jpg
http://haradakun.cool.ne.jp/shashin/haggis.jpg



Looks like a giant maggot.. Fancy some geoduck?

http://www.quitbuddies.org/Qb/geoduck.jpg
I thought it was goeduck. Isn't that feeding tube just meat, though? I
could see eating snail foot - I've never tried an oyster because it'd be
too much like eating little piles of guts.

I wish I could find some dried abalone - I should shop around the Asian
neighborhoods. In Korea, they had sun-dried squid, which was really quite
tasty. In Thailand, they have sun-dried lizard on a stick. Never tried one
of those. :)

Cheers!
Rich
 

Welcome to EDABoard.com

Sponsor

Back
Top