• MorphOS Developer
    Piru
    Posts: 576 from 2003/2/24
    From: finland, the l...
    Quote:

    Georg wrote:
    Btw, the example code in TLSCallDestructors() autodoc using SIGF_SINGLE is not really safe.

    Random wild example: if current or future implementation of CreateNewProc() did some debug output after AddTask() and debug output for some reasons happens to need to do some semaphore locking then the created task doing (Signal(parent, SIGF_SINGLE)) could erranouesly wake up the CreateNewProc() which by bad luck is still blocked in ObtainSemaphore() call.


    Such change to CreateNewProc() would prove rather dangerous in my opinion. However, I will amend this autodoc for the next SDK to avoid giving even potentially dangerous example.
  • »03.01.21 - 18:00
    Profile