Skip to content
Snippets Groups Projects
Select Git revision
  • dualcore
  • ch3/leds
  • wip-bootstrap default
  • ch3/time
  • master
5 results

windows_mphal.c

  • stijn's avatar
    a5aa03ac
    windows: Better handling of Ctrl-C · a5aa03ac
    stijn authored
    This builds upon the changes made in 21950463. Using signal() does not
    produce reliable results so SetConsoleCtrlHandler is used, and the handler
    is installed only once during initialization instead of removing it in
    mp_hal_set_interrupt_char when it is not strictly needed anymore, since
    removing it might lead to Ctrl-C events being missed because they are
    fired on a seperate thread which might only become alive after the handler
    was removed.
    a5aa03ac
    History
    windows: Better handling of Ctrl-C
    stijn authored
    This builds upon the changes made in 21950463. Using signal() does not
    produce reliable results so SetConsoleCtrlHandler is used, and the handler
    is installed only once during initialization instead of removing it in
    mp_hal_set_interrupt_char when it is not strictly needed anymore, since
    removing it might lead to Ctrl-C events being missed because they are
    fired on a seperate thread which might only become alive after the handler
    was removed.