当前位置: 首页>>代码示例>>C++>>正文


C++ RTMP_SEM_UNLOCK函数代码示例

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


在下文中一共展示了RTMP_SEM_UNLOCK函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: IgmpGroupDelMembers

VOID IgmpGroupDelMembers(
    IN PRTMP_ADAPTER pAd,
    IN PUCHAR pMemberAddr,
    IN PNET_DEV pDev)
{
    int i;
    MULTICAST_FILTER_TABLE_ENTRY *pEntry = NULL;
    PMULTICAST_FILTER_TABLE pMulticastFilterTable = pAd->pMulticastFilterTable;

    for (i = 0; i < MAX_LEN_OF_MULTICAST_FILTER_TABLE; i++)
    {
        /* pick up the first available vacancy */
        pEntry = &pMulticastFilterTable->Content[i];
        if (pEntry->Valid == TRUE)
        {
            if(pMemberAddr != NULL)
            {
                RTMP_SEM_LOCK(&pMulticastFilterTable->MulticastFilterTabLock);
                DeleteIgmpMember(pMulticastFilterTable, &pEntry->MemberList, pMemberAddr);
                RTMP_SEM_UNLOCK(&pMulticastFilterTable->MulticastFilterTabLock);
            }

            if((pEntry->type == MCAT_FILTER_DYNAMIC)
                && (IgmpMemberCnt(&pEntry->MemberList) == 0))
                MulticastFilterTableDeleteEntry(pAd, pEntry->Addr, pMemberAddr, pDev);
        }
    }
}
开发者ID:CoreTech-Development,项目名称:buildroot-linux-kernel,代码行数:28,代码来源:igmp_snoop.c

示例2: MeasureReqLookUp

static PMEASURE_REQ_ENTRY MeasureReqLookUp(
    IN PRTMP_ADAPTER	pAd,
    IN UINT8			DialogToken)
{
    UINT HashIdx;
    PMEASURE_REQ_TAB pTab = pAd->CommonCfg.pMeasureReqTab;
    PMEASURE_REQ_ENTRY pEntry = NULL;
    PMEASURE_REQ_ENTRY pPrevEntry = NULL;

    if (pTab == NULL)
    {
        DBGPRINT(RT_DEBUG_ERROR, ("%s: pMeasureReqTab doesn't exist.\n", __func__));
        return NULL;
    }

    RTMP_SEM_LOCK(&pAd->CommonCfg.MeasureReqTabLock);

    HashIdx = MQ_DIALOGTOKEN_HASH_INDEX(DialogToken);
    pEntry = pTab->Hash[HashIdx];

    while (pEntry)
    {
        if (pEntry->DialogToken == DialogToken)
            break;
        else
        {
            pPrevEntry = pEntry;
            pEntry = pEntry->pNext;
        }
    }

    RTMP_SEM_UNLOCK(&pAd->CommonCfg.MeasureReqTabLock);

    return pEntry;
}
开发者ID:458941968,项目名称:mini2440-kernel-2.6.29,代码行数:35,代码来源:spectrum.c

示例3: RT28xx_UpdateTimToAsic

VOID RT28xx_UpdateTimToAsic(
    IN RTMP_ADAPTER *pAd,
    IN INT apidx,
    IN ULONG FrameLen)
{
    TIM_BUF_STRUC *tim_buf = NULL;
    UCHAR *buf;
    INT len;
    PNDIS_PACKET *pkt = NULL;

    IF_DEV_CONFIG_OPMODE_ON_AP(pAd) {
        tim_buf = &pAd->ApCfg.MBSSID[apidx].tim_buf;
    }

    if (!tim_buf) {
        MTWF_LOG(DBG_CAT_ALL, DBG_SUBCAT_ALL, DBG_LVL_ERROR, ("%s(): bcn_buf is NULL!\n", __FUNCTION__));
        return;
    }

    pkt = tim_buf->TimPkt;
    if (pkt) {
        buf = (UCHAR *)GET_OS_PKT_DATAPTR(pkt);
        len = FrameLen + pAd->chipCap.tx_hw_hdr_len;
        SET_OS_PKT_LEN(pkt, len);

        /* Now do hardware-depened kick out.*/
        HAL_KickOutMgmtTx(pAd, Q_IDX_BCN, pkt, buf, len);
        RTMP_SEM_UNLOCK(&pAd->BcnRingLock);

    } else {
        MTWF_LOG(DBG_CAT_ALL, DBG_SUBCAT_ALL, DBG_LVL_ERROR, ("%s(): TimPkt is NULL!\n", __FUNCTION__));
    }
}
开发者ID:23171580,项目名称:ralink,代码行数:33,代码来源:ap_nps.c

