clarify the return value of monmwait. Reference: /n/atom/patch/applied/monmwaitrv Date: Sun Jun 8 11:24:31 CES 2014 Signed-off-by: quanstro@quanstro.net --- /sys/man/9/monmwait Sun Jun 8 11:24:17 2014 +++ /sys/man/9/monmwait Sun Jun 8 11:24:17 2014 @@ -20,7 +20,9 @@ to change from .B oldval in the most power- and bus-cycle efficient way afforded by -the architecture. +the architecture and return possibly unchanged value pointed to +by +.IR adr . .PP Since no lock is involved, .I monmwait @@ -35,8 +37,10 @@ means in the same cacheline. .PP -The minimal correct implementation would be a no-op. -On x86 machines, the implementation uses +The minimal correct implementation would be returning +the value pointed to by +.IR adr . +On recent x86 machines, the implementation uses the .SM MONITOR and @@ -48,8 +52,8 @@ while waiting for release to keep the fans from spooling up: .IP .EX -while(!active.thunderbirdsarego) - monmwait(&active.thunderbirdsarego, 0); +while(monmwait(&active.thunderbirdsarego, 0) == 0) + ; .EE .PP .SH SOURCE