Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pistache
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
pistache
Commits
f0d853b8
Unverified
Commit
f0d853b8
authored
Nov 29, 2020
by
Igor [hyperxor]
Committed by
GitHub
Nov 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete unused code and clang-format (#847)
parent
616ead2c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
+4
-5
include/pistache/os.h
include/pistache/os.h
+0
-1
include/pistache/reactor.h
include/pistache/reactor.h
+1
-2
src/common/os.cc
src/common/os.cc
+3
-2
No files found.
include/pistache/os.h
View file @
f0d853b8
...
...
@@ -86,7 +86,6 @@ struct Event {
explicit
Event
(
Tag
_tag
);
Flags
<
NotifyOn
>
flags
;
Fd
fd
;
Tag
tag
;
};
...
...
include/pistache/reactor.h
View file @
f0d853b8
...
...
@@ -43,7 +43,6 @@ public:
bool
isWritable
()
const
{
return
flags
.
hasFlag
(
Polling
::
NotifyOn
::
Write
);
}
bool
isHangup
()
const
{
return
flags
.
hasFlag
(
Polling
::
NotifyOn
::
Hangup
);
}
Fd
getFd
()
const
{
return
this
->
fd
;
}
Polling
::
Tag
getTag
()
const
{
return
this
->
tag
;
}
};
...
...
@@ -120,7 +119,7 @@ public:
void
modifyFd
(
const
Key
&
key
,
Fd
fd
,
Polling
::
NotifyOn
interest
,
Polling
::
Tag
tag
,
Polling
::
Mode
mode
=
Polling
::
Mode
::
Level
);
void
removeFd
(
const
Key
&
key
,
Fd
fd
);
void
removeFd
(
const
Key
&
key
,
Fd
fd
);
void
runOnce
();
void
run
();
...
...
src/common/os.cc
View file @
f0d853b8
...
...
@@ -118,7 +118,7 @@ cpu_set_t CpuSet::toPosix() const {
namespace
Polling
{
Event
::
Event
(
Tag
_tag
)
:
flags
(),
fd
(
-
1
),
tag
(
_tag
)
{}
Event
::
Event
(
Tag
_tag
)
:
flags
(),
tag
(
_tag
)
{}
Epoll
::
Epoll
()
:
epoll_fd
([
&
]()
{
return
TRY_RET
(
epoll_create
(
Const
::
MaxEvents
));
}())
{}
...
...
@@ -171,7 +171,8 @@ int Epoll::poll(std::vector<Event> &events,
int
ready_fds
=
-
1
;
do
{
ready_fds
=
::
epoll_wait
(
epoll_fd
,
evs
,
Const
::
MaxEvents
,
static_cast
<
int
>
(
timeout
.
count
()));
ready_fds
=
::
epoll_wait
(
epoll_fd
,
evs
,
Const
::
MaxEvents
,
static_cast
<
int
>
(
timeout
.
count
()));
}
while
(
ready_fds
<
0
&&
errno
==
EINTR
);
for
(
int
i
=
0
;
i
<
ready_fds
;
++
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