ARM/libroot: stub out the missing functions for now
This will get libroot.so to build, which should give us much more compilation coverage for ARM now too. Will have to go through all the libroot code with a tooth comb anyway once userland comes up... (Will consider replacing the glibc mess with bsd for all non gcc2 platforms)
This commit is contained in:
@@ -9,6 +9,7 @@ MergeObject os_arch_$(TARGET_ARCH).o :
|
||||
atomic.S
|
||||
byteorder.S
|
||||
system_time.c
|
||||
stack_frame.c
|
||||
thread.c
|
||||
time.c
|
||||
tls.c
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright 2012, Haiku, Inc.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* François Revol <[email protected]>
|
||||
*/
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
#include <libroot_private.h>
|
||||
|
||||
|
||||
void*
|
||||
get_stack_frame(void)
|
||||
{
|
||||
// TODO: Implement!
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
void*
|
||||
__arch_get_caller(void)
|
||||
{
|
||||
// TODO: Implement!
|
||||
return NULL;
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
* Copyright 2006, Ingo Weinhold <[email protected]>.
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
* Copyright 2012, Haiku, Inc.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* François Revol <[email protected]>
|
||||
*/
|
||||
|
||||
#include <OS.h>
|
||||
@@ -9,10 +12,29 @@
|
||||
#include <libroot_private.h>
|
||||
#include <real_time_data.h>
|
||||
|
||||
static vint32 *sConversionFactor;
|
||||
|
||||
void
|
||||
__arm_setup_system_time(vint32 *cvFactor)
|
||||
{
|
||||
sConversionFactor = cvFactor;
|
||||
}
|
||||
|
||||
|
||||
//XXX: this is a hack
|
||||
// remove me when platform code works
|
||||
static int64
|
||||
__arm_get_time_base(void)
|
||||
{
|
||||
static uint64 time_dilation_field = 0;
|
||||
return time_dilation_field++;
|
||||
}
|
||||
|
||||
bigtime_t
|
||||
system_time(void)
|
||||
{
|
||||
#warning ARM:WRITEME
|
||||
return 0;
|
||||
uint64 timeBase = __arm_get_time_base();
|
||||
|
||||
uint32 cv = *sConversionFactor;
|
||||
return (timeBase >> 32) * cv + (((timeBase & 0xffffffff) * cv) >> 32);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user