summaryrefslogtreecommitdiff
path: root/include/linux/atmdev.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@conectiva.com.br>2003-06-04 16:00:32 -0300
committerArnaldo Carvalho de Melo <acme@conectiva.com.br>2003-06-04 16:00:32 -0300
commit63413da5d31d99ba8d89cf9d9ff997f93b49443d (patch)
tree4add196b24e554f140663a7bd92260a7fd9ebdc4 /include/linux/atmdev.h
parentfbf47415732b00ff5578d55c6be779a109a01e1f (diff)
o net: create struct sock_common and use in struct sock & tcp_tw_bucket
With this the data dependency is reduced to just making sure that the first member of both struct sock and struct tcp_tw_bucket are a struct sock_common. Also makes it easier to grep for struct sock and struct tcp_tw_bucket usage in the tree as all the members in those structs are prefixed, respectively, with sk_ and tw_, like struct inode (i_), struct block_device (bd_), etc. Checked namespace with make tags/ctags, just one colision with the macros for the struct sock members, with a wanrouter struct, fixed that s/sk_state/state_sk/g in the wanrouter struct. Checked as well if the names of the members in both structs collided with some macro, none found.
Diffstat (limited to 'include/linux/atmdev.h')
-rw-r--r--include/linux/atmdev.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h
index 33a81bdd1fb8..16b70b711ffa 100644
--- a/include/linux/atmdev.h
+++ b/include/linux/atmdev.h
@@ -30,7 +30,7 @@
#define ATM_DS3_PCR (8000*12)
/* DS3: 12 cells in a 125 usec time slot */
-#define atm_sk(__sk) ((struct atm_vcc *)(__sk)->protinfo)
+#define atm_sk(__sk) ((struct atm_vcc *)(__sk)->sk_protinfo)
#define ATM_SD(s) (atm_sk((s)->sk))
@@ -413,19 +413,20 @@ static inline int atm_guess_pdu2truesize(int pdu_size)
static inline void atm_force_charge(struct atm_vcc *vcc,int truesize)
{
- atomic_add(truesize, &vcc->sk->rmem_alloc);
+ atomic_add(truesize, &vcc->sk->sk_rmem_alloc);
}
static inline void atm_return(struct atm_vcc *vcc,int truesize)
{
- atomic_sub(truesize, &vcc->sk->rmem_alloc);
+ atomic_sub(truesize, &vcc->sk->sk_rmem_alloc);
}
static inline int atm_may_send(struct atm_vcc *vcc,unsigned int size)
{
- return (size + atomic_read(&vcc->sk->wmem_alloc)) < vcc->sk->sndbuf;
+ return (size + atomic_read(&vcc->sk->sk_wmem_alloc)) <
+ vcc->sk->sk_sndbuf;
}