static void vrend_renderer_check_queries_locked(void)
{
   struct vrend_query *query, *stor;

   LIST_FOR_EACH_ENTRY_SAFE(query, stor, &vrend_state.waiting_query_list, waiting_queries) {
      if (!vrend_hw_switch_query_context(query->ctx) ||
	  vrend_check_query_locked(query))
         list_delinit(&query->waiting_queries);
   }
}
static void vrend_renderer_check_queries_locked(void)
{
   struct vrend_query *query, *stor;

   LIST_FOR_EACH_ENTRY_SAFE(query, stor, &vrend_state.waiting_query_list, waiting_queries) {
      if (!vrend_hw_switch_query_context(query->ctx) ||
	  vrend_check_query_locked(query))
         list_delinit(&query->waiting_queries);
   }
}