summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@conectiva.com.br>2003-12-29 22:41:42 -0800
committerDavid S. Miller <davem@nuts.ninka.net>2003-12-29 22:41:42 -0800
commita632875f1d94a901fe026191935c5b4337e51e1c (patch)
tree34216f2aaa3b560b452ab77faa37fd00b8bbd38a /include
parent19774a6dc654c1e197e0a8d7976067f64eff8643 (diff)
[NET]: Uninline {lock,release}_sock().
Diffstat (limited to 'include')
-rw-r--r--include/net/sock.h19
1 files changed, 2 insertions, 17 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index ac2eccb7ff9a..1d85a3e5a3cc 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -542,24 +542,9 @@ static inline struct inode *SOCK_INODE(struct socket *socket)
extern void __lock_sock(struct sock *sk);
extern void __release_sock(struct sock *sk);
#define sock_owned_by_user(sk) ((sk)->sk_lock.owner)
-#define lock_sock(__sk) \
-do { might_sleep(); \
- spin_lock_bh(&((__sk)->sk_lock.slock)); \
- if ((__sk)->sk_lock.owner) \
- __lock_sock(__sk); \
- (__sk)->sk_lock.owner = (void *)1; \
- spin_unlock_bh(&((__sk)->sk_lock.slock)); \
-} while(0)
-#define release_sock(__sk) \
-do { spin_lock_bh(&((__sk)->sk_lock.slock)); \
- if ((__sk)->sk_backlog.tail) \
- __release_sock(__sk); \
- (__sk)->sk_lock.owner = NULL; \
- if (waitqueue_active(&((__sk)->sk_lock.wq))) \
- wake_up(&((__sk)->sk_lock.wq)); \
- spin_unlock_bh(&((__sk)->sk_lock.slock)); \
-} while(0)
+extern void lock_sock(struct sock *sk);
+extern void release_sock(struct sock *sk);
/* BH context may only use the following locking interface. */
#define bh_lock_sock(__sk) spin_lock(&((__sk)->sk_lock.slock))