mirror of
https://github.com/matrix-construct/construct
synced 2024-11-17 15:30:52 +01:00
ircd::ios: Always inline main thread assertions.
This commit is contained in:
parent
06396f4787
commit
c68fc52672
1 changed files with 3 additions and 0 deletions
|
@ -259,18 +259,21 @@ ircd::ios::name(const descriptor &descriptor)
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
|
__attribute__((always_inline))
|
||||||
ircd::ios::assert_main_thread()
|
ircd::ios::assert_main_thread()
|
||||||
{
|
{
|
||||||
assert(is_main_thread());
|
assert(is_main_thread());
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool
|
inline bool
|
||||||
|
__attribute__((always_inline))
|
||||||
ircd::ios::is_main_thread()
|
ircd::ios::is_main_thread()
|
||||||
{
|
{
|
||||||
return std::this_thread::get_id() == main_thread_id;
|
return std::this_thread::get_id() == main_thread_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool
|
inline bool
|
||||||
|
__attribute__((always_inline))
|
||||||
ircd::ios::is_static_thread()
|
ircd::ios::is_static_thread()
|
||||||
{
|
{
|
||||||
return std::this_thread::get_id() == static_thread_id;
|
return std::this_thread::get_id() == static_thread_id;
|
||||||
|
|
Loading…
Reference in a new issue