/** Find cached record by name */
uword *cache_entry_by_name;
- uword *cache_lock;
+ clib_spinlock_t cache_lock;
/** enable / disable flag */
int is_enabled;
{
if (dm->cache_lock)
{
- while (clib_atomic_test_and_set (dm->cache_lock))
- CLIB_PAUSE ();
+ clib_spinlock_lock (&dm->cache_lock);
}
}
{
if (dm->cache_lock)
{
- clib_atomic_release (dm->cache_lock);
+ clib_spinlock_unlock (&dm->cache_lock);
}
}