X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fnet%2Faf_unix.h;h=a1c805d7f488b7295a335c33de66f495cd5d0e37;hb=c0ef877b2c9f543e9fb7953bfe1a0cd3a4eae362;hp=6de1e9e35c73e6dfe97cb44538878bf639d8e4f7;hpb=22aadf8a07067644e101267ed5003043f2ad05bf;p=linux-2.6 diff --git a/include/net/af_unix.h b/include/net/af_unix.h index 6de1e9e35c..a1c805d7f4 100644 --- a/include/net/af_unix.h +++ b/include/net/af_unix.h @@ -12,36 +12,7 @@ extern void unix_gc(void); #define UNIX_HASH_SIZE 256 -extern struct hlist_head unix_socket_table[UNIX_HASH_SIZE + 1]; -extern spinlock_t unix_table_lock; - -extern atomic_t unix_tot_inflight; - -static inline struct sock *first_unix_socket(int *i) -{ - for (*i = 0; *i <= UNIX_HASH_SIZE; (*i)++) { - if (!hlist_empty(&unix_socket_table[*i])) - return __sk_head(&unix_socket_table[*i]); - } - return NULL; -} - -static inline struct sock *next_unix_socket(int *i, struct sock *s) -{ - struct sock *next = sk_next(s); - /* More in this chain? */ - if (next) - return next; - /* Look for next non-empty chain. */ - for ((*i)++; *i <= UNIX_HASH_SIZE; (*i)++) { - if (!hlist_empty(&unix_socket_table[*i])) - return __sk_head(&unix_socket_table[*i]); - } - return NULL; -} - -#define forall_unix_sockets(i, s) \ - for (s = first_unix_socket(&(i)); s; s = next_unix_socket(&(i),(s))) +extern unsigned int unix_tot_inflight; struct unix_address { atomic_t refcnt;