mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-15 17:05:45 +08:00
Moved rtems-bsd-cyclecount.c to cpu.h
This commit is contained in:
1
Makefile
1
Makefile
@@ -56,7 +56,6 @@ C_FILES += rtemsbsd/src/rtems-bsd-timesupport.c
|
|||||||
C_FILES += rtemsbsd/src/rtems-bsd-newproc.c
|
C_FILES += rtemsbsd/src/rtems-bsd-newproc.c
|
||||||
C_FILES += rtemsbsd/src/rtems-bsd-vm_glue.c
|
C_FILES += rtemsbsd/src/rtems-bsd-vm_glue.c
|
||||||
C_FILES += rtemsbsd/src/rtems-bsd-subr.c
|
C_FILES += rtemsbsd/src/rtems-bsd-subr.c
|
||||||
C_FILES += rtemsbsd/src/rtems-bsd-cyclecount.c
|
|
||||||
C_FILES += freebsd/kern/subr_eventhandler.c
|
C_FILES += freebsd/kern/subr_eventhandler.c
|
||||||
C_FILES += freebsd/kern/kern_subr.c
|
C_FILES += freebsd/kern/kern_subr.c
|
||||||
C_FILES += freebsd/kern/kern_tc.c
|
C_FILES += freebsd/kern/kern_tc.c
|
||||||
|
@@ -497,6 +497,7 @@ rtems.addRTEMSHeaderFiles(
|
|||||||
'rtems/machine/_stdint.h',
|
'rtems/machine/_stdint.h',
|
||||||
'rtems/machine/_types.h',
|
'rtems/machine/_types.h',
|
||||||
'rtems/machine/ucontext.h',
|
'rtems/machine/ucontext.h',
|
||||||
|
'rtems/machine/cpu.h',
|
||||||
'rtems/machine/rtems-bsd-symbols.h',
|
'rtems/machine/rtems-bsd-symbols.h',
|
||||||
'rtems/machine/rtems-bsd-cache.h',
|
'rtems/machine/rtems-bsd-cache.h',
|
||||||
'rtems/machine/rtems-bsd-sysinit.h',
|
'rtems/machine/rtems-bsd-sysinit.h',
|
||||||
@@ -550,7 +551,6 @@ rtems.addRTEMSSourceFiles(
|
|||||||
'src/rtems-bsd-newproc.c',
|
'src/rtems-bsd-newproc.c',
|
||||||
'src/rtems-bsd-vm_glue.c',
|
'src/rtems-bsd-vm_glue.c',
|
||||||
'src/rtems-bsd-subr.c',
|
'src/rtems-bsd-subr.c',
|
||||||
'src/rtems-bsd-cyclecount.c',
|
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
rtems.addEmptyHeaderFiles(
|
rtems.addEmptyHeaderFiles(
|
||||||
@@ -558,7 +558,6 @@ rtems.addEmptyHeaderFiles(
|
|||||||
'cam/cam_queue.h',
|
'cam/cam_queue.h',
|
||||||
'ddb/db_sym.h',
|
'ddb/db_sym.h',
|
||||||
'ddb/ddb.h',
|
'ddb/ddb.h',
|
||||||
'machine/cpu.h',
|
|
||||||
'machine/elf.h',
|
'machine/elf.h',
|
||||||
'machine/sf_buf.h',
|
'machine/sf_buf.h',
|
||||||
'machine/smp.h',
|
'machine/smp.h',
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
/* EMPTY */
|
|
@@ -15,15 +15,20 @@
|
|||||||
* http://www.rtems.com/license/LICENSE.
|
* http://www.rtems.com/license/LICENSE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef _MACHINE_CPU_H_
|
||||||
|
#define _MACHINE_CPU_H_
|
||||||
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <rtems.h>
|
#include <rtems.h>
|
||||||
|
|
||||||
u_int64_t
|
#ifdef _KERNEL
|
||||||
|
static __inline u_int64_t
|
||||||
get_cyclecount(void)
|
get_cyclecount(void)
|
||||||
{
|
{
|
||||||
u_int64_t value;
|
return rtems_clock_get_ticks_since_boot();
|
||||||
value = rtems_clock_get_ticks_since_boot();
|
|
||||||
return value;
|
|
||||||
}
|
}
|
||||||
|
#endif /* _KERNEL */
|
||||||
|
|
||||||
|
#endif /* !MACHINE_CPU_H */
|
Reference in New Issue
Block a user