We currently don't support the pthread synchronization primitives on FreeBSD. And it turns out that supporting them will require some refactoring of how we implement those primitives: on FreeBSD, pthread_mutex_t et al are just a pointer to the actual data. That means on a 32bit system they are only 4 bytes large, which is not large enough for us to store the data we need to store directly in the pthread_mutex_t.
So we should move that data out of machine memory into dedicated machine state, which also has the advantage of making it more tamper-resistant. Once that's done, implementing FreeBSD support should be fairly easy.
We currently don't support the pthread synchronization primitives on FreeBSD. And it turns out that supporting them will require some refactoring of how we implement those primitives: on FreeBSD,
pthread_mutex_t
et al are just a pointer to the actual data. That means on a 32bit system they are only 4 bytes large, which is not large enough for us to store the data we need to store directly in thepthread_mutex_t
.So we should move that data out of machine memory into dedicated machine state, which also has the advantage of making it more tamper-resistant. Once that's done, implementing FreeBSD support should be fairly easy.