• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ ERR_FATAL函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了ERR_FATAL函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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,代码来源:dtrack.cpp


示例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,代码来源:footprint.cpp


示例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,代码来源:err_pd_exception_task.c


示例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,代码来源:filemap.cpp


示例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,代码来源:test_ncbidll.cpp


示例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,代码来源:sdevmap.c


示例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,代码来源:test_ncbidll.cpp


示例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,代码来源:rcevt_posix_void.c


示例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,代码来源:rcevt_posix_void.c


示例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,代码来源:rcevt_posix_void.c


示例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,代码来源:rcinit_init.c


示例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,代码来源:rcevt_posix_void.c


示例13: cmif_register_cb_func

/*===========================================================================

FUNCTION  CMIF_REGISTER_CB_FUNC

DESCRIPTION
  Registers the callback functions.with other tasks.
  
DEPENDENCIES
  None

RETURN VALUE
  None

SIDE 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,代码来源:dsatcmif.c


示例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,代码来源:worldload.cpp


示例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,代码来源:varitem.cpp


示例16: ASSERT

/*===========================================================================
FUNCTION  CMIF_CALL_EVENT_CB_FUNC

DESCRIPTION
  CM Call status event callback function

DEPENDENCIES
  None

RETURNS
  None

SIDE 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,代码来源:dsatcmif.c


示例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,代码来源:gpio_1100.c


示例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,代码来源:varitem.cpp


示例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,代码来源:hfat_interface.c


示例20: ERR_FATAL

/*===========================================================================
FUNCTION      DS707_ASYNC_TIMER_CB

DESCRIPTION   Callback for async timer expiration.

DEPENDENCIES  None

RETURN VALUE  None

SIDE 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,代码来源:ds707_async_timer.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ERR_FUNC函数代码示例发布时间:2022-05-30
下一篇:
C++ ERR_FAIL_NULL函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap