Skip to content

homogenise userspace thread cleanup #4

Description

@jncronin

Currently the main thread exits via thread_cleanup() then exit()
This correctly calls the userspace cleanup code (run pthread destructors etc), then calls the thread_cleanup syscall, then the exit syscall.

Other threads exit via the userspace thread_wrapper or via pthread_exit, which don't call the cleanup code. They instead use the pthread_exit syscall.

We should ensure that calls to pthread_exit and via normal thread return call the pthread destructor code first.
Also, use the same thread exit syscall for both (probably delete the cleanup one).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions