static void vrend_free_fences(void)
{
   struct vrend_fence *fence, *stor;

   /* this is called after vrend_free_sync_thread */
   assert(!vrend_state.sync_thread);

   LIST_FOR_EACH_ENTRY_SAFE(fence, stor, &vrend_state.fence_list, fences)
      free_fence_locked(fence);
   LIST_FOR_EACH_ENTRY_SAFE(fence, stor, &vrend_state.fence_wait_list, fences)
      free_fence_locked(fence);
}
static void vrend_free_fences(void)
{
   struct vrend_fence *fence, *stor;

    
   assert(!vrend_state.sync_thread);

   LIST_FOR_EACH_ENTRY_SAFE(fence, stor, &vrend_state.fence_list, fences)
      free_fence_locked(fence);
   LIST_FOR_EACH_ENTRY_SAFE(fence, stor, &vrend_state.fence_wait_list, fences)
      free_fence_locked(fence);
}