Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Mar 2018 18:12:21 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r330344 - head/sys/kern
Message-ID:  <201803031812.w23ICLRI066887@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Sat Mar  3 18:12:21 2018
New Revision: 330344
URL: https://svnweb.freebsd.org/changeset/base/330344

Log:
  Correct the return code from pause() during cold startup from zero to
  EWOULDBLOCK. This also matches the description in pause(9).
  
  Discussed with:	kib@
  MFC after:	1 week
  Sponsored by:	Mellanox Technologies

Modified:
  head/sys/kern/kern_synch.c

Modified: head/sys/kern/kern_synch.c
==============================================================================
--- head/sys/kern/kern_synch.c	Sat Mar  3 18:11:02 2018	(r330343)
+++ head/sys/kern/kern_synch.c	Sat Mar  3 18:12:21 2018	(r330344)
@@ -326,7 +326,7 @@ pause_sbt(const char *wmesg, sbintime_t sbt, sbintime_
 		sbt = howmany(sbt, SBT_1US);
 		if (sbt > 0)
 			DELAY(sbt);
-		return (0);
+		return (EWOULDBLOCK);
 	}
 	return (_sleep(&pause_wchan[curcpu], NULL, 0, wmesg, sbt, pr, flags));
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803031812.w23ICLRI066887>