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

Re: [MiNT] Calling gemdos function from Interruption



man, 10,.10.2005 kl. 22.41 +0200, skrev olivier.landemarre@utbm.fr:
> Hello
> 
> In the past we have already talk about calling gemdos from an interrupt (for
> example mouse), at this moment it was not possible without crash.
> Some weeks ago I have talk about this with Ingo and he said me that now it work.
> So my question is, is it really now possible? How can I know if Mint version use
> is compatible with this?

 What gemdos functions do you need to call from an interrupt? Calling
gemdos from an interrupt should not be done, since gemdos functions are
'context-dependant'. That means the OS needs to know which process is
calling it, which is not the case with interrupts. There is no telling
which process is the running one when the interrupt fires. For OS
things, like I do in XaAES, you can use client events which the
interrupt posts to the clients. This will remove all problems, and you
can control which process should get the event. In XaAES a mouse
interrupt sets a roottimeout, which again figures out which client
should get the mouse event, and then the relevant 'client event' is
posted to that client. You can also post signals to processes to make
them aware of the interrupt .. not sure how or which signal to use, but
I know it is perfectly possible.

 So, even if some gemdos functions are callable from interrupts, I think
it is a big no-no and should be avoided at all costs. The reason for
MagiC not being too stable, I think, is that such things are allowed.



 Best Regards,
Odd Skancke