Lines Matching refs:minor
260 static int ptmx_clone(dev_t dev, int minor);
284 ptsd_kevent_mtx_lock(int minor)
286 lck_mtx_lock(&ptsd_kevent_lock[PTSD_KE_LOCK_INDEX(minor)]);
290 ptsd_kevent_mtx_unlock(int minor)
292 lck_mtx_unlock(&ptsd_kevent_lock[PTSD_KE_LOCK_INDEX(minor)]);
345 * Given a minor number, return the corresponding structure for that minor
349 * Parameters: minor Minor number of ptmx device
355 * !NULL structure corresponding minor number
360 ptmx_get_ioctl(int minor, int open_flag)
393 * doing so avoids a reallocation race on the minor number.
420 if (_state.pis_ioctl_list[minor] != NULL) {
433 _state.pis_ioctl_list[minor] = new_ptmx_ioctl;
438 _state.pis_ioctl_list[minor]->pt_flags |= PF_OPEN_M;
442 _state.pis_ioctl_list[minor]->pt_devhandle = devfs_make_node(
443 makedev(ptsd_major, minor),
445 PTSD_TEMPLATE, minor);
446 if (_state.pis_ioctl_list[minor]->pt_devhandle == NULL) {
451 _state.pis_ioctl_list[minor]->pt_flags |= PF_OPEN_S;
454 return (_state.pis_ioctl_list[minor]);
461 ptmx_free_ioctl(int minor, int open_flag)
466 _state.pis_ioctl_list[minor]->pt_flags &= ~(open_flag);
473 if (!(_state.pis_ioctl_list[minor]->pt_flags & (PF_OPEN_M|PF_OPEN_S))) {
475 old_ptmx_ioctl = _state.pis_ioctl_list[ minor];
494 _state.pis_ioctl_list[ minor] = NULL;
510 * minor number, or to return -1, if one can't be provided.
514 * Returns: >= 0 A new minor device number
540 * XXX same time, we could return the same minor to two
545 * XXX That would require returning &minor as implict return
562 if ((pti = ptmx_get_ioctl(minor(dev), 0)) == NULL) {
624 pti = ptmx_get_ioctl(minor(dev), 0);
645 ptmx_free_ioctl(minor(dev), PF_OPEN_S);
661 pti = ptmx_get_ioctl(minor(dev), 0);
749 pti = ptmx_get_ioctl(minor(dev), 0);
776 pti = ptmx_get_ioctl(minor(tp->t_dev), 0);
797 pti = ptmx_get_ioctl(minor(tp->t_dev), 0);
816 pti = ptmx_get_ioctl(minor(dev), PF_OPEN_M);
834 ptmx_free_ioctl(minor(dev), PF_OPEN_M);
858 pti = ptmx_get_ioctl(minor(dev), 0);
883 ptmx_free_ioctl(minor(dev), PF_OPEN_M);
896 pti = ptmx_get_ioctl(minor(dev), 0);
968 pti = ptmx_get_ioctl(minor(tp->t_dev), 0);
1044 pti = ptmx_get_ioctl(minor(dev), 0);
1094 pti = ptmx_get_ioctl(minor(dev), 0);
1176 pti = ptmx_get_ioctl(minor(dev), 0);
1294 pti = ptmx_get_ioctl(minor(dev), 0);
1426 snprintf(data, 128, "/dev/" PTSD_TEMPLATE, minor(dev));
1554 ptsd_kevent_mtx_lock(minor(lockdev));
1557 pti = ptmx_get_ioctl(minor(dev), 0);
1569 ptsd_kevent_mtx_unlock(minor(lockdev));
1580 ptsd_kevent_mtx_lock(minor(dev));
1591 pti = ptmx_get_ioctl(minor(dev), 0);
1626 ptsd_kevent_mtx_unlock(minor(dev));
1642 if ((pti = ptmx_get_ioctl(minor(dev), 0)) == NULL) {
1688 ptsd_kevent_mtx_lock(minor(dev));
1700 ptsd_kevent_mtx_unlock(minor(dev));
1707 ptsd_kevent_mtx_lock(minor(dev));
1723 ptsd_kevent_mtx_unlock(minor(dev));