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

Re: [MiNT] Preemption in AES



2013/3/6 Miro Kropáček <miro.kropacek@gmail.com>
Hi,

is there any definition, set of rules when AES (or desktop) is supposed to be blocking no matter what? Because, to my surprise, it seems that XaAES+Teradesk behaves as a blocking process in some cases. Typical example is when I drag mouse on desktop (to create a rectangle). 


I do not think there are definitive rules, but Xaaes is not reentrant. IMO, it is just implementation detail and (at least for AES) I think it could be made reentrant (at least partially).
 
Doesn't matter if my application does this:

while( true )
{
evnt_multi( wait_250_ms_and_other_events ); // <-- preemption occurs here
... do other stuff ...
}

or this:

while( true )
{
evnt_multi( return_immediately );
usleep(250 ms); // <-- preemption occurs here
... do other stuff ...
}

the application is preempted and never gain control again unless I drop the mouse button. Is this correct / expected behavior?


Probably because Teradesk uses single VDI/AES (I do not remember where it actually is) for draging mouse. So, your call blocks.

If you want to do something while AES blocks, the solution here would forking, mintlib way. And if you still want to use GUI, you have bad luck.

 
--
MiKRO / Mystic Bytes
http://mikro.atari.org



--
Semper Fidelis

Adam Klobukowski
adamklobukowski@gmail.com