Path: blob/master/ALFA-W1F1/RTL8814AU/include/circ_buf.h
1307 views
/******************************************************************************1*2* Copyright(c) 2007 - 2017 Realtek Corporation.3*4* This program is free software; you can redistribute it and/or modify it5* under the terms of version 2 of the GNU General Public License as6* published by the Free Software Foundation.7*8* This program is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for11* more details.12*13*****************************************************************************/14#ifndef __CIRC_BUF_H_15#define __CIRC_BUF_H_ 11617#define CIRC_CNT(head,tail,size) (((head) - (tail)) & ((size)-1))1819#define CIRC_SPACE(head,tail,size) CIRC_CNT((tail),((head)+1),(size))2021#endif //_CIRC_BUF_H_22232425