diff options
author | Adrian Bunk <bunk@stusta.de> | 2007-07-30 21:05:45 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-31 05:28:27 -0400 |
commit | 131116989b5c349f9b1ab9ee083d37cc73160ac8 (patch) | |
tree | 6b381fc02ec93bd5f02da685124a6ca45c77cd46 /include/net/af_unix.h | |
parent | 1a3a206f7f2aa50545cc3d056405ad7bc3c9bca8 (diff) |
[AF_UNIX]: Make code static.
The following code can now become static:
- struct unix_socket_table
- unix_table_lock
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/af_unix.h')
-rw-r--r-- | include/net/af_unix.h | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/include/net/af_unix.h b/include/net/af_unix.h index 6de1e9e35c73..0864a775de24 100644 --- a/include/net/af_unix.h +++ b/include/net/af_unix.h | |||
@@ -12,37 +12,8 @@ extern void unix_gc(void); | |||
12 | 12 | ||
13 | #define UNIX_HASH_SIZE 256 | 13 | #define UNIX_HASH_SIZE 256 |
14 | 14 | ||
15 | extern struct hlist_head unix_socket_table[UNIX_HASH_SIZE + 1]; | ||
16 | extern spinlock_t unix_table_lock; | ||
17 | |||
18 | extern atomic_t unix_tot_inflight; | 15 | extern atomic_t unix_tot_inflight; |
19 | 16 | ||
20 | static inline struct sock *first_unix_socket(int *i) | ||
21 | { | ||
22 | for (*i = 0; *i <= UNIX_HASH_SIZE; (*i)++) { | ||
23 | if (!hlist_empty(&unix_socket_table[*i])) | ||
24 | return __sk_head(&unix_socket_table[*i]); | ||
25 | } | ||
26 | return NULL; | ||
27 | } | ||
28 | |||
29 | static inline struct sock *next_unix_socket(int *i, struct sock *s) | ||
30 | { | ||
31 | struct sock *next = sk_next(s); | ||
32 | /* More in this chain? */ | ||
33 | if (next) | ||
34 | return next; | ||
35 | /* Look for next non-empty chain. */ | ||
36 | for ((*i)++; *i <= UNIX_HASH_SIZE; (*i)++) { | ||
37 | if (!hlist_empty(&unix_socket_table[*i])) | ||
38 | return __sk_head(&unix_socket_table[*i]); | ||
39 | } | ||
40 | return NULL; | ||
41 | } | ||
42 | |||
43 | #define forall_unix_sockets(i, s) \ | ||
44 | for (s = first_unix_socket(&(i)); s; s = next_unix_socket(&(i),(s))) | ||
45 | |||
46 | struct unix_address { | 17 | struct unix_address { |
47 | atomic_t refcnt; | 18 | atomic_t refcnt; |
48 | int len; | 19 | int len; |