/* * We've taken a few risks in the name of performance. In debug builds, * exercise a few million racy reads/writes to make sure we don't publish * partial TCAs. */ void* FixupMapUnitTest::writer(void* that) { // Give the readers time to wind up. usleep(1000); FixupMap* m = (FixupMap*)that; for (int i = 1; i < kNumToCheck; i++) { Fixup fxp(kPcMul * i, kSpMul * i); m->recordFixup(TCA(uintptr_t(i)), fxp); } return NULL; }
cell_ptr operator ()(cell_ptr l, env_ptr) const { fx_ptr fxp(new Fx); cell_ptr args = fxp->init_fx(l->cdr()); l->set_car(cell_t::make_effect(name,fxp)); l->set_cdr(args); return l; }