In a codebase I reviewed, I found the following idiom.
void notify(struct actor_t act) {
write(act.pipe, \"M\", 1);
}
// thread A sending data to thread
In practice, he's correct and a memory barrier is implied in this specific case.
But the point is that if its presence is "debatable", the code is already too complex and unclear.
Really guys, use a mutex or other proper constructs. It's the only safe way to deal with threads and to write maintainable code.
And maybe you'll see other errors, like that the code is unpredictable if send() is called more than one time.