Open dzavalishin opened 4 years ago
pvm_sideway_lock( &pers_obj )
pvm_sideway_lock( void *addr ) { spinlock_t sl = get_hash( addr ) spin_lock( sl ) } or even better sideway_spinlocks[N_SW_SL]; pvm_sideway_lock( void *addr ) { spinlock_t sl = sideway_spinlocks[ ((int)addr) % N_SW_SL]; spin_lock( sl ) }
pvm_sideway_lock( &pers_obj )
NB - conflict is ok, just two unrelated spinlocks will lock each other, which is not a real problem