[gccsdk] Threading + Alt-Break = Trashed Computer

Peter Naulls peter at chocky.org
Thu Jul 10 16:16:17 PDT 2008

Ben Avison wrote:
> On Thu, 10 Jul 2008, John-Mark Bell wrote:
>> Therefore, it seems obvious that the filters need removing by UnixLib  
>> when Alt-Break happens. Quite how we achieve this is left as an exercise  
>> for the reader -- my knowledge of the watchdog is approximately nil.
> The watchdog sets a transient callback from the key event, and in the
> callback it does a task switch (without going through Wimp_Poll) and calls
> SWI OS_Exit.
> The neatest thing you could do would be to install an exit handler to remove
> the filters. Slightly hackier, you could do so on the pre-poll filter of the
> Wimp_Poll call made by the Wimp's default exit handler (which will be called
> when any user-installed exit handler exits itself by calling OS_Exit).

UnixLib has an exit handler.   But probably the fix here is simple and
has already been mentioned - it needs to remove the filters in it.

More information about the gcc mailing list