Lines Matching refs:SO
127 memory contains no accessible areas and so all reads produce this
141 /* Scalar Timestamp. We have to store a lot of these, so there is
165 will do, so long as they are unique), but it does help ensure they
168 So, SCALARTS_N_THRBITS must be 11 or more.
176 It is a maximum sized VTS, so has (1 << SCALARTS_N_TYMBITS)
177 ScalarTSs. So we can't make SCALARTS_N_THRBITS too large without
186 ThrID == 0 to denote an empty Thr_n_RCEC record. So ThrID == 0
232 seen, so the actual layout is:
238 So a mask for the R-bits is 0xAAAA and for the W bits is 0x5555.
301 do not expect to see any uses of .viR or .viW, so it is safe to
332 // data decls: SO //
378 /* A double linked list of all the SO's. */
379 SO* admin_SO;
406 to SVal__rcinc and SVal__rcdec, will be correct, and so any items with a
567 cache so it is empty is to set all the tag values to any value % 8
867 So, stop iteration, remove from map_shmem, recreate the iteration
939 the secmap wordFM. So, this is to be used for statistics only. */
1057 data, so it can be read into the cache.
1101 /* re RCs, we are rcdec_LineZ/clear_LineF_of_Z this LineZ so that new data
1480 /* The cache line may have been invalidated; if so, ignore it. */
2041 entire set, so we do. */
2086 /* Ok, so the dead thread table thrids has unique and in-order keys. */
2124 vts[me]++, so to speak. Caller must have pre-allocated 'out'
2135 LT, GT, UN), in fact we only need LEQ, and so we may as well
2148 based on their VCs, so they can be looked up in a table, tree, etc.
2155 /* Debugging only. Return vts[index], so to speak. */
2161 and .viW) will never again change, and so all mentions of this
2287 /* Return a new VTS in which vts[me]++, so to speak. 'vts' itself is
2559 based on their VCs, so they can be looked up in a table, tree, etc.
2561 performance critical so there is some effort expended to make it sa
2634 /* Debugging only. Return vts[index], so to speak.
2667 VtsID_INVALID, partly so as to avoid holding on to the VTSs, but
2668 mostly so that we don't wind up pruning them (as that would be
2751 If .vts == NULL, then this entry is not in use, so:
2759 - this entry is not on freelist, so u.freelink == VtsID_INVALID
2784 set appropriately so as to check for the next GC point. */
3058 /* The rest of this routine only handles pruning, so we can
3069 Sorting is used for the check and so that we can quickly look
3155 If so, delete the one we just made and move on; if not, add
3263 and viW set to VtsID_INVALID, so we can't mess with them. */
3276 SO* so = admin_SO;
3277 while (so) {
3278 if (so->viR != VtsID_INVALID)
3279 remap_VtsID( vts_tab, new_tab, &so->viR );
3280 if (so->viW != VtsID_INVALID)
3281 remap_VtsID( vts_tab, new_tab, &so->viW );
3282 so = so->admin_next;
3285 /* So, we're nearly done (with this incredibly complex operation).
3578 /* miss. The filter doesn't hold this address, so ignore. */
3591 /* miss. The filter doesn't hold this address, so ignore. */
3698 // We have changed c, so re-establish clineno.
4309 move it one step closer to the front of the list, so as to make
4353 it, so the caller can immediately deallocate the original) and
4357 of zero and so the caller must immediately increment it. */
4509 // at both sides of the list. So, a node is always forward and
4706 read; that's stupid. So in this case move on. */
4717 So, 'roll' each stamp using event_map_stamp to have the
4949 are compared so as to find out which thread(s) this access
4951 pre-update Cw for the location, so we can index into it for those
4957 contains any races at all -- so we don't really need to show all
4958 conflicting access pairs initially, so long as we only show none if
4990 can become a performance overhead; so we defer the query until
5014 counting. So just do it now. */
5075 array have the same scalar Kw and to have a stack. So
5202 // and so join(rmini,tviW) == tviW
5540 its parent. So first, pull down to this level. */
5575 its parent. So first, pull down to this level. */
5670 /* To be simple, just copy byte by byte. But so as not to wreck
5685 sophistication so as to avoid generating large numbers of pointless
6147 /* A double linked list of all the SO's. */
6148 SO* admin_SO = NULL;
6150 static SO* SO__Alloc ( void )
6152 SO* so = HG_(zalloc)( "libhb.SO__Alloc.1", sizeof(SO) );
6153 so->viR = VtsID_INVALID;
6154 so->viW = VtsID_INVALID;
6155 so->magic = SO_MAGIC;
6159 admin_SO->admin_prev = so;
6160 so->admin_next = admin_SO;
6162 so->admin_next = NULL;
6164 so->admin_prev = NULL;
6165 admin_SO = so;
6167 return so;
6170 static void SO__Dealloc ( SO* so )
6172 tl_assert(so);
6173 tl_assert(so->magic == SO_MAGIC);
6174 if (so->viR == VtsID_INVALID) {
6175 tl_assert(so->viW == VtsID_INVALID);
6177 tl_assert(so->viW != VtsID_INVALID);
6178 VtsID__rcdec(so->viR);
6179 VtsID__rcdec(so->viW);
6181 so->magic = 0;
6183 if (so->admin_prev)
6184 so->admin_prev->admin_next = so->admin_next;
6185 if (so->admin_next)
6186 so->admin_next->admin_prev = so->admin_prev;
6187 if (so == admin_SO)
6188 admin_SO = so->admin_next;
6190 HG_(free)( so );
6226 // so make sure they're the size we expect them to be.
6231 /* so as to fit in a UInt w/ 5 bits to spare (see defn of
6237 them, so it's important from a space viewpoint. Unfortunately
6284 unique, it has never been seen before, so the implicit value
6294 early for that - it may not have a valid TId yet. So, let
6561 /* Tell the VTS mechanism this thread has exited, so it can
6592 /* Both Segs and SOs point to VTSs. However, there is no sharing, so
6594 a SO that points at a VTS. */
6596 SO* libhb_so_alloc ( void )
6601 void libhb_so_dealloc ( SO* so )
6603 tl_assert(so);
6604 tl_assert(so->magic == SO_MAGIC);
6605 SO__Dealloc(so);
6610 void libhb_so_send ( Thr* thr, SO* so, Bool strong_send )
6615 tl_assert(so);
6616 tl_assert(so->magic == SO_MAGIC);
6624 /* since we're overwriting the VtsIDs in the SO, we need to drop
6626 if (so->viR == VtsID_INVALID) {
6627 tl_assert(so->viW == VtsID_INVALID);
6628 so->viR = thr->viR;
6629 so->viW = thr->viW;
6630 VtsID__rcinc(so->viR);
6631 VtsID__rcinc(so->viW);
6633 /* In a strong send, we dump any previous VC in the SO and
6636 tl_assert(so->viW != VtsID_INVALID);
6637 VtsID__rcdec(so->viR);
6638 VtsID__rcdec(so->viW);
6639 so->viR = strong_send ? thr->viR : VtsID__join2( so->viR, thr->viR );
6640 so->viW = strong_send ? thr->viW : VtsID__join2( so->viW, thr->viW );
6641 VtsID__rcinc(so->viR);
6642 VtsID__rcinc(so->viW);
6663 void libhb_so_recv ( Thr* thr, SO* so, Bool strong_recv )
6665 tl_assert(so);
6666 tl_assert(so->magic == SO_MAGIC);
6668 if (so->viR != VtsID_INVALID) {
6669 tl_assert(so->viW != VtsID_INVALID);
6675 thr->viR = VtsID__join2( thr->viR, so->viR );
6681 which could lead to missing races. So, back out that part of
6692 thr->viW = VtsID__join2( thr->viW, so->viW );
6711 tl_assert(so->viW == VtsID_INVALID);
6712 /* Deal with degenerate case: 'so' has no vts, so there has been
6718 Bool libhb_so_everSent ( SO* so )
6720 if (so->viR == VtsID_INVALID) {
6721 tl_assert(so->viW == VtsID_INVALID);
6724 tl_assert(so->viW != VtsID_INVALID);
6882 So, we invalidate the cachelines for the whole range we are setting
6961 So for simplicity, we work byte per byte.