mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-05-14 05:09:34 +08:00
Added get_cyclecount() method.
This commit is contained in:
parent
8f6d1299d7
commit
d9e838b882
3
Makefile
3
Makefile
@ -395,7 +395,8 @@ C_FILES += \
|
||||
rtemsbsd/src/rtems-bsd-timesupport.c \
|
||||
rtemsbsd/src/rtems-bsd-timeout.c \
|
||||
rtemsbsd/src/rtems-bsd-newproc.c \
|
||||
rtemsbsd/src/rtems-bsd-vm_glue.c
|
||||
rtemsbsd/src/rtems-bsd-vm_glue.c \
|
||||
rtemsbsd/src/rtems-bsd-cyclecount.c
|
||||
|
||||
ifeq ($(RTEMS_CPU),arm)
|
||||
C_FILES += \
|
||||
|
@ -535,6 +535,7 @@ rtems_sourceFiles = [
|
||||
'src/rtems-bsd-timeout.c',
|
||||
'src/rtems-bsd-newproc.c',
|
||||
'src/rtems-bsd-vm_glue.c',
|
||||
'src/rtems-bsd-cyclecount.c',
|
||||
]
|
||||
# RTEMS files handled separately from modules
|
||||
# rtems = Module('rtems')
|
||||
|
29
rtemsbsd/src/rtems-bsd-cyclecount.c
Normal file
29
rtemsbsd/src/rtems-bsd-cyclecount.c
Normal file
@ -0,0 +1,29 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @ingroup rtems_bsd_rtems
|
||||
*
|
||||
* @brief TODO.
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <rtems.h>
|
||||
|
||||
u_int64_t
|
||||
get_cyclecount(void)
|
||||
{
|
||||
u_int64_t value;
|
||||
value = rtems_clock_get_ticks_since_boot();
|
||||
return value;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user