Sorry, I'm embarrassed now that I know what you were actually looking for.
I will say: my answer did mention the need to atomically release the lock and then wait on the condition, but it was buried in a bunch of other crap that was not what you were looking for.
If you really want, I'll send you an email — let me know.