apache / apache/trafficserver

Need to switch from ink_atomic.h to Standard lib <atomic>

Open
#7,398 2 comments 0 reactions 0 assignees View on GitHub
Cleanup Stale
Dominant language
C++
Stars
2k
Forks
874
Avg merge
6d 15h
Merged PRs (30d)
46

Description

This is not simply a cosmetic issue. ink_atomic.h effectively assumes there is no need for memory fence instructions on any architecture that TS runs on:

https://github.com/apache/trafficserver/blob/77714f253f3a3ab4ce39877da52e14b6270f6868/include/tscore/ink_atomic.h#L171

For x86 architectures for example, this is not true for any version after the 386. It may also be true, for some architectures (or compiler options), that the alignment requirements when doing atomic access are stricter than those for non-atomic access.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.