advice for implementing an atomics wrapper

From: Ronald Klop <ronald-lists_at_klop.ws>
Date: Tue, 23 Jul 2024 14:14:11 UTC
Hi,

For mongodb 8.0 I need to give a FreeBSD implementation of this file.

https://github.com/mongodb/mongo/blob/master/src/mongo/platform/waitable_atomic.cpp

Using the __Apple__ definition gives:
ld.lld: error: undefined symbol: __ulock_wake
ld.lld: error: undefined symbol: __ulock_wait

And the __linux__ definition uses futex which FreeBSD does not have AFAIK.

What is an easy way to port this file?

Regards,
Ronald.