Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Nov 2010 17:56:16 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r215540 - head/sys/kern
Message-ID:  <201011191756.oAJHuGIg083781@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Fri Nov 19 17:56:16 2010
New Revision: 215540
URL: http://svn.freebsd.org/changeset/base/215540

Log:
  Set various POSIX capability sysctls to the version of the API that is
  supported rather than 1.  They are supposed to return a suitable value
  for sysconf(3).  While here, make the fsync sysctl match <unistd.h>.
  
  MFC after:	1 week

Modified:
  head/sys/kern/p1003_1b.c
  head/sys/kern/posix4_mib.c

Modified: head/sys/kern/p1003_1b.c
==============================================================================
--- head/sys/kern/p1003_1b.c	Fri Nov 19 17:49:16 2010	(r215539)
+++ head/sys/kern/p1003_1b.c	Fri Nov 19 17:56:16 2010	(r215540)
@@ -102,7 +102,7 @@ sched_attach(void)
 	int ret = ksched_attach(&ksched);
 
 	if (ret == 0)
-		p31b_setcfg(CTL_P1003_1B_PRIORITY_SCHEDULING, 1);
+		p31b_setcfg(CTL_P1003_1B_PRIORITY_SCHEDULING, 200112L);
 
 	return ret;
 }

Modified: head/sys/kern/posix4_mib.c
==============================================================================
--- head/sys/kern/posix4_mib.c	Fri Nov 19 17:49:16 2010	(r215539)
+++ head/sys/kern/posix4_mib.c	Fri Nov 19 17:56:16 2010	(r215540)
@@ -164,9 +164,10 @@ p31b_iscfg(int num)
 static void
 p31b_set_standard(void *dummy)
 {
-	/* ??? p31b_setcfg(CTL_P1003_1B_FSYNC, 1); */
-	p31b_setcfg(CTL_P1003_1B_MAPPED_FILES, 1);
-	p31b_setcfg(CTL_P1003_1B_SHARED_MEMORY_OBJECTS, 1);
+
+	p31b_setcfg(CTL_P1003_1B_FSYNC, 200112L);
+	p31b_setcfg(CTL_P1003_1B_MAPPED_FILES, 200112L);
+	p31b_setcfg(CTL_P1003_1B_SHARED_MEMORY_OBJECTS, 200112L);
 	p31b_setcfg(CTL_P1003_1B_PAGESIZE, PAGE_SIZE);
 	if (!p31b_iscfg(CTL_P1003_1B_AIO_LISTIO_MAX))
 		p31b_setcfg(CTL_P1003_1B_AIO_LISTIO_MAX, -1);



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