您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ ERR_FATAL函数代码示例

51自学网 2021-06-01 20:33:40
  C++
这篇教程C++ ERR_FATAL函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中ERR_FATAL函数的典型用法代码示例。如果您正苦于以下问题:C++ ERR_FATAL函数的具体用法?C++ ERR_FATAL怎么用?C++ ERR_FATAL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了ERR_FATAL函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: ERR_FATAL

//// DTrack::RegisterDestruction//// Register the destruction of the item 'info'//void DTrack::RegisterDestruction(Info &info){  // Never registered, or has died - perhaps deleting twice?  if (!info.IsSetup())  {    ERR_FATAL(("Invalid destruction : Item is NOT setup! (Tracker %s)", name.str));  }    // Different id, something bad has happened - perhaps bad memory?  if (*info.trackPos != info.id)  {    ERR_FATAL(("Invalid destruction : Different Id (Tracker %s, %d, %d)", name.str, *info.trackPos, info.id));  }  // Set item as empty  *info.trackPos = DTRACK_EMPTY;  // Add to cache  CacheAdd(info.trackPos);  // Info is no longer setup  info.Clear();  ASSERT(stateInfo.items);  // Decrease number of items  stateInfo.items--;}
开发者ID:grasmanek94,项目名称:darkreign2,代码行数:33,


示例2: GetFreeIndex

  //  // GetFreeIndex  //  // Returns a free instance index  //  static U32 GetFreeIndex()  {    ASSERT(initialized);    // Fatal if limit exceeded    if (instanceCount >= MAX_INSTANCES)    {      ERR_FATAL(("Maximum footprint instances exceeded!! (%d)", MAX_INSTANCES));    }    // Find next available slot    for (U32 count = 0, index = nextIndex; count < MAX_INSTANCES; count++)    {      ASSERT(ValidInstanceIndex(index));      // Is this space available      if (!instances[index])      {        nextIndex = index;        IncrementIndex(nextIndex);        return (index);      }      // Wrap index around      IncrementIndex(index);    }    // This should never happen, but paranoia has set in...    ERR_FATAL(("Instance scan found no available index! (%d)", instanceCount));  }
开发者ID:grasmanek94,项目名称:darkreign2,代码行数:35,


示例3: bootstrap_exception_handler

