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
cb88dfbe
Commit
cb88dfbe
authored
Feb 10, 2003
by
Rusty Russell
Committed by
David S. Miller
Feb 10, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AF_UNIX] Cleanup forall_unix_sockets.
parent
71d09b5c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
2 deletions
+23
-2
include/net/af_unix.h
include/net/af_unix.h
+23
-2
No files found.
include/net/af_unix.h
View file @
cb88dfbe
...
@@ -13,9 +13,30 @@ extern rwlock_t unix_table_lock;
...
@@ -13,9 +13,30 @@ extern rwlock_t unix_table_lock;
extern
atomic_t
unix_tot_inflight
;
extern
atomic_t
unix_tot_inflight
;
static
inline
unix_socket
*
first_unix_socket
(
int
*
i
)
{
for
(
*
i
=
0
;
*
i
<=
UNIX_HASH_SIZE
;
(
*
i
)
++
)
{
if
(
unix_socket_table
[
*
i
])
return
unix_socket_table
[
*
i
];
}
return
NULL
;
}
static
inline
unix_socket
*
next_unix_socket
(
int
*
i
,
unix_socket
*
s
)
{
/* More in this chain? */
if
(
s
->
next
)
return
s
->
next
;
/* Look for next non-empty chain. */
for
((
*
i
)
++
;
*
i
<=
UNIX_HASH_SIZE
;
(
*
i
)
++
)
{
if
(
unix_socket_table
[
*
i
])
return
unix_socket_table
[
*
i
];
}
return
NULL
;
}
#define forall_unix_sockets(i, s)
for (i=0; i<=UNIX_HASH_SIZE; i++)
\
#define forall_unix_sockets(i, s) \
for (s=unix_socket_table[i]; s; s=s->next
)
for (s = first_unix_socket(&(i)); s; s = next_unix_socket(&(i),(s))
)
struct
unix_address
struct
unix_address
{
{
...
...
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