Skip to content

Optional thread detach

Maximilian Nitsch requested to merge feature/optional-thread-detach into master
  • Make detached threads optional

    Adds a parameter to the hal_task_create() function to allow non-detached threads and a second parameter to pass the thread identifier.

  • Replace sigaction1 exit handler by sigwait 2

    In order to properly clean up all resources allocated by threads, we need to join the non-detached threads. This is not possible within the sigaction exit handler function. For this reason, the termination logic is changed to use sigwait.

  • Terminate all CLAs gracefully

    To enable CLA implementers to properly clean up the allocated resources, a virtual function cla_terminate() is added to the CLA interface, which is called at process termination for all registered CLAs.

See also #170 which is partially addressed by this MR.

  1. https://man7.org/linux/man-pages/man2/sigaction.2.htm

  2. https://man7.org/linux/man-pages/man3/sigwait.3.html

Edited by Felix Walter

Merge request reports