apple / swift-atomics

Low-level atomic operations for Swift
Apache License 2.0
1.06k stars 50 forks source link

[_AtomicShims] On Darwin, call swift_retain_n/swift_release_n via inline assembly #96

Closed lorentey closed 1 year ago

lorentey commented 1 year ago

This is an alternative to #95, using another, far more fascinating, way to attempt to resolve #55. It uses the C header smuggle a call to swift_retain_n/swift_release_n behind the back of the Swift ARC optimizer using inline assembly.

(This draft generates procedure calls; it would probably be better to jump directly into the runtime.)

Resolves #55.

Checklist

lorentey commented 1 year ago

@swift-ci test

lorentey commented 1 year ago

Closing in favor of #97.