Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
2a30acd9
Commit
2a30acd9
authored
Feb 04, 2021
by
Max Kellermann
Committed by
Max Kellermann
Feb 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
event/Loop: use [[gnu::pure]]
parent
a8e70f18
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
7 deletions
+5
-7
EpollBackend.hxx
src/event/EpollBackend.hxx
+0
-1
Loop.hxx
src/event/Loop.hxx
+3
-4
ServerSocket.cxx
src/event/ServerSocket.cxx
+2
-2
No files found.
src/event/EpollBackend.hxx
View file @
2a30acd9
...
...
@@ -20,7 +20,6 @@
#ifndef EVENT_EPOLL_BACKEND_HXX
#define EVENT_EPOLL_BACKEND_HXX
#include "util/Compiler.h"
#include "system/EpollFD.hxx"
#include <array>
...
...
src/event/Loop.hxx
View file @
2a30acd9
...
...
@@ -25,7 +25,6 @@
#include "SocketEvent.hxx"
#include "event/Features.h"
#include "time/ClockCache.hxx"
#include "util/Compiler.h"
#include "util/IntrusiveList.hxx"
#ifdef HAVE_THREADED_EVENT_LOOP
...
...
@@ -183,7 +182,7 @@ public:
* iteration, because it is assumed that the event loop runs
* for a negligible duration.
*/
gcc_pure
[[
gnu
::
pure
]]
const
auto
&
SteadyNow
()
const
noexcept
{
#ifdef HAVE_THREADED_EVENT_LOOP
assert
(
IsInside
());
...
...
@@ -193,7 +192,7 @@ public:
}
#ifdef HAVE_URING
gcc_pure
[[
gnu
::
pure
]]
Uring
::
Queue
*
GetUring
()
noexcept
;
#endif
...
...
@@ -298,7 +297,7 @@ public:
/**
* Are we currently running inside this EventLoop's thread?
*/
gcc_pure
[[
gnu
::
pure
]]
bool
IsInside
()
const
noexcept
{
#ifdef HAVE_THREADED_EVENT_LOOP
return
thread
.
IsInside
();
...
...
src/event/ServerSocket.cxx
View file @
2a30acd9
...
...
@@ -100,7 +100,7 @@ public:
event
.
Close
();
}
[[
nodiscard
]]
gcc_pure
[[
nodiscard
]]
[[
gnu
::
pure
]]
std
::
string
ToString
()
const
noexcept
{
return
::
ToString
(
address
);
}
...
...
@@ -328,7 +328,7 @@ ServerSocket::AddPortIPv6(unsigned port) noexcept
/**
* Is IPv6 supported by the kernel?
*/
gcc_pure
[[
gnu
::
pure
]]
static
bool
SupportsIPv6
()
noexcept
{
...
...
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