示例4: BMPktSigTabDelete

VOID BMPktSigTabDelete(
    IN PRTMP_ADAPTER	pAd,
    IN PUCHAR			MeshSA)
{
    PMESH_BMPKTSIG_TAB pTab = pAd->MeshTab.pBMPktSigTab;
    PMESH_BMPKTSIG_ENTRY pEntry = NULL;

    if(pTab == NULL)
    {
        DBGPRINT(RT_DEBUG_ERROR, ("%s: pBMPktSigTab doesn't exist.\n", __FUNCTION__));
        return;
    }

    /* if empty, return */
    if (pTab->Size == 0) 
    {
        DBGPRINT(RT_DEBUG_ERROR, ("pBMPktSigTab empty.\n"));
        return;
    }

    pEntry = BMPktSigTabLookUp(pAd, MeshSA);
    if (pEntry != NULL)
    {
        PMESH_BMPKTSIG_ENTRY pPrevEntry = NULL;
        ULONG HashIdx = BMPKT_MAC_ADDR_HASH_INDEX(pEntry->MeshSA);
        PMESH_BMPKTSIG_ENTRY pProbeEntry = pTab->Hash[HashIdx];

        RTMP_SEM_LOCK(&pAd->MeshTab.MeshBMPktTabLock);
        /* update Hash list */
        do
        {
            if (pProbeEntry == pEntry)
            {
                if (pPrevEntry == NULL)
                {
                    pTab->Hash[HashIdx] = pEntry->pNext;
                }
                else
                {
                    pPrevEntry->pNext = pEntry->pNext;
                }
                break;
            }

            pPrevEntry = pProbeEntry;
            pProbeEntry = pProbeEntry->pNext;
        } while (pProbeEntry);

        NdisZeroMemory(pEntry, sizeof(MESH_BMPKTSIG_ENTRY));
        pTab->Size--;

        RTMP_SEM_UNLOCK(&pAd->MeshTab.MeshBMPktTabLock);
    }

    return;
}
开发者ID:vm3vuy,项目名称:my-local-repository,代码行数:56,代码来源:mesh_bmpkt.c

示例5: TpcReqDelete

static VOID TpcReqDelete(
    IN PRTMP_ADAPTER	pAd,
    IN UINT8			DialogToken)
{
    PTPC_REQ_TAB pTab = pAd->CommonCfg.pTpcReqTab;
    PTPC_REQ_ENTRY pEntry = NULL;

    if(pTab == NULL)
    {
        DBGPRINT(RT_DEBUG_ERROR, ("%s: pTpcReqTab doesn't exist.\n", __func__));
        return;
    }

    // if empty, return
    if (pTab->Size == 0)
    {
        DBGPRINT(RT_DEBUG_ERROR, ("pTpcReqTab empty.\n"));
        return;
    }

    pEntry = TpcReqLookUp(pAd, DialogToken);
    if (pEntry != NULL)
    {
        PTPC_REQ_ENTRY pPrevEntry = NULL;
        ULONG HashIdx = TPC_DIALOGTOKEN_HASH_INDEX(pEntry->DialogToken);
        PTPC_REQ_ENTRY pProbeEntry = pTab->Hash[HashIdx];

        RTMP_SEM_LOCK(&pAd->CommonCfg.TpcReqTabLock);
        // update Hash list
        do
        {
            if (pProbeEntry == pEntry)
            {
                if (pPrevEntry == NULL)
                {
                    pTab->Hash[HashIdx] = pEntry->pNext;
                }
                else
                {
                    pPrevEntry->pNext = pEntry->pNext;
                }
                break;
            }

            pPrevEntry = pProbeEntry;
            pProbeEntry = pProbeEntry->pNext;
        } while (pProbeEntry);

        NdisZeroMemory(pEntry, sizeof(TPC_REQ_ENTRY));
        pTab->Size--;

        RTMP_SEM_UNLOCK(&pAd->CommonCfg.TpcReqTabLock);
    }

    return;
}
开发者ID:458941968,项目名称:mini2440-kernel-2.6.29,代码行数:56,代码来源:spectrum.c

