亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ixethdbhashtable.c

?? u-boot1.3.0的原碼,從配了網(wǎng)絡(luò)驅(qū)動(dòng)和FLASH的驅(qū)動(dòng),并該用ESC竟如
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/** * @file ethHash.c * * @brief Hashtable implementation *  * @par * IXP400 SW Release version 2.0 *  * -- Copyright Notice -- *  * @par * Copyright 2001-2005, Intel Corporation. * All rights reserved. *  * @par * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * 3. Neither the name of the Intel Corporation nor the names of its contributors *    may be used to endorse or promote products derived from this software *    without specific prior written permission. *  * @par * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. *  * @par * -- End of Copyright Notice -- */#include "IxEthDB_p.h"#include "IxEthDBLocks_p.h"/** * @addtogroup EthDB * * @{ *//** * @brief initializes a hash table object * * @param hashTable uninitialized hash table structure * @param numBuckets number of buckets to use * @param entryHashFunction hash function used  * to hash entire hash node data block (for adding) * @param matchFunctions array of match functions, indexed on type, * used to differentiate records with the same hash value * @param freeFunction function used to free node data blocks * * Initializes the given hash table object. * * @internal */void ixEthDBInitHash(HashTable *hashTable,                      UINT32 numBuckets,                      HashFunction entryHashFunction,                      MatchFunction *matchFunctions,                      FreeFunction freeFunction){    UINT32 bucketIndex;    UINT32 hashSize = numBuckets * sizeof(HashNode *);    /* entry hashing, matching and freeing methods */    hashTable->entryHashFunction  = entryHashFunction;    hashTable->matchFunctions     = matchFunctions;    hashTable->freeFunction       = freeFunction;    /* buckets */    hashTable->numBuckets = numBuckets;    /* set to 0 all buckets */    memset(hashTable->hashBuckets, 0, hashSize);    /* init bucket locks - note that initially all mutexes are unlocked after MutexInit()*/    for (bucketIndex = 0 ; bucketIndex < numBuckets ; bucketIndex++)    {        ixOsalFastMutexInit(&hashTable->bucketLocks[bucketIndex]);    }}/** * @brief adds an entry to the hash table * * @param hashTable hash table to add the entry to * @param entry entry to add * * The entry will be hashed using the entry hashing function and added to the * hash table, unless a locking blockage occurs, in which case the caller * should retry. * * @retval IX_ETH_DB_SUCCESS if adding <i>entry</i> has succeeded * @retval IX_ETH_DB_NOMEM if there's no memory left in the hash node pool * @retval IX_ETH_DB_BUSY if there's a locking failure on the insertion path * * @internal */IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBAddHashEntry(HashTable *hashTable, void *entry){    UINT32 hashValue   = hashTable->entryHashFunction(entry);    UINT32 bucketIndex = hashValue % hashTable->numBuckets;    HashNode *bucket   = hashTable->hashBuckets[bucketIndex];    HashNode *newNode;    LockStack locks;    INIT_STACK(&locks);    /* lock bucket */    PUSH_LOCK(&locks, &hashTable->bucketLocks[bucketIndex]);    /* lock insertion element (first in chain), if any */    if (bucket != NULL)    {        PUSH_LOCK(&locks, &bucket->lock);    }    /* get new node */    newNode = ixEthDBAllocHashNode();    if (newNode == NULL)    {        /* unlock everything */        UNROLL_STACK(&locks);        return IX_ETH_DB_NOMEM;    }    /* init lock - note that mutexes are unlocked after MutexInit */    ixOsalFastMutexInit(&newNode->lock);    /* populate new link */    newNode->data = entry;    /* add to bucket */    newNode->next                       = bucket;    hashTable->hashBuckets[bucketIndex] = newNode;    /* unlock bucket and insertion point */    UNROLL_STACK(&locks);    return IX_ETH_DB_SUCCESS;}/** * @brief removes an entry from the hashtable * * @param hashTable hash table to remove entry from * @param keyType type of record key used for matching * @param reference reference key used to identify the entry * * The reference key will be hashed using the key hashing function, * the entry is searched using the hashed value and then examined * against the reference entry using the match function. A positive * match will trigger the deletion of the entry. * Locking failures are reported and the caller should retry. * * @retval IX_ETH_DB_SUCCESS if the removal was successful * @retval IX_ETH_DB_NO_SUCH_ADDR if the entry was not found * @retval IX_ETH_DB_BUSY if a locking failure occured during the process * * @internal */IxEthDBStatus ixEthDBRemoveHashEntry(HashTable *hashTable, int keyType, void *reference){    UINT32 hashValue       = hashTable->entryHashFunction(reference);    UINT32 bucketIndex     = hashValue % hashTable->numBuckets;    HashNode *node         = hashTable->hashBuckets[bucketIndex];    HashNode *previousNode = NULL;        LockStack locks;    INIT_STACK(&locks);    while (node != NULL)    {        /* try to lock node */        PUSH_LOCK(&locks, &node->lock);        if (hashTable->matchFunctions[keyType](reference, node->data))        {            /* found entry */            if (node->next != NULL)            {                PUSH_LOCK(&locks, &node->next->lock);            }            if (previousNode == NULL)            {                /* node is head of chain */                PUSH_LOCK(&locks, &hashTable->bucketLocks[bucketIndex]);                hashTable->hashBuckets[bucketIndex] = node->next;                POP_LOCK(&locks);            }            else            {                /* relink */                previousNode->next = node->next;            }            UNROLL_STACK(&locks);            /* free node */            hashTable->freeFunction(node->data);            ixEthDBFreeHashNode(node);            return IX_ETH_DB_SUCCESS;        }        else        {            if (previousNode != NULL)            {                /* unlock previous node */                SHIFT_STACK(&locks);            }            /* advance to next element in chain */            previousNode = node;            node         = node->next;        }    }    UNROLL_STACK(&locks);    /* not found */    return IX_ETH_DB_NO_SUCH_ADDR;}/** * @brief retrieves an entry from the hash table * * @param hashTable hash table to perform the search into * @param reference search key (a MAC address) * @param keyType type of record key used for matching * @param searchResult pointer where a reference to the located hash node  * is placed * * Searches the entry with the same key as <i>reference</i> and places the * pointer to the resulting node in <i>searchResult</i>. * An implicit write access lock is granted after a search, which gives the  * caller the opportunity to modify the entry. * Access should be released as soon as possible using @ref ixEthDBReleaseHashNode(). * * @see ixEthDBReleaseHashNode() * * @retval IX_ETH_DB_SUCCESS if the search was completed successfully * @retval IX_ETH_DB_NO_SUCH_ADDRESS if no entry with the given key was found * @retval IX_ETH_DB_BUSY if a locking failure has occured, in which case * the caller should retry * * @warning unless the return value is <b>IX_ETH_DB_SUCCESS</b> the searchResult * location is NOT modified and therefore using a NULL comparison test when the * value was not properly initialized would be an error * * @internal */IxEthDBStatus ixEthDBSearchHashEntry(HashTable *hashTable, int keyType, void *reference, HashNode **searchResult){    UINT32 hashValue;    HashNode *node;    hashValue = hashTable->entryHashFunction(reference);    node      = hashTable->hashBuckets[hashValue % hashTable->numBuckets];    while (node != NULL)    {        TRY_LOCK(&node->lock);        if (hashTable->matchFunctions[keyType](reference, node->data))        {            *searchResult = node;            return IX_ETH_DB_SUCCESS;        }        else        {            UNLOCK(&node->lock);            node = node->next;        }    }    /* not found */    return IX_ETH_DB_NO_SUCH_ADDR;}/** * @brief reports the existence of an entry in the hash table * * @param hashTable hash table to perform the search into * @param reference search key (a MAC address) * @param keyType type of record key used for matching * * Searches the entry with the same key as <i>reference</i>. * No implicit write access lock is granted after a search, hence the  * caller cannot access or modify the entry. The result is only temporary. * * @see ixEthDBReleaseHashNode() * * @retval IX_ETH_DB_SUCCESS if the search was completed successfully * @retval IX_ETH_DB_NO_SUCH_ADDRESS if no entry with the given key was found * @retval IX_ETH_DB_BUSY if a locking failure has occured, in which case * the caller should retry * * @internal

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久青草国产手机看片福利盒子| 国产视频一区在线观看| 久久精品国产99国产| 欧美高清一级片在线观看| 欧美精品一级二级三级| 国产一区福利在线| 亚洲第四色夜色| 中文一区在线播放| 欧美一区二区精品久久911| 大白屁股一区二区视频| 爽爽淫人综合网网站| 国产精品福利影院| 久久影院午夜片一区| 69精品人人人人| 色偷偷88欧美精品久久久| 国产乱码字幕精品高清av| 日韩电影在线看| 亚洲精品ww久久久久久p站| 欧美激情资源网| 亚洲精品一区二区三区蜜桃下载| 国产精品免费视频一区| 欧美一级一区二区| 在线亚洲人成电影网站色www| 国产不卡视频一区二区三区| 六月婷婷色综合| 亚州成人在线电影| 亚洲国产精品久久人人爱| 亚洲人成7777| 成人欧美一区二区三区黑人麻豆| 久久毛片高清国产| 精品盗摄一区二区三区| 日韩一级片网址| 8v天堂国产在线一区二区| 欧美日韩一区二区欧美激情 | 亚洲国产精品久久一线不卡| 中文字幕一区二区在线观看 | 亚洲欧美另类小说视频| 中国av一区二区三区| 精品久久久久久无| 精品国产污污免费网站入口| 精品国产免费视频| xfplay精品久久| 国产欧美一区二区在线| 国产清纯白嫩初高生在线观看91 | 精品国产青草久久久久福利| 7777精品久久久大香线蕉| 欧美一区二区三区视频| 欧美一级免费观看| 欧美第一区第二区| 久久久青草青青国产亚洲免观| 久久精品欧美一区二区三区不卡 | 欧美片网站yy| 制服丝袜亚洲播放| 欧美一区二区三区在线| 欧美电影免费观看高清完整版在线 | 成人h版在线观看| 99国产精品一区| 色婷婷亚洲精品| 欧美色爱综合网| 欧美一区二区三区不卡| 日韩精品一区二区三区蜜臀| 久久精品视频一区| 亚洲另类在线视频| 日韩综合一区二区| 精品一区二区三区在线视频| 国产成人av影院| 99re成人精品视频| 欧美区在线观看| 久久精品欧美一区二区三区麻豆| 成人免费视频在线观看| 午夜激情一区二区| 国产盗摄一区二区三区| 91精彩视频在线| 精品国产精品一区二区夜夜嗨| 中文字幕乱码日本亚洲一区二区 | hitomi一区二区三区精品| 色美美综合视频| 欧美一区二区三区视频免费播放| 久久精品夜夜夜夜久久| 亚洲一区二区不卡免费| 国产在线播精品第三| 色国产综合视频| 欧美一区二区三区四区高清| 亚洲国产精品av| 亚洲第一电影网| 高清视频一区二区| 欧美日韩国产美| 欧美国产日韩a欧美在线观看| 亚洲综合视频在线| 国产乱码精品一区二区三区忘忧草 | 中文字幕一区在线观看| 美腿丝袜在线亚洲一区| 色综合欧美在线视频区| 久久色成人在线| 亚洲成人av电影在线| 成人一级视频在线观看| 欧美一区二区久久| 一区二区国产盗摄色噜噜| 国产一区美女在线| 91麻豆精品国产综合久久久久久 | 亚洲男同性视频| 久久av老司机精品网站导航| 色av一区二区| 国产精品视频免费| 韩国成人在线视频| 欧美精品亚洲一区二区在线播放| 最新国产精品久久精品| 国产一区二区在线视频| 欧美精品日韩精品| 曰韩精品一区二区| youjizz久久| 久久精品视频免费| 蜜臀久久99精品久久久久宅男| 色婷婷国产精品| 亚洲国产成人午夜在线一区| 国产美女精品在线| 日韩亚洲欧美中文三级| 亚洲国产综合人成综合网站| 99久久精品国产网站| 国产亚洲自拍一区| 激情综合色综合久久| 91精品国产综合久久精品麻豆| 樱花草国产18久久久久| av电影在线观看不卡| 国产欧美一区二区三区在线老狼| 日韩国产欧美在线观看| 欧美日韩五月天| 亚洲午夜久久久久久久久电影院 | 日韩三级电影网址| 91一区二区在线观看| 久久久久9999亚洲精品| 国产美女av一区二区三区| 精品99一区二区三区| 国产真实乱对白精彩久久| 精品久久久久久久久久久久久久久 | 久久久蜜桃精品| 国产一区91精品张津瑜| 国产欧美综合在线观看第十页| 国产毛片一区二区| 欧美国产成人在线| 成人黄色av网站在线| 国产精品欧美经典| 91偷拍与自偷拍精品| 亚洲天堂2014| 欧美性猛交xxxx乱大交退制版| 亚洲成年人网站在线观看| 欧美日韩国产在线观看| 日韩av网站免费在线| 日韩精品一区二区三区四区| 国产在线精品一区二区夜色| 久久亚洲精精品中文字幕早川悠里| 裸体歌舞表演一区二区| 国产日韩欧美高清| www.日韩av| 亚洲国产精品久久人人爱| 日韩三级高清在线| 东方欧美亚洲色图在线| 中文字幕一区视频| 欧美日韩性生活| 精品一区二区三区的国产在线播放| 久久久美女毛片| 99re这里只有精品视频首页| 亚洲国产综合色| 亚洲一区二区欧美激情| 日韩一区二区视频| 成人看片黄a免费看在线| 亚洲狠狠爱一区二区三区| 日韩欧美成人激情| 99久久99久久综合| 日日夜夜精品视频免费| 国产日韩欧美激情| 欧美日韩中文另类| 国产麻豆成人精品| 亚洲激情自拍视频| 久久综合色天天久久综合图片| 91色乱码一区二区三区| 日本午夜精品一区二区三区电影| 2021中文字幕一区亚洲| 91行情网站电视在线观看高清版| 日韩精品一卡二卡三卡四卡无卡| 国产色婷婷亚洲99精品小说| 91亚洲精品久久久蜜桃| 日本亚洲最大的色成网站www| 国产精品拍天天在线| 7777精品伊人久久久大香线蕉超级流畅| 韩国av一区二区| 亚洲一二三专区| 国产亚洲一区二区在线观看| 欧美午夜精品一区二区三区| 国产酒店精品激情| 亚洲成人午夜电影| 亚洲国产激情av| 欧美一区二区三区在线视频| 91免费视频网| 风间由美性色一区二区三区| 午夜欧美在线一二页| 国产精品欧美一区二区三区| 欧美电视剧免费全集观看| 欧美色视频在线观看| 成人美女视频在线观看18|