changeset 18391:3117d88099b1

OS-4139 sched_getaffinity reports incorrect number of CPUs
author Jerry Jelinek <jerry.jelinek@joyent.com>
date Thu, 02 Apr 2015 12:47:23 +0000
parents 995c7be0ef17
children 3eaba58ec958
files usr/src/lib/brand/lx/lx_brand/common/sched.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/lib/brand/lx/lx_brand/common/sched.c	Thu Apr 02 03:24:35 2015 +0000
+++ b/usr/src/lib/brand/lx/lx_brand/common/sched.c	Thu Apr 02 12:47:23 2015 +0000
@@ -22,7 +22,7 @@
 /*
  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
- * Copyright 2014 Joyent, Inc.  All rights reserved.
+ * Copyright 2015 Joyent, Inc.
  */
 
 #include <sys/types.h>
@@ -196,15 +196,15 @@
 	    ? -errno : 0);
 }
 
-#define	BITINDEX(ind)	(ind / (sizeof (ulong_t) * 8))
-#define	BITSHIFT(ind)	(1 << (ind % (sizeof (ulong_t) * 8)))
+#define	BITINDEX(ind)	(ind / (sizeof (uint_t) * 8))
+#define	BITSHIFT(ind)	(1 << (ind % (sizeof (uint_t) * 8)))
 
 /* ARGSUSED */
 long
 lx_sched_getaffinity(uintptr_t pid, uintptr_t len, uintptr_t maskp)
 {
 	int	sz;
-	ulong_t	*lmask, *zmask;
+	uint_t	*lmask, *zmask;
 	int	i;
 
 	sz = syscall(SYS_brand, B_GET_AFFINITY_MASK, pid, len, maskp);
@@ -249,7 +249,7 @@
 	int		sz;
 	int		i;
 	int		found;
-	ulong_t		*lmask;
+	uint_t		*lmask;
 	pid_t		s_pid;
 	lwpid_t		s_tid;
 	processorid_t	cpuid = NULL;