???????????????ó??????????????set_option????????????????????????????and???????or?????????????????

??????1???ж??????????

??????2???ж?set_option??????

??????3?????????and??????????flags??????????

??????4??????flags???λ????????????????????

??????5??????????????????????????????????????????????????????????????μ???????

??????6????????μ??????1????????????????л?????????????У?

??????7??????????λ???????е?????????????

??????????????????????????????????????????????????????????е??????????????????????????????????????????м??????и????????????????ready???????棬????????schedule????????б?????

 

RAW_U16 raw_event_delete(RAW_EVENT *event_ptr)
 {
  LIST *block_list_head;
  
    RAW_SR_ALLOC();
  
  #if (RAW_EVENT_FUNCTION_CHECK > 0)
 
  if (event_ptr == 0) {
   return RAW_NULL_OBJECT;
  } 
  
  #endif
  
  block_list_head = &event_ptr->common_block_obj.block_list;
  
    RAW_CRITICAL_ENTER();
 
  /*All task blocked on this queue is waken up until list is empty*/
  while (!is_list_empty(block_list_head)) {
   delete_pend_obj(list_entry(block_list_head->next?? RAW_TASK_OBJ?? task_list)); 
  }   
 
  event_ptr->flags = 0;
  
  RAW_CRITICAL_EXIT();
  
     raw_sched(); 
 
  return RAW_SUCCESS;
 }