VirtualBox

Changeset 28488 in vbox


Ignore:
Timestamp:
Apr 19, 2010 6:01:22 PM (15 years ago)
Author:
vboxsync
Message:

SrvIntNetR0.cpp: Started replacing the non-recrusive fast mutexes with regular mutexes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/SrvIntNetR0.cpp

    r28438 r28488  
    227227    /** Pointer to ring-3 mapping of the default exchange buffer. */
    228228    R3PTRTYPE(PINTNETBUF)   pIntBufDefaultR3;
    229     /** Event semaphore which a receiver thread will sleep on while waiting for data to arrive. */
     229    /** Event semaphore which a receiver thread will sleep on while waiting
     230     * for data to arrive. */
    230231    RTSEMEVENT volatile     Event;
    231232    /** Number of threads sleeping on the Event semaphore. */
     
    348349    /** List of interfaces connected to the network.
    349350     * This is protected by the INTNET::FastMutex. */
    350     PINTNETIF               pIFs;
     351    PINTNETIF               pIfs;
    351352    /** Pointer to the trunk interface.
    352353     * Can be NULL if there is no trunk connection. */
     
    399400typedef struct INTNET
    400401{
    401     /** Mutex protecting the network creation, opening and destruction.
    402      * (This means all operations affecting the pNetworks list.) */
    403     RTSEMFASTMUTEX          FastMutex;
     402    /** Mutex protecting the creation, opening and destruction of both networks and
     403     * interfaces.  (This means all operations affecting the pNetworks list.) */
     404    RTSEMMUTEX              hMtxCreateOpenDestroy;
    404405    /** List of networks. Protected by INTNET::Spinlock. */
    405406    PINTNETNETWORK volatile pNetworks;
     
    10681069                                                uint8_t const cbAddr, const char *pszMsg)
    10691070{
    1070     for (PINTNETIF pIf = pNetwork->pIFs; pIf; pIf = pIf->pNext)
     1071    for (PINTNETIF pIf = pNetwork->pIfs; pIf; pIf = pIf->pNext)
    10711072    {
    10721073        int i = intnetR0IfAddrCacheLookup(&pIf->aAddrCache[enmType], pAddr, cbAddr);
     
    10921093                                                       INTNETADDRTYPE const enmType, uint8_t const cbAddr, const char *pszMsg)
    10931094{
    1094     for (PINTNETIF pIf = pNetwork->pIFs; pIf; pIf = pIf->pNext)
     1095    for (PINTNETIF pIf = pNetwork->pIfs; pIf; pIf = pIf->pNext)
    10951096        if (pIf != pIfSender)
    10961097        {
     
    11141115DECLINLINE(PINTNETIF) intnetR0NetworkAddrCacheLookupIf(PINTNETNETWORK pNetwork, PCRTNETADDRU pAddr, INTNETADDRTYPE const enmType, uint8_t const cbAddr)
    11151116{
    1116     for (PINTNETIF pIf = pNetwork->pIFs; pIf; pIf = pIf->pNext)
     1117    for (PINTNETIF pIf = pNetwork->pIfs; pIf; pIf = pIf->pNext)
    11171118    {
    11181119        int i = intnetR0IfAddrCacheLookup(&pIf->aAddrCache[enmType], pAddr, cbAddr);
     
    13251326        case RTNET_DHCP_MT_ACK:
    13261327            if (intnetR0IPv4AddrIsGood(pDhcp->bp_yiaddr))
    1327                 for (PINTNETIF pCur = pNetwork->pIFs; pCur; pCur = pCur->pNext)
     1328                for (PINTNETIF pCur = pNetwork->pIfs; pCur; pCur = pCur->pNext)
    13281329                    if (    pCur->fMacSet
    13291330                        &&  !memcmp(&pCur->Mac, &pDhcp->bp_chaddr, sizeof(RTMAC)))
     
    13431344        case RTNET_DHCP_MT_RELEASE:
    13441345        {
    1345             for (PINTNETIF pCur = pNetwork->pIFs; pCur; pCur = pCur->pNext)
     1346            for (PINTNETIF pCur = pNetwork->pIfs; pCur; pCur = pCur->pNext)
    13461347                if (    pCur->fMacSet
    13471348                    &&  !memcmp(&pCur->Mac, &pDhcp->bp_chaddr, sizeof(RTMAC)))
     
    22702271     * Write the packet to all the interfaces and signal them.
    22712272     */
    2272     for (PINTNETIF pIf = pNetwork->pIFs; pIf; pIf = pIf->pNext)
     2273    for (PINTNETIF pIf = pNetwork->pIfs; pIf; pIf = pIf->pNext)
    22732274        if (pIf != pIfSender)
    22742275            intnetR0IfSend(pIf, pIfSender, pSG, NULL);
     
    24032404            if (!(pNetwork->fFlags & (INTNET_OPEN_FLAGS_IGNORE_PROMISC | INTNET_OPEN_FLAGS_QUIETLY_IGNORE_PROMISC)))
    24042405            {
    2405                 for (PINTNETIF pIf = pNetwork->pIFs; pIf; pIf = pIf->pNext)
     2406                for (PINTNETIF pIf = pNetwork->pIfs; pIf; pIf = pIf->pNext)
    24062407                    if (pIf->fPromiscuous)
    24072408                    {
     
    24182419     */
    24192420    bool fExactIntNetRecipient = false;
    2420     for (PINTNETIF pIf = pNetwork->pIFs; pIf; pIf = pIf->pNext)
     2421    for (PINTNETIF pIf = pNetwork->pIfs; pIf; pIf = pIf->pNext)
    24212422    {
    24222423        bool fIt = intnetR0IfAddrCacheLookup(&pIf->aAddrCache[enmAddrType], &Addr, cbAddr) >= 0;
     
    24642465     */
    24652466    bool fExactIntNetRecipient = false;
    2466     for (PINTNETIF pIf = pNetwork->pIFs; pIf; pIf = pIf->pNext)
     2467    for (PINTNETIF pIf = pNetwork->pIfs; pIf; pIf = pIf->pNext)
    24672468    {
    24682469        bool fIt = false;
     
    33123313static DECLCALLBACK(void) intnetR0IfDestruct(void *pvObj, void *pvUser1, void *pvUser2)
    33133314{
    3314     PINTNETIF pIf = (PINTNETIF)pvUser1;
     3315    PINTNETIF pIf     = (PINTNETIF)pvUser1;
    33153316    PINTNET   pIntNet = (PINTNET)pvUser2;
    33163317    Log(("intnetR0IfDestruct: pvObj=%p pIf=%p pIntNet=%p hIf=%RX32\n", pvObj, pIf, pIntNet, pIf->hIf));
    33173318
    3318     RTSemFastMutexRequest(pIntNet->FastMutex);
    3319 
    3320     /*
    3321      * Mark the interface as being destroyed so the waiter
    3322      * can behave appropriately (theoretical case).
    3323      */
     3319    /*
     3320     * We grab the INTNET create/open/destroy semaphore to make sure nobody is
     3321     * adding or removing interface while we're in here.  For paranoid reasons
     3322     * we also mark the interface as destroyed here so any waiting threads can
     3323     * take the appropriate actions (theoretical case).
     3324     */
     3325    RTSemMutexRequest(pIntNet->hMtxCreateOpenDestroy, RT_INDEFINITE_WAIT);
    33243326    ASMAtomicWriteBool(&pIf->fDestroying, true);
    33253327
     
    33443346        intnetR0IfSetActive(pIf, false);
    33453347
    3346         if (pNetwork->pIFs == pIf)
    3347             pNetwork->pIFs = pIf->pNext;
     3348        /* unlink */
     3349        if (pNetwork->pIfs == pIf)
     3350            pNetwork->pIfs = pIf->pNext;
    33483351        else
    33493352        {
    3350             PINTNETIF pPrev = pNetwork->pIFs;
     3353            PINTNETIF pPrev = pNetwork->pIfs;
    33513354            while (pPrev)
    33523355            {
     
    33623365        pIf->pNext = NULL;
    33633366
    3364         /*
    3365          * Release our reference to the network.
    3366          */
    3367         RTSemFastMutexRelease(pIntNet->FastMutex);
    3368 
     3367        /* Release our reference to the network. */
    33693368        SUPR0ObjRelease(pNetwork->pvObj, pIf->pSession);
    33703369        pIf->pNetwork = NULL;
    33713370    }
    3372     else
    3373         RTSemFastMutexRelease(pIntNet->FastMutex);
     3371
     3372    RTSemMutexRelease(pIntNet->hMtxCreateOpenDestroy);
    33743373
    33753374    /*
     
    34353434 * Creates a new network interface.
    34363435 *
    3437  * The call must have opened the network for the new interface
    3438  * and is responsible for closing it on failure. On success
    3439  * it must leave the network opened so the interface destructor
    3440  * can close it.
     3436 * The call must have opened the network for the new interface and is
     3437 * responsible for closing it on failure.  On success it must leave the network
     3438 * opened so the interface destructor can close it.
    34413439 *
    34423440 * @returns VBox status code.
     
    34473445 * @param   phIf        Where to store the interface handle.
    34483446 */
    3449 static int intnetR0NetworkCreateIf(PINTNETNETWORK pNetwork, PSUPDRVSESSION pSession, unsigned cbSend, unsigned cbRecv, bool *pfCloseNetwork, PINTNETIFHANDLE phIf)
     3447static int intnetR0NetworkCreateIf(PINTNETNETWORK pNetwork, PSUPDRVSESSION pSession, unsigned cbSend, unsigned cbRecv,
     3448                                   PINTNETIFHANDLE phIf)
    34503449{
    34513450    LogFlow(("intnetR0NetworkCreateIf: pNetwork=%p pSession=%p cbSend=%u cbRecv=%u phIf=%p\n",
     
    34573456    AssertPtr(pNetwork);
    34583457    AssertPtr(phIf);
    3459     AssertPtr(pfCloseNetwork);
    3460     *pfCloseNetwork = false;
    34613458
    34623459    /*
     
    35143511            ASMMemZero32(pIf->pIntBufDefault, cbBuf); /** @todo I thought I specified these buggers as clearing the memory... */
    35153512
    3516             pIf->pIntBuf = pIf->pIntBufDefault;
     3513            pIf->pIntBuf   = pIf->pIntBufDefault;
    35173514            pIf->pIntBufR3 = pIf->pIntBufDefaultR3;
    35183515            INTNETBufInit(pIf->pIntBuf, cbBuf, cbRecv, cbSend);
     
    35243521            if (RT_SUCCESS(rc))
    35253522            {
    3526                 pIf->pNext = pNetwork->pIFs;
    3527                 pNetwork->pIFs = pIf;
     3523                pIf->pNext = pNetwork->pIfs;
     3524                pNetwork->pIfs = pIf;
    35283525                RTSemFastMutexRelease(pNetwork->FastMutex2);
    35293526
    35303527                /*
    3531                  * Register the interface with the session.
     3528                 * Register the interface with the session, adding another
     3529                 * reference to the network to ease the cleanup duties of the caller.
    35323530                 */
    3533                 pIf->pvObj = SUPR0ObjRegister(pSession, SUPDRVOBJTYPE_INTERNAL_NETWORK_INTERFACE, intnetR0IfDestruct, pIf, pNetwork->pIntNet);
    3534                 if (pIf->pvObj)
     3531                rc = SUPR0ObjAddRef(pNetwork->pvObj, pSession);
     3532                if (RT_SUCCESS(rc))
    35353533                {
    3536                     rc = RTHandleTableAllocWithCtx(pNetwork->pIntNet->hHtIfs, pIf, pSession, (uint32_t *)&pIf->hIf);
    3537                     if (RT_SUCCESS(rc))
     3534                    pIf->pvObj = SUPR0ObjRegister(pSession, SUPDRVOBJTYPE_INTERNAL_NETWORK_INTERFACE, intnetR0IfDestruct, pIf, pNetwork->pIntNet);
     3535                    if (pIf->pvObj)
    35383536                    {
    3539                         *phIf = pIf->hIf;
    3540                         Log(("intnetR0NetworkCreateIf: returns VINF_SUCCESS *phIf=%RX32 cbSend=%u cbRecv=%u cbBuf=%u\n",
    3541                              *phIf, pIf->pIntBufDefault->cbSend, pIf->pIntBufDefault->cbRecv, pIf->pIntBufDefault->cbBuf));
    3542                         return VINF_SUCCESS;
     3537                        rc = RTHandleTableAllocWithCtx(pNetwork->pIntNet->hHtIfs, pIf, pSession, (uint32_t *)&pIf->hIf);
     3538                        if (RT_SUCCESS(rc))
     3539                        {
     3540                            *phIf = pIf->hIf;
     3541                            Log(("intnetR0NetworkCreateIf: returns VINF_SUCCESS *phIf=%RX32 cbSend=%u cbRecv=%u cbBuf=%u\n",
     3542                                 *phIf, pIf->pIntBufDefault->cbSend, pIf->pIntBufDefault->cbRecv, pIf->pIntBufDefault->cbBuf));
     3543                            return VINF_SUCCESS;
     3544                        }
     3545
     3546                        SUPR0ObjRelease(pIf->pvObj, pSession);
     3547                        LogFlow(("intnetR0NetworkCreateIf: returns %Rrc\n", rc));
     3548                        return rc;
    35433549                    }
    35443550
    3545                     SUPR0ObjRelease(pIf->pvObj, pSession);
    3546                     LogFlow(("intnetR0NetworkCreateIf: returns %Rrc\n", rc));
    3547                     return rc;
     3551                    SUPR0ObjRelease(pNetwork->pvObj, pSession);
    35483552                }
    35493553
     
    35623566    RTMemFree(pIf);
    35633567    LogFlow(("intnetR0NetworkCreateIf: returns %Rrc\n", rc));
    3564     *pfCloseNetwork = true;
    35653568    return rc;
    35663569}
     
    38403843     * Free up the resources.
    38413844     */
    3842     RTSEMFASTMUTEX FastMutex = pThis->FastMutex;
    3843     pThis->FastMutex = NIL_RTSEMFASTMUTEX;
     3845    RTSEMFASTMUTEX hFastMutex = pThis->FastMutex;
     3846    pThis->FastMutex = NIL_RTSEMMUTEX;
    38443847    pThis->pNetwork = NULL;
    3845     RTSemFastMutexRelease(FastMutex);
    3846     RTSemFastMutexDestroy(FastMutex);
     3848    RTSemFastMutexRelease(hFastMutex);
     3849    RTSemFastMutexDestroy(hFastMutex);
    38473850    RTMemFree(pThis);
    38483851}
     
    39533956
    39543957/**
    3955  * Close a network which was opened/created using intnetR0OpenNetwork()/intnetR0CreateNetwork().
    3956  *
    3957  * @param   pNetwork    The network to close.
    3958  * @param   pSession    The session handle.
    3959  */
    3960 static int intnetR0NetworkClose(PINTNETNETWORK pNetwork, PSUPDRVSESSION pSession)
    3961 {
    3962     LogFlow(("intnetR0NetworkClose: pNetwork=%p pSession=%p\n", pNetwork, pSession));
    3963     AssertPtrReturn(pSession, VERR_INVALID_PARAMETER);
    3964     AssertPtrReturn(pNetwork, VERR_INVALID_PARAMETER);
    3965 
    3966     int rc = SUPR0ObjRelease(pNetwork->pvObj, pSession);
    3967     LogFlow(("intnetR0NetworkClose: return %Rrc\n", rc));
    3968     return rc;
    3969 }
    3970 
    3971 
    3972 /**
    39733958 * Object destructor callback.
    39743959 * This is called for reference counted objectes when the count reaches 0.
     
    39863971
    39873972    /* take the create/destroy sem. */
    3988     RTSemFastMutexRequest(pIntNet->FastMutex);
     3973    RTSemMutexRequest(pIntNet->hMtxCreateOpenDestroy, RT_INDEFINITE_WAIT);
    39893974
    39903975    /*
     
    40143999
    40154000    /*
    4016      * Because of the undefined order of the per session object dereferencing when closing a session,
    4017      * we have to handle the case where the network is destroyed before the interfaces. We'll
    4018      * deal with this by simply orphaning the interfaces.
     4001     * Because of the undefined order of the per session object dereferencing
     4002     * when closing a session, we have to handle the case where the network is
     4003     * destroyed before the interfaces.
     4004     * We deal with this simply by orphaning the interfaces.
    40194005     */
    40204006    RTSemFastMutexRequest(pNetwork->FastMutex2);
    40214007
    4022     PINTNETIF pCur = pNetwork->pIFs;
     4008    PINTNETIF pCur = pNetwork->pIfs;
    40234009    while (pCur)
    40244010    {
     
    40504036
    40514037    /* release the create/destroy sem. (can be done before trunk destruction.) */
    4052     RTSemFastMutexRelease(pIntNet->FastMutex);
     4038    RTSemMutexRelease(pIntNet->hMtxCreateOpenDestroy);
    40534039}
    40544040
     
    40564042/**
    40574043 * Opens an existing network.
     4044 *
     4045 * The call must own the INTNET::hMtxCreateOpenDestroy.
    40584046 *
    40594047 * @returns VBox status code.
     
    41374125            return rc;
    41384126        }
     4127
    41394128        pCur = pCur->pNext;
    41404129    }
     
    41484137 * Creates a new network.
    41494138 *
    4150  * The call must own the INTNET::FastMutex and has already attempted
     4139 * The call must own the INTNET::hMtxCreateOpenDestroy and has already attempted
    41514140 * opening the network and found it to be non-existing.
    41524141 *
     
    41594148 * @param   pszTrunk        The trunk name. Its meaning is specfic to the type.
    41604149 * @param   fFlags          Flags, see INTNET_OPEN_FLAGS_*.
    4161  * @param   ppNetwork       Where to store the network. In the case of failure whatever is returned
    4162  *                          here should be dereferenced outside the INTNET::FastMutex.
     4150 * @param   ppNetwork       Where to store the network. In the case of failure
     4151 *                          whatever is returned here should be dereferenced
     4152 *                          outside the INTNET::hMtxCreateOpenDestroy.
    41634153 */
    41644154static int intnetR0CreateNetwork(PINTNET pIntNet, PSUPDRVSESSION pSession, const char *pszNetwork, INTNETTRUNKTYPE enmTrunkType,
     
    41904180    if (RT_SUCCESS(rc))
    41914181    {
    4192         //pNew->pIFs = NULL;
    4193         pNew->pIntNet = pIntNet;
    4194         //pNew->cActiveIFs = 0;
    4195         pNew->fFlags = fFlags;
    4196         size_t cchName = strlen(pszNetwork);
    4197         pNew->cchName = (uint8_t)cchName;
     4182        //pNew->pIfs        = NULL;
     4183        pNew->pIntNet       = pIntNet;
     4184        //pNew->cActiveIFs  = 0;
     4185        pNew->fFlags        = fFlags;
     4186        size_t cchName      = strlen(pszNetwork);
     4187        pNew->cchName       = (uint8_t)cchName;
    41984188        Assert(cchName && cchName < sizeof(pNew->szName));  /* caller's responsibility. */
    41994189        memcpy(pNew->szName, pszNetwork, cchName);          /* '\0' by alloc. */
    4200         pNew->enmTrunkType = enmTrunkType;
     4190        pNew->enmTrunkType  = enmTrunkType;
    42014191        Assert(strlen(pszTrunk) < sizeof(pNew->szTrunk));   /* caller's responsibility. */
    42024192        strcpy(pNew->szTrunk, pszTrunk);
    42034193        if (fFlags & INTNET_OPEN_FLAGS_SHARED_MAC_ON_WIRE)
    4204             pNew->pbTmp = RT_ALIGN_PT(pNew + 1, 64, uint8_t *);
     4194            pNew->pbTmp     = RT_ALIGN_PT(pNew + 1, 64, uint8_t *);
    42054195        //else
    4206         //    pNew->pbTmp = NULL;
     4196        //    pNew->pbTmp   = NULL;
    42074197
    42084198        /*
     
    42164206
    42174207            /*
    4218              * Check if the current session is actually allowed to create and open
    4219              * the network. It is possible to implement network name based policies
    4220              * and these must be checked now. SUPR0ObjRegister does no such checks.
     4208             * Check if the current session is actually allowed to create and
     4209             * open the network.  It is possible to implement network name
     4210             * based policies and these must be checked now.  SUPR0ObjRegister
     4211             * does no such checks.
    42214212             */
    42224213            rc = SUPR0ObjVerifyAccess(pNew->pvObj, pSession, pNew->szName);
     
    42354226            }
    42364227
    4237             /*
    4238              * We unlink it here so it cannot be opened when the caller leaves
    4239              * INTNET::FastMutex before dereferencing it.
    4240              */
    4241             Assert(pIntNet->pNetworks == pNew);
    4242             pIntNet->pNetworks = pNew->pNext;
    4243             pNew->pNext = NULL;
    4244 
    4245             *ppNetwork = pNew;
     4228            SUPR0ObjRelease(pNew->pvObj, pSession);
    42464229            LogFlow(("intnetR0CreateNetwork: returns %Rrc\n", rc));
    42474230            return rc;
     
    43244307
    43254308    /*
    4326      * Acquire the mutex to serialize open/create.
    4327      */
    4328     int rc = RTSemFastMutexRequest(pIntNet->FastMutex);
     4309     * Acquire the mutex to serialize open/create/close.
     4310     */
     4311    int rc = RTSemMutexRequest(pIntNet->hMtxCreateOpenDestroy, RT_INDEFINITE_WAIT);
    43294312    if (RT_FAILURE(rc))
    43304313        return rc;
     
    43334316     * Try open / create the network and create an interface on it for the
    43344317     * caller to use.
    4335      *
    4336      * Note! Because of the destructors grabbing INTNET::FastMutex and us being
    4337      * required to own this semaphore for the entire network opening / creation
    4338      * and interface creation sequence, intnetR0CreateNetwork will have to
    4339      * defer the network cleanup to us on failure.
    43404318     */
    43414319    PINTNETNETWORK pNetwork = NULL;
    43424320    rc = intnetR0OpenNetwork(pIntNet, pSession, pszNetwork, enmTrunkType, pszTrunk, fFlags, &pNetwork);
    4343     if (RT_SUCCESS(rc) || rc == VERR_NOT_FOUND)
    4344     {
    4345         bool fCloseNetwork = true;
    4346         bool fNewNet = rc == VERR_NOT_FOUND;
    4347         if (fNewNet)
    4348             rc = intnetR0CreateNetwork(pIntNet, pSession, pszNetwork, enmTrunkType, pszTrunk, fFlags, &pNetwork);
     4321    if (RT_SUCCESS(rc))
     4322    {
     4323        rc = intnetR0NetworkCreateIf(pNetwork, pSession, cbSend, cbRecv, phIf);
    43494324        if (RT_SUCCESS(rc))
    4350             rc = intnetR0NetworkCreateIf(pNetwork, pSession, cbSend, cbRecv, &fCloseNetwork, phIf);
    4351 
    4352         RTSemFastMutexRelease(pIntNet->FastMutex);
    4353 
    4354         if (RT_FAILURE(rc))
     4325            rc = VINF_ALREADY_INITIALIZED;
     4326        SUPR0ObjRelease(pNetwork->pvObj, pSession);
     4327    }
     4328    else if (rc == VERR_NOT_FOUND)
     4329    {
     4330        rc = intnetR0CreateNetwork(pIntNet, pSession, pszNetwork, enmTrunkType, pszTrunk, fFlags, &pNetwork);
     4331        if (RT_SUCCESS(rc))
    43554332        {
    4356             if(pNetwork && fCloseNetwork)
    4357                 intnetR0NetworkClose(pNetwork, pSession);
     4333            rc = intnetR0NetworkCreateIf(pNetwork, pSession, cbSend, cbRecv, phIf);
     4334            SUPR0ObjRelease(pNetwork->pvObj, pSession);
    43584335        }
    4359         else if(!fNewNet)
    4360             rc = VINF_ALREADY_INITIALIZED;
    4361     }
    4362     else
    4363         RTSemFastMutexRelease(pIntNet->FastMutex);
    4364 
     4336    }
     4337
     4338    RTSemMutexRelease(pIntNet->hMtxCreateOpenDestroy);
    43654339    LogFlow(("INTNETR0Open: return %Rrc *phIf=%RX32\n", rc, *phIf));
    43664340    return rc;
     
    44054379     */
    44064380    Assert(pIntNet->pNetworks == NULL);
    4407     if (pIntNet->FastMutex != NIL_RTSEMFASTMUTEX)
    4408     {
    4409         RTSemFastMutexDestroy(pIntNet->FastMutex);
    4410         pIntNet->FastMutex = NIL_RTSEMFASTMUTEX;
     4381    if (pIntNet->hMtxCreateOpenDestroy != NIL_RTSEMMUTEX)
     4382    {
     4383        RTSemMutexDestroy(pIntNet->hMtxCreateOpenDestroy);
     4384        pIntNet->hMtxCreateOpenDestroy = NIL_RTSEMMUTEX;
    44114385    }
    44124386    if (pIntNet->hHtIfs != NIL_RTHANDLETABLE)
     
    44364410        //pIntNet->pNetworks = NULL;
    44374411
    4438         rc = RTSemFastMutexCreate(&pIntNet->FastMutex);
     4412        rc = RTSemMutexCreate(&pIntNet->hMtxCreateOpenDestroy);
    44394413        if (RT_SUCCESS(rc))
    44404414        {
     
    44484422            }
    44494423
    4450             RTSemFastMutexDestroy(pIntNet->FastMutex);
     4424            RTSemMutexDestroy(pIntNet->hMtxCreateOpenDestroy);
    44514425        }
    44524426        RTMemFree(pIntNet);
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