Lines Matching refs:updatebits

511 int ksyn_wakeupreaders(ksyn_wait_queue_t kwq, uint32_t limitread, int longreadset, int allreaders, uint32_t updatebits, int * wokenp);
588 uint32_t nextgen, low_writer, updatebits, returnbits = 0;
604 updatebits = (kwq->kw_highseq & PTHRW_COUNT_MASK) | (PTH_RWL_EBIT | PTH_RWL_KBIT);
610 kwe->kwe_psynchretval = updatebits;
634 kwe->kwe_psynchretval = updatebits | PTH_RWL_MTX_WAIT;
650 kwq->kw_pre_intrretbits = updatebits;
677 kwe->kwe_psynchretval = updatebits | PTH_RWL_MTX_WAIT;
767 uint32_t lockseq, updatebits=0;
831 updatebits = lockseq | (PTH_RWL_KBIT | PTH_RWL_EBIT);
833 updatebits = (kwq->kw_highseq & PTHRW_COUNT_MASK) | (PTH_RWL_KBIT | PTH_RWL_EBIT);
835 updatebits &= ~PTH_RWL_MTX_WAIT;
837 kwe->kwe_psynchretval = updatebits;
839 if (updatebits == 0) {
843 *retval = updatebits;
880 __PTHREAD_TRACE_DEBUG(_PSYNCH_TRACE_MLWAIT | DBG_FUNC_END, (uint32_t)mutex, 0xeeeeeeed, updatebits, error, 0);
890 uint32_t updatebits = 0;
919 updatebits = kwe->kwe_psynchretval;
920 updatebits &= ~PTH_RWL_MTX_WAIT;
921 uth->uu_rval[0] = updatebits;
923 if (updatebits == 0)
928 __PTHREAD_TRACE_DEBUG(_PSYNCH_TRACE_MLWAIT | DBG_FUNC_END, (uint32_t)kwq->kw_addr, 0xeeeeeeed, updatebits, error, 0);
976 uint32_t updatebits = 0;
1021 ksyn_handle_cvbroad(ckwq, uptoseq, &updatebits);
1024 ckwq->kw_sword += (updatebits & PTHRW_COUNT_MASK);
1025 ksyn_cvupdate_fixup(ckwq, &updatebits, &kfreeq, 1);
1028 *retval = updatebits;
1069 uint32_t updatebits = 0;
1147 ksyn_handle_cvbroad(ckwq, uptoseq, &updatebits);
1160 updatebits += PTHRW_INC;
1163 ckwq->kw_sword += (updatebits & PTHRW_COUNT_MASK);
1177 ksyn_handle_cvbroad(ckwq, uptoseq, &updatebits);
1178 ckwq->kw_sword += (updatebits & PTHRW_COUNT_MASK);
1205 ksyn_cvupdate_fixup(ckwq, &updatebits, &kfreeq, 1);
1218 *retval = updatebits;
1220 __PTHREAD_TRACE_DEBUG(_PSYNCH_TRACE_CVSIGNAL | DBG_FUNC_END, (uint32_t)cond, 0xeeeeeeed, updatebits, error, 0);
1243 uint32_t lockseq, updatebits=0;
1345 ksyn_handle_cvbroad(ckwq, kwe->kwe_lockseq, &updatebits);
1347 if (updatebits != 0)
1349 updatebits);
1364 updatebits = PTHRW_INC;
1368 ksyn_cvupdate_fixup(ckwq, &updatebits, &kfreeq, 1);
1373 *retval = updatebits;
1587 uint32_t lockseq = 0, updatebits = 0, preseq = 0, prerw_wc = 0;
1652 error = kwq_handle_overlap(kwq, lgen, ugen, rw_wc, &updatebits, (KW_UNLOCK_PREPOST_READLOCK|KW_UNLOCK_PREPOST), &block);
1659 kwe->kwe_psynchretval = updatebits;
1661 __PTHREAD_TRACE_DEBUG(_PSYNCH_TRACE_RWRDLOCK | DBG_FUNC_NONE, (uint32_t)rwlock, 0xff, updatebits, 0xee, 0);
1683 error = kwq_handle_unlock(kwq, preseq, prerw_wc, &updatebits, (KW_UNLOCK_PREPOST_READLOCK|KW_UNLOCK_PREPOST), &block, lgen);
1765 uint32_t lockseq = 0, updatebits = 0, preseq = 0, prerw_wc = 0;
1829 error = kwq_handle_unlock(kwq, preseq, prerw_wc, &updatebits, (KW_UNLOCK_PREPOST_LREADLOCK|KW_UNLOCK_PREPOST), &block, lgen);
1907 uint32_t lockseq = 0, updatebits = 0, preseq = 0, prerw_wc = 0;
1977 error = kwq_handle_unlock(kwq, preseq, prerw_wc, &updatebits, (KW_UNLOCK_PREPOST_WRLOCK|KW_UNLOCK_PREPOST), &block, lgen);
1984 *retval = updatebits;
2068 uint32_t lockseq = 0, updatebits = 0, preseq = 0, prerw_wc = 0;
2128 error = kwq_handle_unlock(kwq, preseq, prerw_wc, &updatebits, (KW_UNLOCK_PREPOST_YWRLOCK|KW_UNLOCK_PREPOST), &block, lgen);
2135 *retval = updatebits;
2241 /* spurious updatebits?? */
2321 uint32_t lockseq = 0, updatebits = 0, preseq = 0;
2387 error = kwq_handle_unlock(kwq, preseq, prerw_wc, &updatebits, (KW_UNLOCK_PREPOST_UPGRADE|KW_UNLOCK_PREPOST), &block, lgen);
2476 uint32_t updatebits = 0;
2546 error = kwq_handle_unlock(kwq, lgen, rw_wc, &updatebits, 0, NULL, 0);
2554 *retval = updatebits;
2562 __PTHREAD_TRACE_DEBUG(_PSYNCH_TRACE_RWUNLOCK | DBG_FUNC_END, (uint32_t)rwlock, 0, updatebits, error, 0);
2578 updatebits = lgen; /* let this not do unlock handling */
3276 ksyn_wakeupreaders(ksyn_wait_queue_t kwq, uint32_t limitread, int longreadset, int allreaders, uint32_t updatebits, int * wokenp)
3285 lbits = updatebits;
3346 uint32_t updatebits=0, numneeded = 0;;
3375 updatebits = PTH_RWL_EBIT | PTH_RWL_KBIT;
3377 updatebits |= PTH_RWL_WBIT;
3379 updatebits |= PTH_RWL_YBIT;
3392 kwq->kw_nextseqword = (rw_wc & PTHRW_COUNT_MASK) + updatebits;
3393 kwe->kwe_psynchretval = updatebits;
3430 updatebits = 0;
3441 updatebits |= (PTH_RWL_WBIT | PTH_RWL_KBIT);
3443 updatebits |= PTH_RWL_YBIT;
3498 updatebits |= PTH_RWL_LBIT;
3499 updatebits &= ~PTH_RWL_KBIT;
3504 updatebits += (numneeded << PTHRW_COUNT_SHIFT);
3544 updatebits += (numneeded << PTHRW_COUNT_SHIFT);
3546 kwq->kw_nextseqword = (rw_wc & PTHRW_COUNT_MASK) + updatebits;
3552 kwe->kwe_psynchretval = updatebits;
3556 failed = ksyn_wakeupreaders(kwq, limitrdnum, longreadset, allreaders, updatebits, &woken);
3564 kwq->kw_pre_intrretbits = updatebits;
3573 if ((kwq->kw_ksynqueues[KSYN_QUEUE_WRITER].ksynq_count != 0) && ((updatebits & PTH_RWL_WBIT) == 0))
3574 panic("kwq_handle_unlock: writer pending but no writebit set %x\n", updatebits);
3581 updatebits |= (PTHRW_INC);
3582 updatebits |= PTH_RWL_KBIT| PTH_RWL_EBIT;
3587 updatebits |= PTH_RWL_WBIT;
3589 updatebits |= PTH_RWL_YBIT;
3593 kwe->kwe_psynchretval = updatebits;
3600 updatebits |= PTH_RWL_WBIT;
3602 updatebits |= PTH_RWL_YBIT;
3603 kwe->kwe_psynchretval = updatebits;
3617 kwq->kw_pre_intrretbits = updatebits;
3622 kwq->kw_nextseqword = (rw_wc & PTHRW_COUNT_MASK) + updatebits;
3623 if ((updatebits & (PTH_RWL_KBIT | PTH_RWL_EBIT)) != (PTH_RWL_KBIT | PTH_RWL_EBIT))
3624 panic("kwq_handle_unlock: writer lock granted but no ke set %x\n", updatebits);
3634 updatebits |= (PTH_RWL_WBIT | PTH_RWL_KBIT);
3636 updatebits |= PTH_RWL_YBIT;
3645 updatebits += (numneeded << PTHRW_COUNT_SHIFT);
3650 updatebits += PTHRW_INC;
3651 kwe->kwe_psynchretval = updatebits;
3655 kwq->kw_nextseqword = (rw_wc & PTHRW_COUNT_MASK) + updatebits;
3658 failed = ksyn_wakeupreaders(kwq, low_writer, 0, 0, updatebits, NULL);
3665 kwq->kw_pre_intrretbits = updatebits;
3672 updatebits += (numneeded << PTHRW_COUNT_SHIFT);
3676 updatebits += PTHRW_INC;
3677 kwe->kwe_psynchretval = updatebits;
3680 kwq->kw_nextseqword = (rw_wc & PTHRW_COUNT_MASK) + updatebits;
3681 failed = ksyn_wakeupreaders(kwq, low_writer, 0, 1, updatebits, &woken);
3688 kwq->kw_pre_intrretbits = updatebits;
3696 updatebits |= PTHRW_INC;
3697 updatebits |= PTH_RWL_KBIT| PTH_RWL_EBIT;
3705 updatebits |= PTH_RWL_WBIT;
3707 updatebits |= PTH_RWL_YBIT;
3712 kwe->kwe_psynchretval = updatebits;
3718 updatebits |= PTH_RWL_WBIT;
3721 updatebits |= PTH_RWL_YBIT;
3723 kwe->kwe_psynchretval = updatebits;
3737 kwq->kw_pre_intrretbits = updatebits;
3742 kwq->kw_nextseqword = (rw_wc & PTHRW_COUNT_MASK) + updatebits;
3755 *updatep = updatebits;
3759 __PTHREAD_TRACE_DEBUG(_PSYNCH_TRACE_RWHANDLEU | DBG_FUNC_END, (uint32_t)kwq->kw_addr, 0, updatebits, block, 0);
3808 uint32_t updatebits, lowriter = 0;
3812 updatebits = mgen;
3833 count = ksyn_wakeupreaders(kwq, lowriter, longreadset, allreaders, updatebits, NULL);
4375 uint32_t updatebits = 0;
4415 updatebits += PTHRW_INC;
4470 *updatep = updatebits;
4473 __PTHREAD_TRACE_DEBUG(_PSYNCH_TRACE_CVHBROAD | DBG_FUNC_END, 0xeeeeeeed, updatebits, 0, 0, 0);
4480 uint32_t updatebits = 0;
4483 updatebits = *updatep;
4485 updatebits |= PTH_RWS_CV_CBIT;
4498 updatebits |= PTH_RWS_CV_PBIT;
4501 *updatep = updatebits;