[os-event] Replace global cond by local cond for each waiting thread (#3941)