Conversation
Instead of `pthread_spinlock_t` use `os_unfair_lock_t` because macos is missing the pthread spinlock. `sem_init` is deprecated on macos and always returns `-1`. Use `sem_open` together with `sem_unlink` to open an exclusive sempahore in global namespace. Use `sem_wait` because `sem_timedWait` is missing on macos.
|
Hi @blaztinn I'm trying to import your patches into DaemonEngine#33 (which already features many other fixes, you'll maybe interested in that crunch tree). It doesn't work yet on my end as there are some remaining errors though. |
|
Hi @blaztinn we merged your fix in Dæmon engine's tree, this tree has also a lot of other fixes so you may be interested by it: |
Hi @illwieckz , thank you for letting me know about the other crunch tree. On the mobile games I work on we already moved to ASTC texture compression, but in case we need some fixes for crunch I'll be checking it out for sure! I'm glad that my changes we're helpful to you and that you solved the build/link issues you had :) |
Update Makefile, includes and defines to support Macos.
Update also posix threading usage with macos specific spinlocks and
global namespace (but still exclusive) sempahores because macos is
lacking some posix functionality.