Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bcc
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
Kirill Smelkov
bcc
Commits
f701b520
Commit
f701b520
authored
Oct 21, 2015
by
Brenden Blanco
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #277 from SomaLDEN/drzix
perf_reader: allow more than one reader to poll
parents
7e2a0daa
a411093d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
src/cc/perf_reader.c
src/cc/perf_reader.c
+8
-4
No files found.
src/cc/perf_reader.c
View file @
f701b520
...
...
@@ -206,11 +206,15 @@ static void event_read(struct perf_reader *reader) {
}
int
perf_reader_poll
(
int
num_readers
,
struct
perf_reader
**
readers
,
int
timeout
)
{
struct
pollfd
pfds
[]
=
{
{
readers
[
0
]
->
fd
,
POLLIN
},
};
struct
pollfd
pfds
[
num_readers
];
int
i
;
for
(
i
=
0
;
i
<
num_readers
;
++
i
)
{
pfds
[
i
].
fd
=
readers
[
i
]
->
fd
;
pfds
[
i
].
events
=
POLLIN
;
}
if
(
poll
(
pfds
,
num_readers
,
timeout
)
>
0
)
{
int
i
;
for
(
i
=
0
;
i
<
num_readers
;
++
i
)
{
if
(
pfds
[
i
].
revents
&
POLLIN
)
event_read
(
readers
[
i
]);
...
...
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