examples/AVR/Slave/AVR-Studio/slaveavr.aws
author Robert Lehmann <robert.lehmann@sitec-systems.de>
Tue, 28 Jul 2015 16:36:55 +0200
changeset 793 72e9e1064432
parent 413 57c7a451c671
permissions -rw-r--r--
timers_unix: Fix termination problem of WaitReceiveTaskEnd

The function pthread_kill sends the Signal thread and to the own process.
If you use this construct than the application which calls uses the
canfestival api will terminate at the call of canClose. To avoid that
use pthread_cancel instead of pthread_kill. To use the pthread_cancel call
you need to set the cancel ability in the thread function. That means
you need to call pthread_setcancelstate and pthread_setcanceltype.
For the termination of the thread at any time it is important to set the
cancel type to PTHREAD_CANCEL_ASYNCHRONOUS.
<AVRWorkspace><IOSettings><CurrentRegisters/></IOSettings><part name="AT90CAN128"/><Files><File00000 Name="I:\Entwicklung\Firmware\CAN\CanFestival-3\examples\AVR\Slave\main.c" Position="332 160 1009 573" LineCol="47 0" State="Maximized"/><File00001 Name="I:\Entwicklung\Firmware\CAN\CanFestival-3\examples\AVR\Slave\Makefile" Position="262 71 1119 661" LineCol="18 46" State="Maximized"/><File00002 Name="I:\Entwicklung\Firmware\CAN\CanFestival-3\examples\AVR\Slave\AVR-Studio\default\Makefile" Position="266 94 939 481" LineCol="0 0" State="Maximized"/></Files></AVRWorkspace>