mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 16:22:35 +01:00
ircd::ctx: Condition rdtsc linkage based on x86intrin availability.
This commit is contained in:
parent
28115730de
commit
46690f433c
1 changed files with 13 additions and 0 deletions
13
ircd/ctx.cc
13
ircd/ctx.cc
|
@ -1369,11 +1369,24 @@ ircd::ctx::prof::check_stack()
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_X86INTRIN_H
|
||||
ulong
|
||||
ircd::ctx::prof::rdtsc()
|
||||
{
|
||||
return __rdtsc();
|
||||
}
|
||||
#else
|
||||
ulong
|
||||
ircd::ctx::prof::rdtsc()
|
||||
{
|
||||
static_assert
|
||||
(
|
||||
0, "TODO: Implement fallback here"
|
||||
);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue