0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-29 20:28:52 +02:00

ircd::ios: Always inline main thread assertions.

This commit is contained in:
Jason Volk 2019-05-13 23:42:56 -07:00
parent 06396f4787
commit c68fc52672

View file

@ -259,18 +259,21 @@ ircd::ios::name(const descriptor &descriptor)
}
inline void
__attribute__((always_inline))
ircd::ios::assert_main_thread()
{
assert(is_main_thread());
}
inline bool
__attribute__((always_inline))
ircd::ios::is_main_thread()
{
return std::this_thread::get_id() == main_thread_id;
}
inline bool
__attribute__((always_inline))
ircd::ios::is_static_thread()
{
return std::this_thread::get_id() == static_thread_id;