/* Lock free operation, be careful of the use scheme Returns: pointer popped out  */
void* rtw_cbuf_pop(struct rtw_cbuf *cbuf)
/* Lock free operation, be careful of the use scheme Returns: pointer popped out  */
void* rtw_cbuf_pop(struct rtw_cbuf *cbuf)
{
	void *buf;
	if (rtw_cbuf_empty(cbuf))
		return NULL;
	if (0)
		DBG_871X("%s on %u\n", __func__, cbuf->read);
	buf = cbuf->bufs[cbuf->read];
	cbuf->read = (cbuf->read+1)%cbuf->size;
	return buf;
}