Skip to content

GThreads: Rewrite __gthread_once() #115

@sba1

Description

@sba1

Since Reschedule() in OS4 does exactly nothing (and was deprecated in the lastest SDK, which may change in the future again), the intended behavour of the current __gthread_once implementation to quickly give up cpu is not met. Also, it is dangerous to poll in case the firstly entred thread A has a lower pri than a one B that enters later because the A preempted over B giving A no chance to continue. Thread A's priority may be risen to the one of B (in general, to the highest one), but this is rather difficult to achieve because we don't know what func does (it could mess around with task pri's as well).

The current way was always be meant as a temporay solution. It is now time to provide a correct solution possibly involving semphores.

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