VirtualBox

Ignore:
Timestamp:
Aug 25, 2021 12:37:59 AM (3 years ago)
Author:
vboxsync
Message:

IPRT,SUPDrv,VMM,++: Bumped major support driver version. Added RTLogSetR0ProgramStart and make the VMM use it when configuring the ring-0 loggers. Removed pfnFlush from the parameter list of RTLogCreateEx[V]. bugref:10086

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/log/log.cpp

    r90861 r90862  
    10091009RTDECL(int) RTLogCreateExV(PRTLOGGER *ppLogger, const char *pszEnvVarBase, uint64_t fFlags, const char *pszGroupSettings,
    10101010                           uint32_t cGroups, const char * const *papszGroups, uint32_t cMaxEntriesPerGroup,
    1011                            PFNRTLOGFLUSH pfnFlush, uint32_t cBufDescs, PRTLOGBUFFERDESC paBufDescs, uint32_t fDestFlags,
     1011                           uint32_t cBufDescs, PRTLOGBUFFERDESC paBufDescs, uint32_t fDestFlags,
    10121012                           PFNRTLOGPHASE pfnPhase, uint32_t cHistory, uint64_t cbHistoryFileMax, uint32_t cSecsHistoryTimeSlot,
    10131013                           PRTERRINFO pErrInfo, const char *pszFilenameFmt, va_list args)
     
    10951095        pLoggerInt->cbSelf                      = sizeof(RTLOGGERINTERNAL);
    10961096        pLoggerInt->hSpinMtx                    = NIL_RTSEMSPINMUTEX;
    1097         pLoggerInt->pfnFlush                    = pfnFlush;
     1097        pLoggerInt->pfnFlush                    = NULL;
    10981098        pLoggerInt->pfnPrefix                   = NULL;
    10991099        pLoggerInt->pvPrefixUserArg             = NULL;
     
    13451345    rc = RTLogCreateExV(ppLogger, pszEnvVarBase, fFlags, pszGroupSettings, cGroups, papszGroups,
    13461346                        UINT32_MAX /*cMaxEntriesPerGroup*/,
    1347                         NULL /*pfnFlush*/, 0 /*cBufDescs*/, NULL /*paBufDescs*/, fDestFlags,
     1347                        0 /*cBufDescs*/, NULL /*paBufDescs*/, fDestFlags,
    13481348                        NULL /*pfnPhase*/, 0 /*cHistory*/, 0 /*cbHistoryFileMax*/, 0 /*cSecsHistoryTimeSlot*/,
    13491349                        NULL /*pErrInfo*/, pszFilenameFmt, va);
     
    13561356RTDECL(int) RTLogCreateEx(PRTLOGGER *ppLogger, const char *pszEnvVarBase, uint64_t fFlags, const char *pszGroupSettings,
    13571357                          unsigned cGroups, const char * const *papszGroups, uint32_t cMaxEntriesPerGroup,
    1358                           PFNRTLOGFLUSH pfnFlush, uint32_t cBufDescs, PRTLOGBUFFERDESC paBufDescs, uint32_t fDestFlags,
     1358                          uint32_t cBufDescs, PRTLOGBUFFERDESC paBufDescs, uint32_t fDestFlags,
    13591359                          PFNRTLOGPHASE pfnPhase, uint32_t cHistory, uint64_t cbHistoryFileMax, uint32_t cSecsHistoryTimeSlot,
    13601360                          PRTERRINFO pErrInfo, const char *pszFilenameFmt, ...)
     
    13651365    va_start(va, pszFilenameFmt);
    13661366    rc = RTLogCreateExV(ppLogger, pszEnvVarBase, fFlags, pszGroupSettings, cGroups, papszGroups, cMaxEntriesPerGroup,
    1367                         pfnFlush, cBufDescs, paBufDescs, fDestFlags,
     1367                        cBufDescs, paBufDescs, fDestFlags,
    13681368                        pfnPhase, cHistory, cbHistoryFileMax, cSecsHistoryTimeSlot,
    13691369                        pErrInfo, pszFilenameFmt, va);
     
    20542054
    20552055#ifdef IN_RING0
     2056
    20562057RTR0DECL(int) RTLogSetR0ThreadNameF(PRTLOGGER pLogger, const char *pszNameFmt, ...)
    20572058{
     
    20782079}
    20792080RT_EXPORT_SYMBOL(RTLogSetR0ThreadNameF);
     2081
     2082
     2083RTR0DECL(int) RTLogSetR0ProgramStart(PRTLOGGER pLogger, uint64_t nsStart)
     2084{
     2085    PRTLOGGERINTERNAL pLoggerInt = (PRTLOGGERINTERNAL)pLogger;
     2086    int               rc;
     2087    if (pLoggerInt)
     2088    {
     2089        rc = rtlogLock(pLoggerInt);
     2090        if (RT_SUCCESS(rc))
     2091        {
     2092            pLoggerInt->nsR0ProgramStart = nsStart;
     2093            rtlogUnlock(pLoggerInt);
     2094        }
     2095    }
     2096    else
     2097        rc = VERR_INVALID_PARAMETER;
     2098    return rc;
     2099}
     2100RT_EXPORT_SYMBOL(RTLogSetR0ProgramStart);
     2101
    20802102#endif /* IN_RING0 */
    2081 
    20822103
    20832104/**
Note: See TracChangeset for help on using the changeset viewer.

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