示例6: FreeGrpMemberEntry

static inline VOID FreeGrpMemberEntry(
    IN PMULTICAST_FILTER_TABLE pMulticastFilterTable,
    IN PMEMBER_ENTRY pEntry)
{
    RTMP_SEM_LOCK(&pMulticastFilterTable->FreeMemberPoolTabLock);

    insertTailList(&pMulticastFilterTable->freeEntryList, (PLIST_ENTRY)pEntry);

    RTMP_SEM_UNLOCK(&pMulticastFilterTable->FreeMemberPoolTabLock);
}
开发者ID:CoreTech-Development,项目名称:buildroot-linux-kernel,代码行数:10,代码来源:igmp_snoop.c

示例7: BMPktSigTabLookUp

PMESH_BMPKTSIG_ENTRY BMPktSigTabLookUp(
    IN PRTMP_ADAPTER	pAd,
    IN PUCHAR			MeshSA)
{
    UINT HashIdx;
    ULONG Now;
    PMESH_BMPKTSIG_TAB pTab = pAd->MeshTab.pBMPktSigTab;
    PMESH_BMPKTSIG_ENTRY pEntry = NULL;
    PMESH_BMPKTSIG_ENTRY pPrevEntry = NULL;

    if (pTab == NULL)
    {
        DBGPRINT(RT_DEBUG_ERROR, ("%s: pBMPktSigTab doesn't exist.\n", __FUNCTION__));
        return NULL;
    }

    RTMP_SEM_LOCK(&pAd->MeshTab.MeshBMPktTabLock);

    HashIdx = BMPKT_MAC_ADDR_HASH_INDEX(MeshSA);
    pEntry = pTab->Hash[HashIdx];

    while (pEntry)
    {
        if (MAC_ADDR_EQUAL(pEntry->MeshSA, MeshSA)) 
            break;
        else
        {
            pPrevEntry = pEntry;
            pEntry = pEntry->pNext;
        }
    }

    if (pEntry)
    {
        NdisGetSystemUpTime(&Now);
        if (RTMP_TIME_AFTER((unsigned long)Now, (unsigned long)(pEntry->LastRefTime + MESH_BMPKT_RECORD_TIME)))
        { /* remove ageout entry. */
            if (pPrevEntry == NULL)
                pTab->Hash[HashIdx] = pEntry->pNext;
            else
                pPrevEntry->pNext = pEntry->pNext;

            NdisZeroMemory(pEntry, sizeof(MESH_BMPKTSIG_ENTRY));
            pEntry = NULL;
            pTab->Size--;
        }
        else
            pEntry->LastRefTime = Now;
    }

    RTMP_SEM_UNLOCK(&pAd->MeshTab.MeshBMPktTabLock);
    
    return pEntry;
}
开发者ID:vm3vuy,项目名称:my-local-repository,代码行数:54,代码来源:mesh_bmpkt.c

示例8: CliWdsEntyFree

VOID CliWdsEntyFree(
    IN PRTMP_ADAPTER pAd,
    IN PCLIWDS_PROXY_ENTRY pCliWdsEntry)
{
    RTMP_SEM_LOCK(&pAd->ApCfg.CliWdsTabLock);

    insertTailList(&pAd->ApCfg.CliWdsEntryFreeList, (PLIST_ENTRY)pCliWdsEntry);

    RTMP_SEM_UNLOCK(&pAd->ApCfg.CliWdsTabLock);

    return;
}
开发者ID:eagleworld,项目名称:RT3070_SoftAP,代码行数:12,代码来源:client_wds.c

示例9: MultipathEntyFree

VOID MultipathEntyFree(
    IN PRTMP_ADAPTER pAd,
    IN PMESH_MULTIPATH_ENTRY pEntry)
{
    RTMP_SEM_LOCK(&pAd->MeshTab.MultipathTabLock);

    insertTailList(&pAd->MeshTab.MultipathEntryFreeList, (PLIST_ENTRY)pEntry);

    RTMP_SEM_UNLOCK(&pAd->MeshTab.MultipathTabLock);

    return;
}
开发者ID:vm3vuy,项目名称:my-local-repository,代码行数:12,代码来源:mesh_bmpkt.c

示例10: IGMPTableDisplay

