Lines Matching defs:pcp

249     pollcache_t *pcp, nfds_t nfds, int *fdcntp)
265 ASSERT(MUTEX_HELD(&pcp->pc_lock));
266 if (pcp->pc_bitmap == NULL) {
282 start = ostart = pcp->pc_mapstart;
283 end = pcp->pc_mapend;
305 fd = bt_getlowbit(pcp->pc_bitmap, start, end);
319 pdp = pcache_lookup_fd(pcp, fd);
362 BT_CLEAR(pcp->pc_bitmap, fd);
388 * cleaner solution if we could pass pcp as
396 curthread->t_pollcache = pcp;
418 ASSERT(BT_TEST(pcp->pc_bitmap, fd));
497 BT_CLEAR(pcp->pc_bitmap, fd);
513 BT_CLEAR(pcp->pc_bitmap, fd);
529 ((pcp->pc_flag & PC_POLLWAKE) == 0)) {
530 BT_CLEAR(pcp->pc_bitmap, fd);
558 pcp->pc_mapstart = start;
571 pollcache_t *pcp;
616 pcp = pcache_alloc();
617 dpep->dpe_pcache = pcp;
618 pcp->pc_pid = -1;
638 pollcache_t *pcp;
661 pcp = dpep->dpe_pcache;
666 if (!is_epoll && curproc->p_pid != pcp->pc_pid) {
667 if (pcp->pc_pid != -1) {
671 pcp->pc_pid = curproc->p_pid;
763 VERIFY(pollstate_enter(pcp) == PSE_SUCCESS);
765 if (pcp->pc_bitmap == NULL) {
766 pcache_create(pcp, pollfdnum);
784 pdp = pcache_lookup_fd(pcp, fd);
806 pdp->pd_pcache = pcp;
807 pcache_insert_fd(pcp, pdp, pollfdnum);
861 ASSERT(pdp->pd_pcache == pcp);
862 if (fd >= pcp->pc_mapsize) {
863 mutex_exit(&pcp->pc_lock);
864 pcache_grow_map(pcp, fd);
865 mutex_enter(&pcp->pc_lock);
867 if (fd > pcp->pc_mapend) {
868 pcp->pc_mapend = fd;
877 BT_SET(pcp->pc_bitmap, fd);
909 * cleaner solution if we could pass pcp as
917 curthread->t_pollcache = pcp;
928 BT_SET(pcp->pc_bitmap, fd);
972 BT_CLEAR(pcp->pc_bitmap, fd);
984 cv_broadcast(&pcp->pc_cv);
985 pcache_wake_parents(pcp);
987 pollstate_exit(pcp);
1022 pollcache_t *pcp;
1039 pcp = dpep->dpe_pcache;
1064 if (!is_epoll && curproc->p_pid != pcp->pc_pid) {
1065 if (pcp->pc_pid != -1) {
1070 pcp->pc_pid = curproc->p_pid;
1252 VERIFY(pollstate_enter(pcp) == PSE_SUCCESS);
1254 pcp->pc_flag &= ~PC_POLLWAKE;
1261 pcachelink_mark_stale(pcp);
1264 pcp, nfds, &fdcnt);
1269 pcachelink_purge_stale(pcp);
1274 if (pcp->pc_flag & PC_POLLWAKE)
1285 error = cv_timedwait_sig_hrtime(&pcp->pc_cv,
1286 &pcp->pc_lock, deadline);
1299 pollstate_exit(pcp);
1329 mutex_enter(&pcp->pc_lock);
1330 if (pcp->pc_hash == NULL) {
1335 mutex_exit(&pcp->pc_lock);
1340 mutex_exit(&pcp->pc_lock);
1343 pdp = pcache_lookup_fd(pcp, pollfd.fd);
1348 mutex_exit(&pcp->pc_lock);
1354 mutex_exit(&pcp->pc_lock);
1433 pollcache_t *pcp;
1451 pcp = dpep->dpe_pcache;
1455 res = pollstate_enter(pcp);
1461 rc = dp_pcache_poll(dpep, NULL, pcp, nfds, &fdcnt);
1465 pcachelink_assoc(pcp, ps->ps_pc_stack[0]);
1466 pollstate_exit(pcp);
1504 pollcache_t *pcp;
1516 pcp = dpep->dpe_pcache;
1517 ASSERT(pcp != NULL);
1523 hashtbl = pcp->pc_hash;
1524 for (i = 0; i < pcp->pc_hashsize; i++) {
1537 mutex_enter(&pcp->pc_no_exit);
1538 ASSERT(pcp->pc_busy >= 0);
1539 while (pcp->pc_busy > 0)
1540 cv_wait(&pcp->pc_busy_cv, &pcp->pc_no_exit);
1541 mutex_exit(&pcp->pc_no_exit);
1544 if (pcp->pc_parents != NULL || pcp->pc_children != NULL) {
1549 mutex_enter(&pcp->pc_lock);
1550 pcachelink_purge_all(pcp);
1551 mutex_exit(&pcp->pc_lock);
1554 pcache_destroy(pcp);
1640 pcachelink_mark_stale(pollcache_t *pcp)
1644 ASSERT(MUTEX_HELD(&pcp->pc_lock));
1646 plpn = &pcp->pc_children;
1647 for (pl = pcp->pc_children; pl != NULL; pl = *plpn) {
1670 pcachelink_purge_stale(pollcache_t *pcp)
1674 ASSERT(MUTEX_HELD(&pcp->pc_lock));
1676 plpn = &pcp->pc_children;
1677 for (pl = pcp->pc_children; pl != NULL; pl = *plpn) {
1700 pcachelink_purge_all(pollcache_t *pcp)
1704 ASSERT(MUTEX_HELD(&pcp->pc_lock));
1706 plpn = &pcp->pc_parents;
1707 for (pl = pcp->pc_parents; pl != NULL; pl = *plpn) {
1716 plpn = &pcp->pc_children;
1717 for (pl = pcp->pc_children; pl != NULL; pl = *plpn) {
1726 ASSERT(pcp->pc_parents == NULL);
1727 ASSERT(pcp->pc_children == NULL);