VirtualBox

Changeset 11794 in vbox


Ignore:
Timestamp:
Aug 29, 2008 9:13:37 AM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
35604
Message:

SUP: SUPInit(ppSession=NULL, cbReserved=0) -> SUPR3Init(ppSession)

Location:
trunk
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/sup.h

    r11725 r11794  
    341341/**
    342342 * Initializes the support library.
    343  * Each succesful call to SUPInit() must be countered by a
     343 * Each succesful call to SUPR3Init() must be countered by a
    344344 * call to SUPTerm(false).
    345345 *
    346346 * @returns VBox status code.
    347347 * @param   ppSession       Where to store the session handle. Defaults to NULL.
    348  * @param   cbReserve       The number of bytes of contiguous memory that should be reserved by
    349  *                          the runtime / support library.
    350  *                          Set this to 0 if no reservation is required. (default)
    351  *                          Set this to ~0 if the maximum amount supported by the VM is to be
    352  *                          attempted reserved, or the maximum available.
    353  */
    354 #ifdef __cplusplus
    355 SUPR3DECL(int) SUPInit(PSUPDRVSESSION *ppSession = NULL, size_t cbReserve = 0);
    356 #else
    357 SUPR3DECL(int) SUPInit(PSUPDRVSESSION *ppSession, size_t cbReserve);
    358 #endif
     348 */
     349SUPR3DECL(int) SUPR3Init(PSUPDRVSESSION *ppSession);
    359350
    360351/**
  • trunk/include/iprt/initterm.h

    r8245 r11794  
    5050 * @returns iprt status code.
    5151 *
    52  * @param   fInitSUPLib     Set if SUPInit() shall be called during init (default).
     52 * @param   fInitSUPLib     Set if SUPR3Init() shall be called during init (default).
    5353 *                          Clear if not to call it.
    54  * @param   cbReserve       The number of bytes of contiguous memory that should be reserved by
    55  *                          the runtime / support library.
    56  *                          Set this to 0 if no reservation is required. (default)
    57  *                          Set this to ~(size_t)0 if the maximum amount supported by the VM is to be
    58  *                          attempted reserved, or the maximum available.
    59  *                          This argument only applies if fInitSUPLib is true and we're in ring-3 HC.
     54 * @param   cbReserve       Ignored.
    6055 */
    6156RTR3DECL(int) RTR3Init(
  • trunk/src/VBox/Devices/Network/testcase/tstIntNet-1.cpp

    r11684 r11794  
    830830     */
    831831    PSUPDRVSESSION pSession;
    832     rc = SUPInit(&pSession, 0);
     832    rc = SUPR3Init(&pSession);
    833833    if (RT_FAILURE(rc))
    834834    {
    835         RTPrintf("tstIntNet-1: SUPInit -> %Rrc\n", rc);
     835        RTPrintf("tstIntNet-1: SUPR3Init -> %Rrc\n", rc);
    836836        return 1;
    837837    }
     
    937937
    938938                    if (fPingTest)
    939                         doPingTest(OpenReq.hIf, pSession, pBuf, &SrcMac, pFileRaw, pFileText);                   
    940                    
     939                        doPingTest(OpenReq.hIf, pSession, pBuf, &SrcMac, pFileRaw, pFileText);
     940
    941941                    /*
    942942                     * Either enter sniffing mode or do a timeout thing.
     
    951951                            g_cErrors++;
    952952                        }
    953                        
     953
    954954                        if (   fPingTest
    955955                            && !g_fPingReply)
  • trunk/src/VBox/HostDrivers/Support/SUPLib.cpp

    r11725 r11794  
    211211
    212212
    213 SUPR3DECL(int) SUPInit(PSUPDRVSESSION *ppSession /* NULL */, size_t cbReserve /* 0 */)
     213SUPR3DECL(int) SUPR3Init(PSUPDRVSESSION *ppSession)
    214214{
    215215    /*
     
    368368        suplibOsTerm(&g_supLibData);
    369369    }
    370     AssertMsgFailed(("SUPInit() failed rc=%Vrc\n", rc));
     370    AssertMsgFailed(("SUPR3Init() failed rc=%Vrc\n", rc));
    371371    g_cInits--;
    372372
     
    485485     * Verify state.
    486486     */
    487     AssertMsg(g_cInits > 0, ("SUPTerm() is called before SUPInit()!\n"));
     487    AssertMsg(g_cInits > 0, ("SUPTerm() is called before SUPR3Init()!\n"));
    488488    if (g_cInits == 0)
    489489        return VERR_WRONG_ORDER;
  • trunk/src/VBox/HostDrivers/Support/SUPLibInternal.h

    r11725 r11794  
    258258 *
    259259 * This is dynamically resolved and invoked by the static library before it
    260  * calls RTR3Init and thereby SUPInit.
     260 * calls RTR3Init and thereby SUPR3Init.
    261261 *
    262262 * @returns IPRT status code.
  • trunk/src/VBox/HostDrivers/Support/SUPR0IdcClient.c

    r10377 r11794  
    9191     * special API feature was just added will they set an actual version.
    9292     * So, this is the place where can easily enforce a minimum IDC version
    93      * on bugs and similar. It corresponds a bit to what SUPInit is
     93     * on bugs and similar. It corresponds a bit to what SUPR3Init is
    9494     * responsible for.
    9595     */
  • trunk/src/VBox/HostDrivers/Support/testcase/tstContiguous.cpp

    r9334 r11794  
    4747
    4848    RTR3Init(false);
    49     rc = SUPInit();
    50     RTPrintf("tstContiguous: SUPInit -> rc=%Vrc\n", rc);
     49    rc = SUPR3Init(NULL);
     50    RTPrintf("tstContiguous: SUPR3Init -> rc=%Vrc\n", rc);
    5151    rcRet += rc != 0;
    5252    if (!rc)
  • trunk/src/VBox/HostDrivers/Support/testcase/tstGIP-2.cpp

    r9961 r11794  
    105105     */
    106106    PSUPDRVSESSION pSession = NIL_RTR0PTR;
    107     int rc = SUPInit(&pSession);
     107    int rc = SUPR3Init(&pSession);
    108108    if (VBOX_SUCCESS(rc))
    109109    {
     
    134134                    if (    g_pSUPGlobalInfoPage->aCPUs[iCpu].u64CpuHz > 0
    135135                        &&  g_pSUPGlobalInfoPage->aCPUs[iCpu].u64CpuHz != _4G + 1)
    136                     {   
     136                    {
    137137                        PSUPGIPCPU pPrevCpu = &s_aaCPUs[!(i & 1)][iCpu];
    138138                        PSUPGIPCPU pCpu = &s_aaCPUs[i & 1][iCpu];
     
    181181    }
    182182    else
    183         RTPrintf("tstGIP-2: SUPInit failed: %Vrc\n", rc);
     183        RTPrintf("tstGIP-2: SUPR3Init failed: %Vrc\n", rc);
    184184    return !!rc;
    185185}
  • trunk/src/VBox/HostDrivers/Support/testcase/tstGetPagingMode.cpp

    r8155 r11794  
    4444    int rc;
    4545    RTR3Init(false);
    46     rc = SUPInit();
     46    rc = SUPR3Init(NULL);
    4747    if (VBOX_SUCCESS(rc))
    4848    {
     
    9393    }
    9494    else
    95         RTPrintf("SUPInit -> rc=%Vrc\n", rc);
     95        RTPrintf("SUPR3Init -> rc=%Vrc\n", rc);
    9696
    9797    return !VBOX_SUCCESS(rc);
  • trunk/src/VBox/HostDrivers/Support/testcase/tstInit.cpp

    r8155 r11794  
    4444    int rc;
    4545    RTR3Init(false);
    46     rc = SUPInit();
    47     RTPrintf("tstInit: SUPInit -> rc=%d\n", rc);
     46    rc = SUPR3Init(NULL);
     47    RTPrintf("tstInit: SUPR3Init -> rc=%d\n", rc);
    4848    if (!rc)
    4949    {
  • trunk/src/VBox/HostDrivers/Support/testcase/tstInt.cpp

    r10724 r11794  
    8181    RTR3Init();
    8282    PSUPDRVSESSION pSession;
    83     rc = SUPInit(&pSession);
     83    rc = SUPR3Init(&pSession);
    8484    rcRet += rc != 0;
    85     RTPrintf("tstInt: SUPInit -> rc=%Vrc\n", rc);
     85    RTPrintf("tstInt: SUPR3Init -> rc=%Vrc\n", rc);
    8686    if (!rc)
    8787    {
  • trunk/src/VBox/HostDrivers/Support/testcase/tstLow.cpp

    r8155 r11794  
    5050    RTPrintf("tstLow: TESTING...\n");
    5151
    52     rc = SUPInit();
     52    rc = SUPR3Init(NULL);
    5353    if (VBOX_SUCCESS(rc))
    5454    {
     
    151151    else
    152152    {
    153         RTPrintf("SUPInit -> rc=%Vrc\n", rc);
     153        RTPrintf("SUPR3Init -> rc=%Vrc\n", rc);
    154154        rcRet++;
    155155    }
  • trunk/src/VBox/HostDrivers/Support/testcase/tstPage.cpp

    r8155 r11794  
    4646    int rc = 0;
    4747    RTR3Init(true, _1M*168);
    48     rc = SUPInit(NULL, _1M*168);
     48    rc = SUPR3Init(NULL);
    4949    cErrors += rc != 0;
    5050    if (!rc)
     
    8787    }
    8888    else
    89         RTPrintf("tstPage: SUPInit failed rc=%d\n", rc);
     89        RTPrintf("tstPage: SUPR3Init failed rc=%d\n", rc);
    9090
    9191    if (!cErrors)
  • trunk/src/VBox/HostDrivers/Support/testcase/tstPin.cpp

    r8155 r11794  
    4949
    5050    RTR3Init(true, ~0);
    51     rc = SUPInit(NULL, ~0);
    52     RTPrintf("SUPInit -> rc=%d\n", rc);
     51    rc = SUPR3Init(NULL);
     52    RTPrintf("SUPR3Init -> rc=%d\n", rc);
    5353    rcRet += rc != 0;
    5454    if (!rc)
  • trunk/src/VBox/Runtime/VBox/VBoxRTDeps.cpp

    r11320 r11794  
    4141PFNRT g_VBoxRTDeps[] =
    4242{
    43     (PFNRT)SUPInit,
     43    (PFNRT)SUPR3Init,
    4444    (PFNRT)SUPPageLock
    4545};
  • trunk/src/VBox/Runtime/r3/init.cpp

    r11597 r11794  
    107107 * @returns iprt status code.
    108108 *
    109  * @param   fInitSUPLib     Set if SUPInit() shall be called during init (default).
     109 * @param   fInitSUPLib     Set if SUPR3Init() shall be called during init (default).
    110110 *                          Clear if not to call it.
    111  * @param   cbReserve       The number of bytes of contiguous memory that should be reserved by
    112  *                          the runtime / support library.
    113  *                          Set this to 0 if no reservation is required. (default)
    114  *                          Set this to ~0 if the maximum amount supported by the VM is to be
    115  *                          attempted reserved, or the maximum available.
    116  *                          This argument only applies if fInitSUPLib is true and we're in ring-3 HC.
     111 * @param   cbReserve       Ignored.
    117112 */
    118113RTR3DECL(int) RTR3Init(bool fInitSUPLib, size_t cbReserve)
     
    122117    /*
    123118     * Do reference counting, only initialize the first time around.
    124      * 
    125      * We are ASSUMING that nobody will be able to race RTR3Init calls when the 
     119     *
     120     * We are ASSUMING that nobody will be able to race RTR3Init calls when the
    126121     * first one, the real init, is running (second assertion).
    127122     */
     
    133128#if !defined(IN_GUEST) && !defined(RT_NO_GIP)
    134129        if (fInitSUPLib)
    135             SUPInit(NULL, cbReserve);
    136 #endif 
     130            SUPR3Init(NULL);
     131#endif
    137132    }
    138133    ASMAtomicWriteBool(&g_fInitializing, true);
     
    177172         * (The more time for updates before real use, the better.)
    178173         */
    179         SUPInit(NULL, cbReserve);
     174        SUPR3Init(NULL);
    180175    }
    181176#endif
  • trunk/src/VBox/VMM/VM.cpp

    r11740 r11794  
    197197         * Initialize the support library creating the session for this v
    198198         */
    199         rc = SUPInit(&pUVM->vm.s.pSession, 0);
     199        rc = SUPR3Init(&pUVM->vm.s.pSession);
    200200        if (RT_SUCCESS(rc))
    201201        {
  • trunk/src/VBox/VMM/testcase/tstCFGM.cpp

    r8155 r11794  
    4949     */
    5050    PVM         pVM;
    51     int rc = SUPInit(NULL);
     51    int rc = SUPR3Init(NULL);
    5252    if (VBOX_SUCCESS(rc))
    5353        rc = SUPPageAlloc(RT_ALIGN_Z(sizeof(*pVM), PAGE_SIZE) >> PAGE_SHIFT, (void **)&pVM);
  • trunk/src/VBox/VMM/testcase/tstGlobalConfig.cpp

    r8155 r11794  
    9696     */
    9797    PSUPDRVSESSION pSession;
    98     int rc = SUPInit(&pSession, 0);
     98    int rc = SUPR3Init(&pSession);
    9999    if (RT_FAILURE(rc))
    100100    {
    101         RTPrintf("tstGlobalConfig: SUPInit -> %Rrc\n", rc);
     101        RTPrintf("tstGlobalConfig: SUPR3Init -> %Rrc\n", rc);
    102102        return 1;
    103103    }
  • trunk/src/VBox/VMM/testcase/tstMMHyperHeap.cpp

    r11311 r11794  
    5353    RTR0PTR     pvR0;
    5454    SUPPAGE     aPages[RT_ALIGN_Z(sizeof(*pVM), PAGE_SIZE) >> PAGE_SHIFT];
    55     int rc = SUPInit(NULL);
     55    int rc = SUPR3Init(NULL);
    5656    if (VBOX_SUCCESS(rc))
    5757        rc = SUPLowAlloc(RT_ELEMENTS(aPages), (void **)&pVM, &pvR0, &aPages[0]);
  • trunk/src/VBox/VMM/testcase/tstSSM.cpp

    r10903 r11794  
    621621     * Create an fake VM structure and init SSM.
    622622     */
    623     int rc = SUPInit(NULL);
     623    int rc = SUPR3Init(NULL);
    624624    if (VBOX_FAILURE(rc))
    625625    {
Note: See TracChangeset for help on using the changeset viewer.

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