belozierov / SwiftCoroutine

Swift coroutines for iOS, macOS and Linux.
https://belozierov.github.io/SwiftCoroutine
MIT License
836 stars 51 forks source link

is it possible to support 32-bit architecture? #29

Closed kaelsun closed 4 years ago

kaelsun commented 4 years ago

32-bit architecture support required if we want to use SwiftCoroutine in large projects

kaelsun commented 4 years ago

if you don't want to support armv7, could you please explain "how", so i could fork the code and have a try myself...

belozierov commented 4 years ago

@kaelsun Hi, in general it is possible, but I refused it for a number of reasons and I am not going to add this support because of complexity to support 64 and 32 bit systems simultaneously.

It is not difficult to add support for the coroutines themselves. You need to add an implementation for armv7 in CCoroutine.c for __start func.

The problem is that for CoFuture, CoChannel etc. I use atomic primitives for synchronisations where I everywhere assume they are 64-bit. This is the biggest problem for 32-bit support.

kaelsun commented 4 years ago

got it, thanks