- { psem_read, psem_write, psem_ioctl, psem_select, psem_closefile };
+ { psem_read, psem_write, psem_ioctl, psem_select, psem_closefile, psem_kqfilter, 0 };
+
+
+static lck_grp_t *psx_sem_subsys_lck_grp;
+static lck_grp_attr_t *psx_sem_subsys_lck_grp_attr;
+static lck_attr_t *psx_sem_subsys_lck_attr;
+static lck_mtx_t psx_sem_subsys_mutex;
+
+#define PSEM_SUBSYS_LOCK() lck_mtx_lock(& psx_sem_subsys_mutex)
+#define PSEM_SUBSYS_UNLOCK() lck_mtx_unlock(& psx_sem_subsys_mutex)
+
+
+static int psem_cache_add(struct pseminfo *psemp, struct psemname *pnp, struct psemcache *pcp);
+/* Initialize the mutex governing access to the posix sem subsystem */
+__private_extern__ void
+psem_lock_init( void )
+{
+
+ psx_sem_subsys_lck_grp_attr = lck_grp_attr_alloc_init();
+ lck_grp_attr_setstat(psx_sem_subsys_lck_grp_attr);
+
+ psx_sem_subsys_lck_grp = lck_grp_alloc_init("posix shared memory", psx_sem_subsys_lck_grp_attr);
+
+ psx_sem_subsys_lck_attr = lck_attr_alloc_init();
+ /* lck_attr_setdebug(psx_sem_subsys_lck_attr); */
+ lck_mtx_init(& psx_sem_subsys_mutex, psx_sem_subsys_lck_grp, psx_sem_subsys_lck_attr);
+}