void bootstrap_exception_handler(void){   const unsigned long wlStackSize = 4096;   // minimal (KB)   static DALSYSEventHandle hEventStart;     // context for the error exception handler   static DALSYSWorkLoopHandle hWorkLoop;    // context for the error exception handler   char err_task_name[13];   if ( sizeof(err_task_name) <= tms_utils_fmt(err_task_name, 12, "err_pd_ex_%d", qurt_getpid()) )   {     MSG(MSG_SSID_TMS, MSG_LEGACY_ERROR,"Failed to copy task name in err_task_name ");   }   if (DAL_SUCCESS != DALSYS_EventCreate(DALSYS_EVENT_ATTR_WORKLOOP_EVENT, &hEventStart, NULL))   {      ERR_FATAL("Exception Handler initialization failure",0,0,0);   }   if (DAL_SUCCESS != DALSYS_RegisterWorkLoopEx(err_task_name, wlStackSize, wlPriority, dwMaxNumEvents, &hWorkLoop, NULL))   {      ERR_FATAL("Exception Handler initialization failure",0,0,0);   }   if (DAL_SUCCESS != DALSYS_AddEventToWorkLoop(hWorkLoop, err_exception_task, NULL, hEventStart, NULL))   {      ERR_FATAL("Exception Handler initialization failure",0,0,0);   }   if (DAL_SUCCESS != DALSYS_EventCtrl(hEventStart, DALSYS_EVENT_CTRL_TRIGGER))   {      ERR_FATAL("Exception Handler initialization failure",0,0,0);   }}
开发者ID:robcore,项目名称:flybirdlaboratory_adsp_proc,代码行数:31,


示例4: CreateFile

//// FileMap::FileMap//// Constructor//FileMap::FileMap(const char *name, U32 flags, U32 offset, U32 length){  // Build flags from flags  U32 f = 0;  if (flags & READ)  {    f |= GENERIC_READ;  }  if (flags & WRITE)  {    f |= GENERIC_WRITE;  }  // Open the file  fileHandle = CreateFile(name, f, 0, NULL, OPEN_EXISTING, 0, NULL);  if (fileHandle == NULL)  {    ERR_FATAL(("Could not open file '%s' for mapping", name))  }  // Get the size of the file (assume that its is less than 4GB)  size = GetFileSize(fileHandle, NULL);  // Create the file mapping  f = 0;  if (flags & WRITE)  {    f = PAGE_READWRITE;  }  else  {    f = PAGE_READONLY;  }  mapHandle = CreateFileMapping(fileHandle, NULL, f, 0, size, NULL);  // Could the file be mapped  if (mapHandle == NULL)  {    ERR_FATAL(("Could not create file mapping for '%s'", name))  }  // Get a pointer to the mapping  f = 0;  if (flags & WRITE)  {    f = FILE_MAP_WRITE;  }  else  {    f = FILE_MAP_READ;  }  ptr = (U8 *) MapViewOfFile(mapHandle, f, 0, offset, length);  // Could we get a view of the mapping ?  if (ptr == NULL)  {    ERR_FATAL(("Could not create a view of the mapping '%s'", name))  }}
开发者ID:ZhouWeikuan,项目名称:darkreign2,代码行数:65,


示例5: s_TEST_WinSystemDll

static void s_TEST_WinSystemDll(void){#if defined NCBI_OS_MSWIN    CDll dll_user32("USER32", CDll::eLoadLater);    CDll dll_userenv("userenv.dll", CDll::eLoadNow, CDll::eAutoUnload);    // Load DLL    dll_user32.Load();    // DLL functions definition        BOOL (STDMETHODCALLTYPE FAR * dllMessageBeep)             (UINT type) = NULL;    BOOL (STDMETHODCALLTYPE FAR * dllGetProfilesDirectory)             (LPTSTR  lpProfilesDir, LPDWORD lpcchSize) = NULL;    // This is other variant of functions definition    //    // typedef BOOL (STDMETHODCALLTYPE FAR * LPFNMESSAGEBEEP) (    //     UINT uType    // );    // LPFNMESSAGEBEEP  dllMessageBeep = NULL;    //    // typedef BOOL (STDMETHODCALLTYPE FAR * LPFNGETPROFILESDIR) (    //     LPTSTR  lpProfilesDir,    //     LPDWORD lpcchSize    // );    // LPFNGETUSERPROFILESDIR  dllGetProfilesDirectory = NULL;    dllMessageBeep = dll_user32.GetEntryPoint_Func("MessageBeep", &dllMessageBeep );    if ( !dllMessageBeep ) {        ERR_FATAL("Error get address of function MessageBeep().");    }    // Call loaded function    dllMessageBeep(-1);    #ifdef UNICODE    dll_userenv.GetEntryPoint_Func("GetProfilesDirectoryW", &dllGetProfilesDirectory);    #else    dll_userenv.GetEntryPoint_Func("GetProfilesDirectoryA", &dllGetProfilesDirectory);    #endif    if ( !dllGetProfilesDirectory ) {        ERR_FATAL("Error get address of function GetUserProfileDirectory().");    }    // Call loaded function    TCHAR szProfilePath[1024];    DWORD cchPath = 1024;    if ( dllGetProfilesDirectory(szProfilePath, &cchPath) ) {        cout << "Profile dir: " << szProfilePath << endl;    } else {        ERR_FATAL("GetProfilesDirectory() failed");    }    // Unload USER32.DLL (our work copy)    dll_user32.Unload();    // USERENV.DLL will be unloaded in the destructor    // dll_userenv.Unload();#endif}
开发者ID:svn2github,项目名称:ncbi_tk,代码行数:59,


示例6: ERR_FATAL

void sdm_menu_init(  void){  uint8 i; #ifdef FEATURE_DS_UI_BAUD  /*-------------------------------------------------------------------------    SDM DS BAUD rate UI MENU initialization  -------------------------------------------------------------------------*/    sdm_ds_baud_ui_menu.heading =   " DS BAUD    ";    /* */  sdm_ds_baud_ui_menu.current_index = SDM_UNKNOWN_INDEX;    /* Copy the menu entries */    for( i=0; i < SDM_MAX_UI_ITEMS; i++) {    sdm_ds_baud_ui_menu.items[i] = & (sdm_ui_ds_items_struct[i]);    if ( *(sdm_ui_ds_items_struct[i].item_string) == '/0' ) {      break; /* no more valid entries */    }  }   if( i >= SDM_MAX_UI_ITEMS ) {    ERR_FATAL( "ds baud menu init failure",0,0,0);  }  sdm_ds_baud_ui_menu.num_items = i;#endif /* FEATURE_DS_UI_BAUD */#ifdef FEATURE_DIAG_UI_BAUD   /*-------------------------------------------------------------------------    SDM DIAG BAUD rate UI MENU initialization  -------------------------------------------------------------------------*/  sdm_diag_baud_ui_menu.heading =   " DIAG BAUD: ";    /* */  sdm_diag_baud_ui_menu.current_index = SDM_UNKNOWN_INDEX;    /* Copy the menu entries */    for( i=0; i < SDM_MAX_UI_ITEMS; i++) {    sdm_diag_baud_ui_menu.items[i] = & (sdm_ui_diag_items_struct[i]);    if ( *(sdm_ui_diag_items_struct[i].item_string) == '/0' ) {      break; /* no more valid entries */    }  }   if( i >= SDM_MAX_UI_ITEMS ) {    ERR_FATAL( "diag baud menu init failure",0,0,0);  }  sdm_diag_baud_ui_menu.num_items = i;#endif /* FEATURE_DIAG_UI_BAUD */} /* sdm_menu_init */
开发者ID:bgtwoigu,项目名称:1110,代码行数:56,


示例7: s_TEST_SimpleDll

static void s_TEST_SimpleDll(void){    CDll dll("./","test_dll", CDll::eLoadLater);    // Load DLL    dll.Load();    // DLL variable definition    int*    DllVar_Counter;    // DLL functions definition        int     (* Dll_Inc) (int) = NULL;    int     (* Dll_Add) (int, int) = NULL;    string* (* Dll_StrRepeat) (const string&, unsigned int) = NULL;    // Get addresses from DLL    DllVar_Counter = dll.GetEntryPoint_Data("DllVar_Counter", &DllVar_Counter);    if ( !DllVar_Counter ) {        ERR_FATAL("Error get address of variable DllVar_Counter.");    }    Dll_Inc = dll.GetEntryPoint_Func("Dll_Inc", &Dll_Inc );    if ( !Dll_Inc ) {        ERR_FATAL("Error get address of function Dll_Inc().");    }    Dll_Add = dll.GetEntryPoint_Func("Dll_Add", &Dll_Add );    if ( !Dll_Add ) {        ERR_FATAL("Error get address of function Dll_Add().");    }    Dll_StrRepeat = dll.GetEntryPoint_Func("Dll_StrRepeat", &Dll_StrRepeat );    if ( !Dll_StrRepeat ) {        ERR_FATAL("Error get address of function Dll_StrRepeat().");    }    // Call loaded function    assert( *DllVar_Counter == 0  );    assert( Dll_Inc(3)      == 3  );    assert( *DllVar_Counter == 3  );    assert( Dll_Inc(100)    == 103);    assert( *DllVar_Counter == 103);    *DllVar_Counter = 1;    assert( Dll_Inc(0)      == 1  );    assert( Dll_Add(3,4)    == 7  );    assert( Dll_Add(-2,-1)  == -3 );        string* str = Dll_StrRepeat("ab",2);    assert( *str == "abab");    delete str;    str = Dll_StrRepeat("a",4);      assert( *str == "aaaa");    delete str;    // Unload used dll    dll.Unload();}
开发者ID:svn2github,项目名称:ncbi_tk,代码行数:56,


示例8: rce_nfy_term_posix

void rce_nfy_term_posix(rce_nfy_p nfy_p){   if (RCE_NULL != nfy_p)   {      ERR_FATAL("no implementation", 0, 0, 0);   }   else   {      ERR_FATAL("null handle use", 0, 0, 0);   }}
开发者ID:robcore,项目名称:flybirdlaboratory_adsp_proc,代码行数:11,


示例9: rce_nfy_init_posix

void rce_nfy_init_posix(rce_nfy_p nfy_p, RCEVT_SIGEX sigex){   if (RCE_NULL != nfy_p)   {      ERR_FATAL("no implementation", 0, 0, 0);   }   else   {      ERR_FATAL("null handle use", 0, 0, 0);   }   sigex = sigex;                                                                // unused}
开发者ID:robcore,项目名称:flybirdlaboratory_adsp_proc,代码行数:12,


示例10: rce_nfy_eq_posix

RCEVT_BOOL rce_nfy_eq_posix(rce_nfy_p nfy_p, RCEVT_SIGEX sigex){   if (RCE_NULL != nfy_p)   {      ERR_FATAL("no implementation", 0, 0, 0);      return RCEVT_FALSE;   }   else   {      ERR_FATAL("null handle use", 0, 0, 0);      return RCEVT_FALSE;   }}
开发者ID:robcore,项目名称:flybirdlaboratory_adsp_proc,代码行数:13,


示例11: rcinit_init

/*=========================================================================== FUNCTION rcinit_init DESCRIPTION prepare internal data storage setup DEPENDENCIES none RETURN VALUE none SIDE EFFECTS none ===========================================================================*/void rcinit_init(void){   rcinit_internal.policy_curr = rcinit_lookup_policy(RCINIT_POLICY_NAME_DEFAULT);   if (RCINIT_POLICY_NONE != rcinit_internal.policy_curr)   {      int group;      rcinit_internal_devcfg_check_load();                                       // load devcfg configs first, potentially allows a runtime override later      rcevt_init();                                                              // rcevt events service      rcinit_internal_hs_list_init();      rcxh_init();      // internal events      for (group = 0; group < RCINIT_GROUP_MAX; group++)      {         // rcinit_internal.rcevt_handle.init_event[group] = (rce_nde_p)rcevt_create_name(rcinit_init_rcevt[group]);         rcinit_internal.rcevt_handle.term_event[group] = (rce_nde_p)rcevt_create_name(rcinit_term_rcevt[group]);      }      rcinit_internal.define = (rce_nde_p)rcevt_create_name(RCINIT_RCEVT_DEFINE); // handle to define event, internal, ok to observe      rcinit_internal.defineack = (rce_nde_p)rcevt_create_name(RCINIT_RCEVT_DEFINEACK); // handle to defineack event, internal, ok to observe      if (RCINIT_NULL == rcinit_internal.define ||                               // must have rcevt allocated          RCINIT_NULL == rcinit_internal.defineack)                              // must have rcevt allocated      {         ERR_FATAL("initialization", 0, 0, 0);      }      rcinit_internal.policy_base = rcinit_internal_groups[rcinit_internal.policy_curr];      rcinit_internal.group_curr = RCINIT_GROUP_0;      rcinit_internal.group_base = rcinit_internal.policy_base[rcinit_internal.group_curr];      rcinit_internal_tls_create_key(&rcinit_internal.tls_key, RCINIT_NULL);      rcinit_dal_loop_worker_create();                                           // internal worker thread      rcinit_internal_process_groups();                                          // sequence groups   }   else   {      ERR_FATAL("default policy not available", 0, 0, 0);   }}
开发者ID:robcore,项目名称:flybirdlaboratory_adsp_proc,代码行数:68,


示例12: rce_nfy_wait_posix

rce_nde_p rce_nfy_wait_posix(rce_nde_p nde_p, rce_nfy_p nfy_p){   if (RCE_NULL != nfy_p)   {      nde_p = nde_p;      ERR_FATAL("no implementation", 0, 0, 0);      return RCE_NULL;   }   else   {      ERR_FATAL("null handle use", 0, 0, 0);      return RCE_NULL;   }}
开发者ID:robcore,项目名称:flybirdlaboratory_adsp_proc,代码行数:14,


示例13: cmif_register_cb_func

/*===========================================================================FUNCTION  CMIF_REGISTER_CB_FUNCDESCRIPTION  Registers the callback functions.with other tasks.  DEPENDENCIES  NoneRETURN VALUE  NoneSIDE EFFECTS  None===========================================================================*/LOCAL void cmif_register_cb_func ( void ){  cm_client_status_e_type cm_status = CM_CLIENT_OK;  /* Register the CM call event callback function */  cm_status = cm_mm_client_call_reg (                                   dsatcm_client_id,                                   cmif_call_event_cb_func,                                   CM_CLIENT_EVENT_REG,                                   CM_CALL_EVENT_INCOM,                                   CM_CALL_EVENT_CONNECT,                                     NULL                                  );  cm_status |= cm_mm_client_call_reg(dsatcm_client_id,                                  cmif_call_event_cb_func,                                  CM_CLIENT_EVENT_REG,                                  CM_CALL_EVENT_END,                                  CM_CALL_EVENT_END,                                  NULL );#if defined(FEATURE_WCDMA) || defined(FEATURE_GSM)#error code not present#endif    /* This should not happen, raise an error */  if (cm_status!= CM_CLIENT_OK)  {    ERR_FATAL( "ATCOP unable to register CALL events: %d",               cm_status, 0,0 );  }  #if defined(FEATURE_WCDMA) || defined(FEATURE_GSM)#error code not present#endif /* defined(FEATURE_WCDMA) || defined(FEATURE_GSM) */  /*-----------------------------------------------------------------------    Activate the registered callback functions.  -----------------------------------------------------------------------*/  cm_status = cm_client_act( dsatcm_client_id );    if (cm_status!= CM_CLIENT_OK)  {    ERR_FATAL( "ATCOP unable to activate client: %d",               cm_status, 0,0 );  }  return;}/* cmif_register_cb_func */ 
开发者ID:bgtwoigu,项目名称:1110,代码行数:67,


示例14: LoadCreateObject

  //  // LoadCreateObject  //  // Load a CreateObject function  //  static void LoadCreateObject(FScope *fScope, Bool doSafeLoad)  {    ASSERT(fScope);    // Get type name    const char *typeName = fScope->NextArgString();    // Get claimed id    U32 id = fScope->NextArgInteger();    // The id can not be zero    if (!id)    {      ERR_FATAL(("Caught zero id in CreateObject"));    }    // Get a pointer to the type    GameObjType *type = GameObjCtrl::FindType<GameObjType>(typeName);    // Make sure we found it    if (!type)    {      LOG_WARN(("Ignoring unknown type in world file '%s'", typeName));      return;    }    // Do we need to do a safe load    if (doSafeLoad)    {      /*      // Filter out certain types      if       (        Promote::Type<WeaponObjType>(type) // ||      )      {        LOG_DIAG(("Safe Load : Filtering %s (%u)", type->typeId.str, id));        return;      }      */      // Is this a map object      MapObjType *mapType = Promote::Type<MapObjType>(type);      // If so, do special safe load      if (mapType)      {        SafeLoadMapObject(mapType, fScope, id);        return;      }    }    // Create the object using the type    GameObj *obj = type->NewInstance(id);    ASSERT(obj);    // Load full state info    obj->LoadState(fScope);  }
开发者ID:ZhouWeikuan,项目名称:darkreign2,代码行数:65,


示例15: ERR_FATAL

//// VarSys::VarItem::SetFloat//// FPOINT type - sets floating point value//void VarSys::VarItem::SetFloat(F32 newVal){  if (type != VI_FPOINT)  {    ERR_FATAL(("Expected '%s' to be a floating point var (%d)", itemId.str, type))  }  // Set the new value  fpoint.val = newVal;  if (flags & CLAMP)  {    if (fpoint.val < fpoint.lo)    {      fpoint.val = fpoint.lo;    }    else if (fpoint.val > fpoint.hi)    {      fpoint.val = fpoint.hi;    }  }  // Value may have changed, trigger call back  TriggerCallBack();}
开发者ID:ZhouWeikuan,项目名称:darkreign2,代码行数:30,


示例16: ASSERT

/*===========================================================================FUNCTION  CMIF_CALL_EVENT_CB_FUNCDESCRIPTION  CM Call status event callback functionDEPENDENCIES  NoneRETURNS  NoneSIDE EFFECTS  Adds command in DS command buffer===========================================================================*/LOCAL void cmif_call_event_cb_func (  cm_call_event_e_type            event,            /* Event ID              */  const cm_mm_call_info_s_type   *event_ptr         /* Pointer to Event info */){  ds_cmd_type * cmd_buf;      ASSERT (event_ptr != NULL);  MSG_MED("ATCOP: cm event cb, call_event: %d, call_state: %d",          event, event_ptr->call_state,0);  if( (cmd_buf = ds_get_cmd_buf()) == NULL)  {    ERR_FATAL("No ds command buffer",0,0,0);  }  else  {    /* send the message to ATCOP */    cmd_buf->hdr.cmd_id = DS_AT_CM_CALL_INFO_CMD;    /* If Event_ptr is NULL we should get this far */    /* Pleasing lint here                          */    if( NULL != event_ptr )    {      cmd_buf->cmd.call_event.event_info = *event_ptr;    }    cmd_buf->cmd.call_event.event      = event;    ds_put_cmd(cmd_buf);  }} /* cmif_call_event_cb_func */
开发者ID:bgtwoigu,项目名称:1110,代码行数:48,


示例17: gpio_tristate

/*===========================================================================  FUNCTION GPIO_TRISTATE  DESCRIPTION   This function enables/ disables tri-state on specified GPIO.  Writing a value 0    (GPIO_TRISTATE_DISABLE) disables the tristate and writing a value 1 (GPIO_TRISTATE_ENABLE)    enables tristate.  DEPENDENCIES    None.  RETURN VALUE    None===========================================================================*/void gpio_tristate( GPIO_SignalType gpio_signal, GPIO_TristateType gpio_tristate_value){  uint32             gpio_oe_register;  uint32             gpio_mask;  uint8              gpio_number;  gpio_number = GPIO_NUMBER(gpio_signal);  if (gpio_number >= GPIO_NUM_GPIOS)  {      #ifndef BUILD_BOOT_CHAIN      ERR_FATAL("Invalid GPIO number 0x%x",gpio_number, 0, 0);	  #endif	  return;  }  gpio_oe_register = GPIO_GROUP(gpio_signal);  gpio_mask        = 1 <<(gpio_number-GPIO_GROUP_START[gpio_oe_register]);  if (gpio_tristate_value == GPIO_TRISTATE_DISABLE)  {     BIO_TRISTATE(gpio_oe_register,gpio_mask,gpio_mask);  }   else  {     BIO_TRISTATE(gpio_oe_register,gpio_mask,0);  }}
开发者ID:bgtwoigu,项目名称:1110,代码行数:42,


示例18: ASSERT

//// VarSys::VarItem::ForgetMe//// Deletes an object from the list of notified objects//void VarSys::VarItem::ForgetMe(VarNotify *obj){  ASSERT(obj);  VarNotify *p = pNotify, *prev = NULL;  while (p)  {    if (p == obj)    {      if (prev == NULL)      {        // Unlink first element in list        pNotify = p->next;      }      else      {        // Unlink from middle or end of list        prev->next = p->next;      }      p->next = NULL;      return;    }    prev = p;    p = p->next;  }  // Not found in list  ERR_FATAL(("ForgetMe: object not found in list"));}
开发者ID:ZhouWeikuan,项目名称:darkreign2,代码行数:37,


示例19: hfat_device_init

/* Device initialization function */F_DRIVER *hfat_device_init (unsigned long driver_param){  F_DRIVER *f_driver;  int8 index;  index = _f_drivenum_to_index (driver_param);    if (index < 0)    ERR_FATAL ("HFAT invalid device index",0,0,0);  f_driver = &hfat_driver_table[index];  f_driver->readsector                  = hfat_readsector;  f_driver->readmultiplesector          = hfat_readmultiplesector;  f_driver->writesector                 = hfat_writesector;  f_driver->writemultiplesector         = hfat_writemultiplesector;  f_driver->write_udata_sector          = hfat_write_udata_sector;  f_driver->write_udata_multiplesector  = hfat_write_udata_multiplesector;  f_driver->getphy                      = hfat_getphy;  f_driver->getstatus                   = hfat_getstatus;  f_driver->release                     = NULL;  f_driver->user_ptr                    = hotplug_hdev (driver_param);  return f_driver;}
开发者ID:bgtwoigu,项目名称:1110,代码行数:27,


示例20: ERR_FATAL

/*===========================================================================FUNCTION      DS707_ASYNC_TIMER_CBDESCRIPTION   Callback for async timer expiration.DEPENDENCIES  NoneRETURN VALUE  NoneSIDE EFFECTS  None===========================================================================*/LOCAL void ds707_async_timer_cb(  unsigned long    timer_id){  ds_cmd_type           *cmd_ptr;                    /* Pointer to command *//*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/  if( ( cmd_ptr = ds_get_cmd_buf() ) == NULL )  {    ERR_FATAL( "Can't get cmd buf from DS task", 0, 0, 0 );  }  switch ((ds3g_timer_enum_type)timer_id)  {    case DS3G_TIMER_ASYNC_PTCL_OPENING:      cmd_ptr->hdr.cmd_id= DS_707_ASYNC_PTCL_OPENING_TIMER_EXPIRED_CMD;      break;    default:      ERR("Bad timer id on callback %d",timer_id,0,0);      ASSERT(0);      return;  }    ds_put_cmd( cmd_ptr );} /* ds707_async_timer_cb() */
开发者ID:bgtwoigu,项目名称:1110,代码行数:39,


示例21: ASSERT

//// IFaceVar::Notify//// The var has changed value//void IFaceVar::Notify(VarNotify::Mode mode){  ASSERT(varPtr);  switch (mode)  {    case VarNotify::CHANGED:    {      if (ctrl)      {        VALIDATE(ctrl);        // Tell the control that the value changed        ctrl->Notify(this);      }      break;    }    case VarNotify::DELETED:    {      Done();      break;    }    default:    {      ERR_FATAL(("Unknown VarNotify mode [%d]", U32(mode)));      break;    }  }}
开发者ID:ZhouWeikuan,项目名称:darkreign2,代码行数:36,


示例22: DSMI_VERIFY_PACKET

/*===========================================================================FUNCTION DSMI_VERIFY_PACKET()DESCRIPTION   This will verify the correctness of a packet.    Check that a packet isn't linked to itself.  The algorythm is as  follows.  Start 2 pointers at the beggining of the list (lead  pointer and chase pointer).  On every iteration through the loop  move the lead pointer down the list by one node, verify that it  isn't pointing to the chase pointer.  On every other iteration  through the loop move the chase pointer down the list.  If the  packet is linked to itself, eventually these will meet.  If the  packet is not linked to itself, eventually the lead pointer will get  to the end of the packet.DEPENDENCIES   item_ptr should be non-null and pointing at a dsm item allocated  from dsm.  PARAMETERS  item_ptr - Pointer to packet to verifyRETURN VALUE  None (This function won't return if the check fails)SIDE EFFECTS  If the item_ptr fails a check then ERR_FATAL is called, otherwise none.===========================================================================*/void dsmi_verify_packet(  dsm_item_type *item_ptr){  uint32 cnt = 0;  dsm_item_type *lead_ptr = item_ptr;  dsm_item_type *chase_ptr = item_ptr;  /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/  DSM_ASSERT(item_ptr != NULL);  while(lead_ptr != NULL)  {    /*-----------------------------------------------------------------      Count buffers in packet     -----------------------------------------------------------------*/    cnt ++;    dsmi_verify_buffer(lead_ptr);    /*-----------------------------------------------------------------      Check for packet looped to self     -----------------------------------------------------------------*/    lead_ptr = lead_ptr->pkt_ptr;    if(lead_ptr == chase_ptr)    {      ERR_FATAL("dsm_verify_packet: Packet Linked to Self",0,0,0);    }    if((cnt & 0x1) == 0)    {      chase_ptr = chase_ptr->pkt_ptr;    }  }}
开发者ID:robcore,项目名称:flybirdlaboratory_adsp_proc,代码行数:63,


示例23: StepHoldPrim

    //    // Constructor    //    Text::Text(Cineractive *cineractive, FScope *fScope, S32 priority)    : StepHoldPrim(cineractive, fScope, priority),      text(NULL)    {      // Font      const char *name = StdLoad::TypeString(fScope, "Font", "System");      if ((font = FontSys::GetFont(Crc::CalcStr(name))) == NULL)      {        ERR_FATAL(("Font not found [%s] for Cineractive Text", name))      }      // Text      FScope *sScope;      if ((sScope = fScope->GetFunction("Text", FALSE)) != NULL)      {        SetText(TRANSLATE((StdLoad::TypeString(sScope))));      }      // Position      if ((sScope = fScope->GetFunction("Pos", FALSE)) != NULL)      {        x = StdLoad::TypeF32(sScope);        y = StdLoad::TypeF32(sScope);      }      else      {        x = 0.5F;        y = 0.5F;      }      // Color      StdLoad::TypeColor(fScope, "Color", clr, Color(255L, 255L, 255L, 255L));    }
开发者ID:grasmanek94,项目名称:darkreign2,代码行数:38,


示例24: IsNewInHeap

 static bool IsNewInHeap(CObjectWithNew* ptr) {     switch ( ptr->m_Counter ) {     case eCounter_new:     {         char stackObject;         const char* stackObjectPtr = &stackObject;         const char* objectPtr = reinterpret_cast<const char*>(ptr);         bool inStack =             (objectPtr > stackObjectPtr) &&             (objectPtr < stackObjectPtr + STACK_THRESHOLD);         if ( inStack ) {             ERR_FATAL("!!!InStack,"                      " s_CurrentStep: "<<s_CurrentStep<<                      " s_CurrentInHeap: "<<s_CurrentInHeap<<                      " stackObjectPtr: "<<(void*)stackObjectPtr<<                      " objectPtr: "<<(void*)objectPtr<<                      CStackTrace());         }         _ASSERT(s_CurrentInHeap);         _ASSERT(!inStack);         return !inStack;     }     case 0:         _ASSERT(!s_CurrentInHeap);         return false;     }     error("invalid CObjectWithNew::new");     return false; }
开发者ID:DmitrySigaev,项目名称:ncbi,代码行数:29,


示例25: TRM_MASK_FROM_MODE

trm_compatible_mask_t TRM::get_compatibility_mode(  /* Client requesting the compatibility masks */  trm_client_enum_t           client,  /* Reason for the client's request */  trm_reason_enum_t           reason){  /* Operation "Mode" for the client/reason */  trm_mode_id_t               mode_id;  /* A bitmask representing the client mode */  trm_compatible_mask_t       mode = 0;/*---------------------------------------------------------------------------*/  if ( reason < trmcfg_client[ client ].reasons )  {    /* Look up mode from client/reason pair */    mode_id = trmcfg_client[ client ].pri_mode[ reason ].mode;    /* Convert mode id into a mode bitmask */    mode = TRM_MASK_FROM_MODE( mode_id );  }  else  {    ERR_FATAL("Client %d: Invalid reason %d", client, reason, 0);   }  return mode;} /* TRM::get_compatibility_mode( client, reason ) */
开发者ID:bgtwoigu,项目名称:1110,代码行数:33,


示例26: gpio_out

/*===========================================================================  FUNCTION GPIO_OUT  DESCRIPTION    Outputs the given value to the corresponding GPIO register given a GPIO    signal type. This function calculates the GPIO register and the mask    value.  DEPENDENCIES    None.  RETURN VALUE    None===========================================================================*/void gpio_out( GPIO_SignalType gpio_signal, GPIO_ValueType  gpio_value ){  uint32 gpio_out_register;  uint32 gpio_mask;  uint8  gpio_number;  gpio_number = GPIO_NUMBER(gpio_signal);  if (gpio_number >= GPIO_NUM_GPIOS)  {    #ifndef BUILD_BOOT_CHAIN      ERR_FATAL("Invalid GPIO number 0x%x",gpio_number, 0, 0);	  #endif	  return;  }  gpio_out_register = GPIO_GROUP(gpio_signal);  gpio_mask = 1 << (gpio_number - GPIO_GROUP_START[gpio_out_register]);  if (gpio_value == GPIO_LOW_VALUE)  {    BIO_OUT(gpio_out_register, gpio_mask, 0);  }   else  {    BIO_OUT(gpio_out_register, gpio_mask, gpio_mask);  }}
开发者ID:bgtwoigu,项目名称:1110,代码行数:42,


示例27: OcclusionClass

void Camera::CreateOcclusion(){	if (Occlusion)  {		return ;	}	Occlusion = new OcclusionClass(this);#if 0	//now that everything is initilize try to create the occlusion camera    Camera *OcclusionCam = NULL;	try {		// Attent to create a harware occlusion camera		OcclusionCam = new CameraOcclusionHardware( "occlusion");	}	catch (char *Message)  {		LOG_DIAG( (Message) );				// No hardware occlusion support create a software emulation		// occlusion		OcclusionCam = new CameraOcclusion( "occlusion");		if (!OcclusionCam)    {			ERR_FATAL( ("can't create OcclusionCamera") );		}	}#endif}
开发者ID:vgck,项目名称:opendr2,代码行数:28,


示例28: gpio_in

/*===========================================================================  FUNCTION GPIO_IN  DESCRIPTION    Reads the the corresponding GPIO register given a GPIO signal type and    extracts the value for that particular GPIO. This function calculates the    GPIO register and the mask value required to return the GPIO value.  DEPENDENCIES    None.  RETURN VALUE    GPIO value at the given GPIO number===========================================================================*/GPIO_ValueType gpio_in( GPIO_SignalType gpio_signal ){  uint32             gpio_in_register;  uint32             gpio_mask;  uint32             gpio_value;  uint8              gpio_number;  gpio_number = GPIO_NUMBER(gpio_signal);  if (gpio_number >= GPIO_NUM_GPIOS)  {	  #ifndef BUILD_BOOT_CHAIN      ERR_FATAL("Invalid GPIO number 0x%x",gpio_number, 0, 0);	  #endif	  return;  }  gpio_in_register = GPIO_GROUP(gpio_signal);  gpio_mask        = 1 <<(gpio_number-GPIO_GROUP_START[gpio_in_register]);  gpio_value       = inpdw(bio_gpio[gpio_in_register].in_addr) & gpio_mask;  if (gpio_value == 0)  {    return GPIO_LOW_VALUE;  }   else  {    return GPIO_HIGH_VALUE;  }}
开发者ID:bgtwoigu,项目名称:1110,代码行数:44,



注:本文中的ERR_FATAL函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ ERR_FUNC函数代码示例
C++ ERR_FAIL_NULL函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。