Skip to content

Refinement of atomic operations in HClib runtime #76

@sbak5

Description

@sbak5

Hclib uses __sync builtins through wrappers. This is deprecated builtins in gcc.

I think C11 is enforced for HClib which means we can use c11 atomics instead for atomic operations.

Relaxed consistency through 'acquire' and 'release' provides more efficient synchronization of memory writes/reads. I can easily find that some parts of hclib runtime codes are not synchronized correctly with 'release' memory barrier. This can cause hang in weak consistency machines such as ARM/Power. It might be fine on TSO machines such as x86 but I guess it's better to use consistent relaxed consistency model across all of runtime codes for compatibility across common architectures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions