diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /net/rxrpc/internal.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'net/rxrpc/internal.h')
-rw-r--r-- | net/rxrpc/internal.h | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/net/rxrpc/internal.h b/net/rxrpc/internal.h new file mode 100644 index 000000000000..70e52f6b0b64 --- /dev/null +++ b/net/rxrpc/internal.h | |||
@@ -0,0 +1,106 @@ | |||
1 | /* internal.h: internal Rx RPC stuff | ||
2 | * | ||
3 | * Copyright (c) 2002 David Howells (dhowells@redhat.com). | ||
4 | */ | ||
5 | |||
6 | #ifndef RXRPC_INTERNAL_H | ||
7 | #define RXRPC_INTERNAL_H | ||
8 | |||
9 | #include <linux/compiler.h> | ||
10 | #include <linux/kernel.h> | ||
11 | |||
12 | /* | ||
13 | * debug accounting | ||
14 | */ | ||
15 | #if 1 | ||
16 | #define __RXACCT_DECL(X) X | ||
17 | #define __RXACCT(X) do { X; } while(0) | ||
18 | #else | ||
19 | #define __RXACCT_DECL(X) | ||
20 | #define __RXACCT(X) do { } while(0) | ||
21 | #endif | ||
22 | |||
23 | __RXACCT_DECL(extern atomic_t rxrpc_transport_count); | ||
24 | __RXACCT_DECL(extern atomic_t rxrpc_peer_count); | ||
25 | __RXACCT_DECL(extern atomic_t rxrpc_connection_count); | ||
26 | __RXACCT_DECL(extern atomic_t rxrpc_call_count); | ||
27 | __RXACCT_DECL(extern atomic_t rxrpc_message_count); | ||
28 | |||
29 | /* | ||
30 | * debug tracing | ||
31 | */ | ||
32 | #define kenter(FMT, a...) printk("==> %s("FMT")\n",__FUNCTION__ , ##a) | ||
33 | #define kleave(FMT, a...) printk("<== %s()"FMT"\n",__FUNCTION__ , ##a) | ||
34 | #define kdebug(FMT, a...) printk(" "FMT"\n" , ##a) | ||
35 | #define kproto(FMT, a...) printk("### "FMT"\n" , ##a) | ||
36 | #define knet(FMT, a...) printk(" "FMT"\n" , ##a) | ||
37 | |||
38 | #if 0 | ||
39 | #define _enter(FMT, a...) kenter(FMT , ##a) | ||
40 | #define _leave(FMT, a...) kleave(FMT , ##a) | ||
41 | #define _debug(FMT, a...) kdebug(FMT , ##a) | ||
42 | #define _proto(FMT, a...) kproto(FMT , ##a) | ||
43 | #define _net(FMT, a...) knet(FMT , ##a) | ||
44 | #else | ||
45 | #define _enter(FMT, a...) do { if (rxrpc_ktrace) kenter(FMT , ##a); } while(0) | ||
46 | #define _leave(FMT, a...) do { if (rxrpc_ktrace) kleave(FMT , ##a); } while(0) | ||
47 | #define _debug(FMT, a...) do { if (rxrpc_kdebug) kdebug(FMT , ##a); } while(0) | ||
48 | #define _proto(FMT, a...) do { if (rxrpc_kproto) kproto(FMT , ##a); } while(0) | ||
49 | #define _net(FMT, a...) do { if (rxrpc_knet) knet (FMT , ##a); } while(0) | ||
50 | #endif | ||
51 | |||
52 | static inline void rxrpc_discard_my_signals(void) | ||
53 | { | ||
54 | while (signal_pending(current)) { | ||
55 | siginfo_t sinfo; | ||
56 | |||
57 | spin_lock_irq(¤t->sighand->siglock); | ||
58 | dequeue_signal(current, ¤t->blocked, &sinfo); | ||
59 | spin_unlock_irq(¤t->sighand->siglock); | ||
60 | } | ||
61 | } | ||
62 | |||
63 | /* | ||
64 | * call.c | ||
65 | */ | ||
66 | extern struct list_head rxrpc_calls; | ||
67 | extern struct rw_semaphore rxrpc_calls_sem; | ||
68 | |||
69 | /* | ||
70 | * connection.c | ||
71 | */ | ||
72 | extern struct list_head rxrpc_conns; | ||
73 | extern struct rw_semaphore rxrpc_conns_sem; | ||
74 | extern unsigned long rxrpc_conn_timeout; | ||
75 | |||
76 | extern void rxrpc_conn_clearall(struct rxrpc_peer *peer); | ||
77 | |||
78 | /* | ||
79 | * peer.c | ||
80 | */ | ||
81 | extern struct list_head rxrpc_peers; | ||
82 | extern struct rw_semaphore rxrpc_peers_sem; | ||
83 | extern unsigned long rxrpc_peer_timeout; | ||
84 | |||
85 | extern void rxrpc_peer_calculate_rtt(struct rxrpc_peer *peer, | ||
86 | struct rxrpc_message *msg, | ||
87 | struct rxrpc_message *resp); | ||
88 | |||
89 | extern void rxrpc_peer_clearall(struct rxrpc_transport *trans); | ||
90 | |||
91 | |||
92 | /* | ||
93 | * proc.c | ||
94 | */ | ||
95 | #ifdef CONFIG_PROC_FS | ||
96 | extern int rxrpc_proc_init(void); | ||
97 | extern void rxrpc_proc_cleanup(void); | ||
98 | #endif | ||
99 | |||
100 | /* | ||
101 | * transport.c | ||
102 | */ | ||
103 | extern struct list_head rxrpc_proc_transports; | ||
104 | extern struct rw_semaphore rxrpc_proc_transports_sem; | ||
105 | |||
106 | #endif /* RXRPC_INTERNAL_H */ | ||