6#define ADV_RING_BUF_ENABLED        1 
    7#define ADV_RING_BUF_CLEAN      2 
    9#define ADV_ATTRBUF_NUM         2 
   61static inline int flush_attr_info(
struct adv_port_att * attr)
 
   76static inline int move_rb_head(
struct ring_buf * buf, 
int length)
 
   79        buf->
status &= (~ADV_RING_BUF_CLEAN);
 
   89static inline int move_rb_tail(
struct ring_buf * buf, 
int length)
 
   99static inline int is_rb_empty(
struct ring_buf buf)
 
  104static inline int get_rb_length(
struct ring_buf buf)
 
  106    return (buf.
tail >= buf.
head)?(buf.
tail - buf.
head ):(buf.size - buf.head + buf.tail);
 
  109static inline int get_rb_llength(
struct ring_buf buf)
 
  112    int b = get_rb_length(buf);
 
  117static inline int get_rb_room(
struct ring_buf buf)
 
  119    return buf.
size - get_rb_length(buf) - 1;
 
  122static inline int get_rb_lroom(
struct ring_buf buf)
 
  125    int b = get_rb_room(buf);
 
  129static inline int get_rb_tail(
struct ring_buf buf)
 
  134static inline int get_rb_head(
struct ring_buf buf)
 
#define ADV_RING_BUF_CLEAN
Definition advvcom.h:7
 
#define ADV_ATTRBUF_NUM
Definition advvcom.h:9
 
struct adv_port_info _attr
Definition advvcom.h:40
 
int size
Definition advvcom.h:46
 
void * data
Definition advvcom.h:49
 
int index
Definition advvcom.h:44
 
spinlock_t lock
Definition advvcom.h:39
 
int _newbie
Definition advvcom.h:42
 
int begin
Definition advvcom.h:47
 
wait_queue_head_t wait
Definition advvcom.h:43
 
int usr_ptr
Definition advvcom.h:48
 
int throttled
Definition advvcom.h:45
 
unsigned int mctrl
Definition advvcom.h:41
 
struct list_head list
Definition advvcom.h:58
 
struct proc_dir_entry * entry
Definition advvcom.h:57
 
struct uart_port * adv_uart
Definition advvcom.h:53
 
struct adv_port_att attr
Definition advvcom.h:54
 
struct ring_buf rx
Definition advvcom.h:56
 
struct ring_buf tx
Definition advvcom.h:55
 
int head
Definition advvcom.h:27
 
int size
Definition advvcom.h:30
 
void * data
Definition advvcom.h:33
 
spinlock_t lock
Definition advvcom.h:26
 
int begin
Definition advvcom.h:29
 
wait_queue_head_t wait
Definition advvcom.h:32
 
unsigned int status
Definition advvcom.h:31
 
int tail
Definition advvcom.h:28