/*
    ==========================================================================
    Description:
        Display all entrys in IGMP table
    ==========================================================================
 */
static VOID IGMPTableDisplay(
    IN PRTMP_ADAPTER pAd)
{
    int i;
    MULTICAST_FILTER_TABLE_ENTRY *pEntry = NULL;
    PMULTICAST_FILTER_TABLE pMulticastFilterTable = pAd->pMulticastFilterTable;

    printk("Multicast filter table: ");

    if (pMulticastFilterTable == NULL)
    {
        printk("Table is not ready!\n");
        return;
    }

    // if FULL, return
    if (pMulticastFilterTable->Size == 0)
    {
        printk("Table is empty.\n");
        return;
    }

    printk("\n");

    // allocate one MAC entry
    RTMP_SEM_LOCK(&pMulticastFilterTable->MulticastFilterTabLock);

    for (i = 0; i< MAX_LEN_OF_MULTICAST_FILTER_TABLE; i++)
    {
        // pick up the first available vacancy
        if (pMulticastFilterTable->Content[i].Valid == TRUE)
        {
            PMEMBER_ENTRY pMemberEntry = NULL;
            pEntry = &pMulticastFilterTable->Content[i];

            printk("IF(%s) entry #%d, type=%s, GrpId=(%02x:%02x:%02x:%02x:%02x:%02x) memberCnt=%d\n",
                RTMP_OS_NETDEV_GET_DEVNAME(pEntry->net_dev), i, (pEntry->type==0 ? "static":"dynamic"),
                PRINT_MAC(pEntry->Addr), IgmpMemberCnt(&pEntry->MemberList));

            pMemberEntry = (PMEMBER_ENTRY)pEntry->MemberList.pHead;
            while (pMemberEntry)
            {
                printk("  member MAC=(%02x:%02x:%02x:%02x:%02x:%02x)\n", PRINT_MAC(pMemberEntry->Addr));
                pMemberEntry = pMemberEntry->pNext;
            }
        }
    }

    RTMP_SEM_UNLOCK(&pMulticastFilterTable->MulticastFilterTabLock);

    return;
}
开发者ID:schidler,项目名称:flyzjhz-rt-n56u,代码行数:58,代码来源:igmp_snoop.c

示例11: rt2870_rts_frame_complete_tasklet

static void rt2870_rts_frame_complete_tasklet(unsigned long data)
{
    PRTMP_ADAPTER	pAd;
    PTX_CONTEXT		pRTSContext;
    purbb_t			pUrb;
    NTSTATUS		Status;
    unsigned long	irqFlag;


    pUrb		= (purbb_t)data;
    pRTSContext	= (PTX_CONTEXT)pUrb->context;
    pAd			= pRTSContext->pAd;
    Status		= pUrb->status;

    // Reset RTS frame context flags
    RTMP_IRQ_LOCK(&pAd->BulkOutLock[0], irqFlag);
    pRTSContext->IRPPending = FALSE;
    pRTSContext->InUse		= FALSE;
            
    if (Status == USB_ST_NOERROR)
    {
        RTMP_IRQ_UNLOCK(&pAd->BulkOutLock[0], irqFlag);
        RTMPDeQueuePacket(pAd, FALSE, NUM_OF_TX_RING, MAX_TX_PROCESS);
    }
    else	// STATUS_OTHER
    {
        if ((!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_RESET_IN_PROGRESS)) &&
            (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_HALT_IN_PROGRESS)) &&
            (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST)) &&
            (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_BULKOUT_RESET)))
        {
            DBGPRINT_RAW(RT_DEBUG_ERROR, ("Bulk Out RTS Frame Failed\n"));
            RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_BULKOUT_RESET);
            pAd->bulkResetPipeid = (MGMTPIPEIDX | BULKOUT_MGMT_RESET_FLAG);
            RTMP_IRQ_UNLOCK(&pAd->BulkOutLock[0], irqFlag);
            RTUSBEnqueueInternalCmd(pAd, CMDTHREAD_RESET_BULK_OUT, NULL, 0);
        }
        else
        {
            RTMP_IRQ_UNLOCK(&pAd->BulkOutLock[0], irqFlag);
        }
    }

    RTMP_SEM_LOCK(&pAd->BulkOutLock[pRTSContext->BulkOutPipeId]);
    pAd->BulkOutPending[pRTSContext->BulkOutPipeId] = FALSE;
    RTMP_SEM_UNLOCK(&pAd->BulkOutLock[pRTSContext->BulkOutPipeId]);

    // Always call Bulk routine, even reset bulk.
    // The protectioon of rest bulk should be in BulkOut routine
    RTUSBKickBulkOut(pAd);

}
开发者ID:acassis,项目名称:emlinux-ssd1935,代码行数:52,代码来源:2870_rtmp_init.c

