[gccsdk] Threading + Alt-Break = Trashed Computer

Ben Avison bavison at riscosopen.org
Thu Jul 10 16:02:55 PDT 2008


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).

Ben





More information about the gcc mailing list