0
0
Fork 0
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:
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 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;