Mail Archives: djgpp/1997/12/31/12:03:31
Gary wrote:
>
> Hello all,I am a learner of C and are somewhat puzzled by some code I've come
> across in Allegro,namely in allegro.h where it states as follows
> #define END_OF_FUNCTION(x) x##_end(){}
It has to do with marking the end of a function so that somewhere else
you can know exactly how long (how much memory) the function is. This
is necessary when locking the function in memory. i.e. not letting it
get paged out with virtual memory. This is necessary for functions that
might be called during an interrupt, otherwise you get a crash.
Doug Eleveld
P.S. I believe Allegro's gui.c source file uses that stuff with it's
double click detection. Take a look at that.
- Raw text -