[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Announcment: CFLIB for AHCC



Hello,

User programs should include a workaround to that USERDEF stack
problem, to cope with bad TOS. They should use some private user stack
to avoid that trouble. I posted a (potentially unsafe) solution to
this list long ago, but it had poor success.

Yes, I'm rembering that, of course :) Until now I never had hit the problem.
But I also rember it wasn't that easy to implement... On the other hand it's
an well known fact that the USERDEF function runs in super mode and
that there is little stack available... CFLIB/GEMLIB should handle it....


I don't think it could be easily fixed in gemlib (because gemlib is thread-safe designed, and so local variables are allocated in the stack).

This small TOS stack problem has been fixed in windom by replacing some gemlib functions by home-made-not-reentrant functions, only for userdef stuff.

See userdef/extended/draw.c, the workaround is between lines 38 and 125 :
http://windom.cvs.sourceforge.net/viewvc/windom/windom/userdef/extended/draw.c?revision=1.15&view=markup&pathrev=MAIN

Arnaud.