Mail Archives: djgpp/2000/05/22/23:45:21
The lock function macro described in the djgpp djgpp user's guide
("http://www.delorie.com/djgpp/doc/ug/interrupts/overview.html")
is defined as:
#define LOCK_FUNCTION(x) _go32_dpmi_lock_code(x,(long)sizeof(x));
When I tried to use this, I got the compile time error:
"ANSI C++ forbids taking the sizeof a function type"
When I tried using the Allegro definition of lock function:
#define LOCK_CODE(c,s) _go32_dpmi_lock_code((c), (s))
#define LOCK_FUNCTION(x) LOCK_CODE(x, (long)x##_end - (long)x)
I got the error:
dspcabs.h:39: `DSpaceKeyboardInterruptHandler_end' undeclared (first use this
function)
(DSpaceKeyboardInterruptHandler is my ISR)
Does anyone know how I can get a LOCK_FUNCTION macro that works?
Thanks
- Raw text -