VirtualBox

儲存庫 vbox 的更動 50197


忽略:
時間撮記:
2014-1-23 下午06:28:14 (11 年 以前)
作者:
vboxsync
訊息:

Appliance::TaskOVF::startThread: Corrected the return type and selected a better thread name.

位置:
trunk/src/VBox/Main
檔案:
修改 2 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Main/include/ApplianceImplPrivate.h

    r50196 r50197  
    128128    static int updateProgress(unsigned uPercent, void *pvUser);
    129129
    130     int startThread();
     130    HRESULT startThread();
    131131
    132132    Appliance *pAppliance;
  • trunk/src/VBox/Main/src-server/ApplianceImpl.cpp

    r50196 r50197  
    10881088
    10891089/**
     1090 * Starts the worker thread for the task.
    10901091 *
    1091  * @return
    1092  */
    1093 int Appliance::TaskOVF::startThread()
    1094 {
     1092 * @return COM status code.
     1093 */
     1094HRESULT Appliance::TaskOVF::startThread()
     1095{
     1096    /* Pick a thread name suitable for logging (<= 8 chars). */
     1097    const char *pszTaskNm;
     1098    switch (taskType)
     1099    {
     1100        case TaskOVF::Read:     pszTaskNm = "ApplRead"; break;
     1101        case TaskOVF::Import:   pszTaskNm = "ApplImp"; break;
     1102        case TaskOVF::Write:    pszTaskNm = "ApplWrit"; break;
     1103        default:                pszTaskNm = "ApplTask"; break;
     1104    }
     1105
    10951106    int vrc = RTThreadCreate(NULL, Appliance::i_taskThreadImportOrExport, this,
    1096                              0, RTTHREADTYPE_MAIN_HEAVY_WORKER, 0,
    1097                              "Appliance::Task");
    1098 
    1099     if (RT_FAILURE(vrc))
    1100         return Appliance::i_setErrorStatic(E_FAIL,
    1101                                          Utf8StrFmt("Could not create OVF task thread (%Rrc)\n", vrc));
    1102 
    1103     return S_OK;
     1107                             0, RTTHREADTYPE_MAIN_HEAVY_WORKER, 0, pszTaskNm);
     1108    if (RT_SUCCESS(vrc))
     1109        return S_OK;
     1110    return Appliance::i_setErrorStatic(E_FAIL, Utf8StrFmt("Could not create OVF task thread (%Rrc)\n", vrc));
    11041111}
    11051112
     
    11221129
    11231130    LogFlowFuncEnter();
    1124     LogFlowFunc(("Appliance %p\n", pAppliance));
     1131    LogFlowFunc(("Appliance %p taskType=%d\n", pAppliance, task->taskType));
    11251132
    11261133    HRESULT taskrc = S_OK;
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette