News for hackers. Stuff that matters.
Re:It's time to get the Posix elephant off our necks by sakras on Thursday February 23, 2023 @03:33AM (#34908252)
> With shared memory in particular, the issue gets tricky around signalling and locking aka indicating to other processes when new info is available, and when another process is accessing the data.

POSIX has mutex and condition variable, is this not enough to do those things?

Re:It's time to get the Posix elephant off our necks by jasmer on Friday February 24, 2023 @06:22AM (#34923366)
As far as I know mutex is not a signal that data is received, which would require some kind of threading / interrupt.

Moreover, it's a bit of a secondary thing.

The API would look something like a call function with a receive function/lambda on the receiving side, with memory possibly being 'handed over' or whatever. And so the level of abstraction would be slightly higher.

And it would be a no-brainer, well established thing. Searching for how to do that today and it's always complicated.

Re:It's time to get the Posix elephant off our necks by sakras on Friday February 24, 2023 @02:17PM (#34928684)
I’m afraid I don’t understand. If you want one process to signal to another that data is available, you have the receiver block on a condition variable. When the sender writes its data it signals the condition variable. This is all handled by the kernel, no signal/interrupt is required. Or if you don’t want blocking, you can have a shared ring buffer, with the two processes interacting with it atomically.