/* check whether the buffer is the last node in the queue  */
unsigned char RtbNodeIsLast(IN RTB_QUEUE_HEAD *RtkQueueHead, IN RTK_BUFFER *pRtkBuffer)
/* check whether the buffer is the last node in the queue  */
unsigned char RtbNodeIsLast(IN RTB_QUEUE_HEAD *RtkQueueHead, IN RTK_BUFFER *pRtkBuffer)
{
    RTK_BUFFER* pBuf;
    aos_mutex_lock(&RtkQueueHead->Lock, AOS_WAIT_FOREVER);
    pBuf = (RTK_BUFFER*)RtkQueueHead->List.Prev;
    if(pBuf == pRtkBuffer)
    {
        aos_mutex_unlock(&RtkQueueHead->Lock);
        return true;
    }
    aos_mutex_unlock(&RtkQueueHead->Lock);
    return false;
}