Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
e180d34f
Commit
e180d34f
authored
Mar 31, 2004
by
Stephen Hemminger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Mark lock_sock and release_sock as FASTCALL.
parent
96531b37
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
include/net/sock.h
include/net/sock.h
+2
-2
net/core/sock.c
net/core/sock.c
+2
-2
No files found.
include/net/sock.h
View file @
e180d34f
...
@@ -561,8 +561,8 @@ extern void __lock_sock(struct sock *sk);
...
@@ -561,8 +561,8 @@ extern void __lock_sock(struct sock *sk);
extern
void
__release_sock
(
struct
sock
*
sk
);
extern
void
__release_sock
(
struct
sock
*
sk
);
#define sock_owned_by_user(sk) ((sk)->sk_lock.owner)
#define sock_owned_by_user(sk) ((sk)->sk_lock.owner)
extern
void
lock_sock
(
struct
sock
*
sk
);
extern
void
FASTCALL
(
lock_sock
(
struct
sock
*
sk
)
);
extern
void
release_sock
(
struct
sock
*
sk
);
extern
void
FASTCALL
(
release_sock
(
struct
sock
*
sk
)
);
/* BH context may only use the following locking interface. */
/* BH context may only use the following locking interface. */
#define bh_lock_sock(__sk) spin_lock(&((__sk)->sk_lock.slock))
#define bh_lock_sock(__sk) spin_lock(&((__sk)->sk_lock.slock))
...
...
net/core/sock.c
View file @
e180d34f
...
@@ -1138,7 +1138,7 @@ void sock_init_data(struct socket *sock, struct sock *sk)
...
@@ -1138,7 +1138,7 @@ void sock_init_data(struct socket *sock, struct sock *sk)
atomic_set
(
&
sk
->
sk_refcnt
,
1
);
atomic_set
(
&
sk
->
sk_refcnt
,
1
);
}
}
void
lock_sock
(
struct
sock
*
sk
)
void
fastcall
lock_sock
(
struct
sock
*
sk
)
{
{
might_sleep
();
might_sleep
();
spin_lock_bh
(
&
(
sk
->
sk_lock
.
slock
));
spin_lock_bh
(
&
(
sk
->
sk_lock
.
slock
));
...
@@ -1150,7 +1150,7 @@ void lock_sock(struct sock *sk)
...
@@ -1150,7 +1150,7 @@ void lock_sock(struct sock *sk)
EXPORT_SYMBOL
(
lock_sock
);
EXPORT_SYMBOL
(
lock_sock
);
void
release_sock
(
struct
sock
*
sk
)
void
fastcall
release_sock
(
struct
sock
*
sk
)
{
{
spin_lock_bh
(
&
(
sk
->
sk_lock
.
slock
));
spin_lock_bh
(
&
(
sk
->
sk_lock
.
slock
));
if
(
sk
->
sk_backlog
.
tail
)
if
(
sk
->
sk_backlog
.
tail
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment