mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 04:30:28 +00:00
main: Enable rdtsc support on NetBSD
Enable the Linux rdtsc implementation on NetBSD as well. The assembly works correctly there. ASTERISK-29851 Change-Id: I460ad9b4d971913420ecb84186f5ba5ab03f6f37
This commit is contained in:
committed by
Kevin Harwell
parent
90d02cf0a3
commit
d68d90c5be
@@ -810,10 +810,10 @@ int64_t ast_profile(int i, int64_t delta)
|
|||||||
/* The RDTSC instruction was introduced on the Pentium processor and is not
|
/* The RDTSC instruction was introduced on the Pentium processor and is not
|
||||||
* implemented on certain clones, like the Cyrix 586. Hence, the previous
|
* implemented on certain clones, like the Cyrix 586. Hence, the previous
|
||||||
* expectation of __i386__ was in error. */
|
* expectation of __i386__ was in error. */
|
||||||
#if defined ( __i686__) && (defined(__FreeBSD__) || defined(linux))
|
#if defined ( __i686__) && (defined(__FreeBSD__) || defined(__NetBSD__) || defined(linux))
|
||||||
#if defined(__FreeBSD__)
|
#if defined(__FreeBSD__)
|
||||||
#include <machine/cpufunc.h>
|
#include <machine/cpufunc.h>
|
||||||
#elif defined(linux)
|
#elif defined(__NetBSD__) || defined(linux)
|
||||||
static __inline uint64_t
|
static __inline uint64_t
|
||||||
rdtsc(void)
|
rdtsc(void)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user