svn commit: r290911 - head/contrib/netbsd-tests/kernel

Garrett Cooper ngie at FreeBSD.org
Mon Nov 16 04:53:14 UTC 2015


Author: ngie
Date: Mon Nov 16 04:53:13 2015
New Revision: 290911
URL: https://svnweb.freebsd.org/changeset/base/290911

Log:
  Ignore EINTR from usleep(3) in try_locks(..)
  
  NetBSD's usleep(3) only returns -1/sets errno=EINVAL when `microseconds`
  is one million or more
  
  MFC after: 3 days
  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/contrib/netbsd-tests/kernel/t_lockf.c

Modified: head/contrib/netbsd-tests/kernel/t_lockf.c
==============================================================================
--- head/contrib/netbsd-tests/kernel/t_lockf.c	Mon Nov 16 04:28:00 2015	(r290910)
+++ head/contrib/netbsd-tests/kernel/t_lockf.c	Mon Nov 16 04:53:13 2015	(r290911)
@@ -102,6 +102,9 @@ trylocks(int id)
 		(void)fcntl(fd, F_SETLKW, &fl);
 
 		if (usleep(sleeptime) < 0) 
+#if defined(__FreeBSD__)
+		  if (errno != EINTR)
+#endif
 		  err(1, "usleep");
 	}
 	printf("%d: done\n", id);


More information about the svn-src-all mailing list