That PROCESS_EXITHANDLER() thing was after all kind of overengineered...

This commit is contained in:
oliverschmidt 2007-05-23 22:13:29 +00:00
parent a300c31d7e
commit 1629c207b5
3 changed files with 11 additions and 24 deletions

View file

@ -80,15 +80,6 @@ pollhandler(void)
process_poll(&example_packet_driver_process);
}
/*---------------------------------------------------------------------------*/
/*
* Here we shutdown the hardware in case the process exits.
*/
static void
exithandler(void)
{
shutdown_the_hardware();
}
/*---------------------------------------------------------------------------*/
/*
* Finally, we define the process that does the work.
*/
@ -135,6 +126,11 @@ PROCESS_THREAD(example_packet_driver_process, ev, data)
*/
PROCESS_WAIT_EVENT_UNTIL(ev == PROCESS_EVENT_EXIT);
/*
* Now we shutdown the hardware.
*/
shutdown_the_hardware();
/*
* Here ends the process.
*/