diff options
| author | Arnaldo Carvalho de Melo <acme@conectiva.com.br> | 2003-06-16 10:46:59 -0300 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@conectiva.com.br> | 2003-06-16 10:46:59 -0300 |
| commit | fc76169011a18d478708c062b988413f5e7f6beb (patch) | |
| tree | 3fc661d30b2d1b0fd1d95a6967a35a45ec4090e7 /net/unix/garbage.c | |
| parent | 0b13af99d4ab8f5717c26ca29a0000bbd5061dbf (diff) | |
o af_unix: remove typedef unix_socket, use plain struct sock
Diffstat (limited to 'net/unix/garbage.c')
| -rw-r--r-- | net/unix/garbage.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/net/unix/garbage.c b/net/unix/garbage.c index 86c6998d35ae..3d5e1a5f433f 100644 --- a/net/unix/garbage.c +++ b/net/unix/garbage.c @@ -84,17 +84,17 @@ /* Internal data structures and random procedures: */ -#define GC_HEAD ((unix_socket *)(-1)) -#define GC_ORPHAN ((unix_socket *)(-3)) +#define GC_HEAD ((struct sock *)(-1)) +#define GC_ORPHAN ((struct sock *)(-3)) -static unix_socket *gc_current=GC_HEAD; /* stack of objects to mark */ +static struct sock *gc_current = GC_HEAD; /* stack of objects to mark */ atomic_t unix_tot_inflight = ATOMIC_INIT(0); -static unix_socket *unix_get_socket(struct file *filp) +static struct sock *unix_get_socket(struct file *filp) { - unix_socket * u_sock = NULL; + struct sock *u_sock = NULL; struct inode *inode = filp->f_dentry->d_inode; /* @@ -120,7 +120,7 @@ static unix_socket *unix_get_socket(struct file *filp) void unix_inflight(struct file *fp) { - unix_socket *s=unix_get_socket(fp); + struct sock *s = unix_get_socket(fp); if(s) { atomic_inc(&unix_sk(s)->inflight); atomic_inc(&unix_tot_inflight); @@ -129,7 +129,7 @@ void unix_inflight(struct file *fp) void unix_notinflight(struct file *fp) { - unix_socket *s=unix_get_socket(fp); + struct sock *s = unix_get_socket(fp); if(s) { atomic_dec(&unix_sk(s)->inflight); atomic_dec(&unix_tot_inflight); @@ -141,9 +141,9 @@ void unix_notinflight(struct file *fp) * Garbage Collector Support Functions */ -static inline unix_socket *pop_stack(void) +static inline struct sock *pop_stack(void) { - unix_socket *p=gc_current; + struct sock *p = gc_current; gc_current = unix_sk(p)->gc_tree; return p; } @@ -153,7 +153,7 @@ static inline int empty_stack(void) return gc_current == GC_HEAD; } -static void maybe_unmark_and_push(unix_socket *x) +static void maybe_unmark_and_push(struct sock *x) { struct unix_sock *u = unix_sk(x); @@ -171,7 +171,7 @@ void unix_gc(void) { static DECLARE_MUTEX(unix_gc_sem); int i; - unix_socket *s; + struct sock *s; struct sk_buff_head hitlist; struct sk_buff *skb; @@ -231,8 +231,8 @@ void unix_gc(void) while (!empty_stack()) { - unix_socket *x = pop_stack(); - unix_socket *sk; + struct sock *x = pop_stack(); + struct sock *sk; spin_lock(&x->sk_receive_queue.lock); skb = skb_peek(&x->sk_receive_queue); |
