svn commit: r217845 - stable/8/sys/kern

John Baldwin jhb at FreeBSD.org
Tue Jan 25 20:54:16 UTC 2011


Author: jhb
Date: Tue Jan 25 20:54:15 2011
New Revision: 217845
URL: http://svn.freebsd.org/changeset/base/217845

Log:
  MFC 215541:
  Set the POSIX semaphore capability when the semaphore module is enabled.

Modified:
  stable/8/sys/kern/uipc_sem.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/kern/uipc_sem.c
==============================================================================
--- stable/8/sys/kern/uipc_sem.c	Tue Jan 25 20:49:24 2011	(r217844)
+++ stable/8/sys/kern/uipc_sem.c	Tue Jan 25 20:54:15 2011	(r217845)
@@ -950,6 +950,7 @@ ksem_module_init(void)
 	mtx_init(&ksem_count_lock, "ksem count", NULL, MTX_DEF);
 	sx_init(&ksem_dict_lock, "ksem dictionary");
 	ksem_dictionary = hashinit(1024, M_KSEM, &ksem_hash);
+	p31b_setcfg(CTL_P1003_1B_SEMAPHORES, 200112L);
 	p31b_setcfg(CTL_P1003_1B_SEM_NSEMS_MAX, SEM_MAX);
 	p31b_setcfg(CTL_P1003_1B_SEM_VALUE_MAX, SEM_VALUE_MAX);
 
@@ -973,6 +974,7 @@ ksem_module_destroy(void)
 #endif
 	syscall_helper_unregister(ksem_syscalls);
 
+	p31b_setcfg(CTL_P1003_1B_SEMAPHORES, 0);
 	hashdestroy(ksem_dictionary, M_KSEM, ksem_hash);
 	sx_destroy(&ksem_dict_lock);
 	mtx_destroy(&ksem_count_lock);


More information about the svn-src-stable-8 mailing list