That PROCESS_EXITHANDLER() thing was after all kind of overengineered...
This commit is contained in:
parent
a300c31d7e
commit
1629c207b5
3 changed files with 11 additions and 24 deletions
|
@ -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.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue