Thomas Doerfler Thomas.Doerfler at embedded-brains.de
Mon Apr 16 13:39:13 UTC 2007


it is always the responsibility of the application to free any resources
associated with a certain task. Deleting a task from the outside
(asynchronously to its internal state) is dangerous. It might make more
sense to ask the task to delete itself (sending it a signal or an
event), then this task can decide when to do the actual deletion and it
can make sure that any resources are returned/cleaned up.

Please note that this is also the case for Unix tasks: it is good
practice for a task to install a signal handler, which captures signals
like "kill". When such a signal arrives, the task can e.g. delete any
temporary files, tore its own state etc.


WuHao schrieb:
> Hi:
> The rtems_task_delete routine does some deletions and free
> actions,however not include semaphore releases.When we delete a thread
> which is holding some semaphores/mutexes,it may cause problem in my
> opinion.Does the kernel do the semaphore releases in other place or not
> do that at all?
> Thanks,
> WuHao
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users

embedded brains GmbH
Thomas Doerfler           Obere Lagerstr. 30
D-82178 Puchheim          Germany
Tel. : +49-89-18 90 80 79-2
Fax  : +49-89-18 90 80 79-9
email: Thomas.Doerfler at embedded-brains.de
PGP public key available on request

More information about the users mailing list