Set the POSIX semaphore capability when the semaphore module is enabled.
This is ignored in HEAD where semaphores are marked as always enabled in <unistd.h>. MFC after: 1 week
This commit is contained in:
parent
34c1c5992f
commit
2e7758a8f6
@ -949,6 +949,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);
|
||||
|
||||
@ -972,6 +973,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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user