示例12: CliWdsEntyAlloc

PCLIWDS_PROXY_ENTRY CliWdsEntyAlloc(
    IN PRTMP_ADAPTER pAd)
{
    PCLIWDS_PROXY_ENTRY pCliWdsEntry;

    RTMP_SEM_LOCK(&pAd->ApCfg.CliWdsTabLock);

    pCliWdsEntry = (PCLIWDS_PROXY_ENTRY)removeHeadList(&pAd->ApCfg.CliWdsEntryFreeList);

    RTMP_SEM_UNLOCK(&pAd->ApCfg.CliWdsTabLock);

    return pCliWdsEntry;
}
开发者ID:eagleworld,项目名称:RT3070_SoftAP,代码行数:13,代码来源:client_wds.c

示例13: MultipathEntyAlloc

PMESH_MULTIPATH_ENTRY MultipathEntyAlloc(
    IN PRTMP_ADAPTER pAd)
{
    PMESH_MULTIPATH_ENTRY pEntry;

    RTMP_SEM_LOCK(&pAd->MeshTab.MultipathTabLock);

    pEntry = (PMESH_MULTIPATH_ENTRY)removeHeadList(&pAd->MeshTab.MultipathEntryFreeList);

    RTMP_SEM_UNLOCK(&pAd->MeshTab.MultipathTabLock);

    return pEntry;
}
开发者ID:vm3vuy,项目名称:my-local-repository,代码行数:13,代码来源:mesh_bmpkt.c

示例14: RtmpOsUsbEmptyUrbCheck

VOID RtmpOsUsbEmptyUrbCheck(
    IN	VOID				**ppWait,
    IN	NDIS_SPIN_LOCK		*pBulkInLock,
    IN	UCHAR				*pPendingRx)
{
    UINT32 i = 0;
    DECLARE_WAIT_QUEUE_HEAD(unlink_wakeup); 
    DECLARE_WAITQUEUE(wait, current);


    /* ensure there are no more active urbs. */
    add_wait_queue (&unlink_wakeup, &wait);
    *ppWait = &unlink_wakeup;

    /* maybe wait for deletions to finish. */
    i = 0;
    /*while((i < 25) && atomic_read(&pAd->PendingRx) > 0) */
    while(i < 25)
    {
/*		unsigned long IrqFlags; */

        RTMP_SEM_LOCK(pBulkInLock);
        if (*pPendingRx == 0)
        {
            RTMP_SEM_UNLOCK(pBulkInLock);
            break;
        }
        RTMP_SEM_UNLOCK(pBulkInLock);
        
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9)
        msleep(UNLINK_TIMEOUT_MS);	/*Time in millisecond */
#else
        RTMPusecDelay(UNLINK_TIMEOUT_MS*1000);	/*Time in microsecond */
#endif
        i++;
    }
    *ppWait = NULL;
    remove_wait_queue (&unlink_wakeup, &wait); 
}
开发者ID:J1nx-Hackable-Gadgets,项目名称:mx-common,代码行数:39,代码来源:rt_usb_util.c

示例15: AllocaGrpMemberEntry

static inline PMEMBER_ENTRY AllocaGrpMemberEntry(
    IN PMULTICAST_FILTER_TABLE pMulticastFilterTable)
{
    PMEMBER_ENTRY pMemberEntry;

    RTMP_SEM_LOCK(&pMulticastFilterTable->FreeMemberPoolTabLock);

    pMemberEntry = (PMEMBER_ENTRY)removeHeadList(&pMulticastFilterTable->freeEntryList);

    RTMP_SEM_UNLOCK(&pMulticastFilterTable->FreeMemberPoolTabLock);

    return (PMEMBER_ENTRY)pMemberEntry;
}
开发者ID:CoreTech-Development,项目名称:buildroot-linux-kernel,代码行数:13,代码来源:igmp_snoop.c


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