Why do you need to plumb anything into the Unix library?
Generally speaking I would imagine you can achieve this by using a PE-side mutex, which is acquired by the Unix thread, and released only when calling functions.
Better—assuming I remember correctly that the synchronous reader is indeed supposed to synchronously read from the same thread—would probably be to get rid of the read thread, add the ability to check for read requests without blocking, and actually perform reads directly when waiting for samples. I made this proposal some time ago, but it was ignored, like many others.