The real_time_data structure contains an architecture specific

substructure now (that's the only member actually). The system time
offset is therefore accessed via architecture specific accessor
functions.
Note, that this commit breaks the PPC build. Since I want to rename at
least one file I've already changed, I can't avoid that.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15835 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2006-01-04 02:17:59 +00:00
parent 3a6add495c
commit 09bb4e9ac5
13 changed files with 101 additions and 43 deletions
@@ -25,6 +25,12 @@ void arch_rtc_set_hw_time(uint32 seconds);
uint32 arch_rtc_get_hw_time(void);
// Returns number of seconds since 1/1/1970 as stored in HW
void arch_rtc_set_system_time_offset(struct real_time_data *data,
bigtime_t offset);
// Set the system time offset in data.
bigtime_t arch_rtc_get_system_time_offset(struct real_time_data *data);
// Return the system time offset as stored in data.
#ifdef __cplusplus
}
#endif
+1 -1
View File
@@ -97,7 +97,7 @@ extern "C" {
struct arch_thread;
void setup_system_time(uint32 cv_factor);
void __x86_setup_system_time(uint32 cv_factor);
void i386_context_switch(struct arch_thread *old_state, struct arch_thread *new_state, addr_t new_pgdir);
void i386_enter_uspace(addr_t entry, void *args1, void *args2, addr_t ustack_top);
void i386_set_tss_and_kstack(addr_t kstack);
@@ -0,0 +1,17 @@
/*
* Copyright 2006, Ingo Weinhold <[email protected]>.
* All rights reserved. Distributed under the terms of the MIT License.
*/
#ifndef _KERNEL_ARCH_REAL_TIME_DATA_H
#define _KERNEL_ARCH_REAL_TIME_DATA_H
#include <StorageDefs.h>
#include <SupportDefs.h>
struct arch_real_time_data {
bigtime_t system_time_offset;
uint32 system_time_conversion_factor;
};
#endif /* _KERNEL_ARCH_REAL_TIME_DATA_H */
+2 -4
View File
@@ -8,13 +8,11 @@
#include <StorageDefs.h>
#include <SupportDefs.h>
#include <arch_real_time_data.h>
// ToDo: most of this is probably arch dependent. When the PPC port comes
// to this, it should be properly separated and moved into the arch tree.
struct real_time_data {
bigtime_t system_time_offset;
uint32 system_time_conversion_factor;
struct arch_real_time_data arch_data;
};
#endif /* _KERNEL_REAL_TIME_DATA_H */
+2 -1
View File
@@ -21,7 +21,8 @@ void __init_env(const struct uspace_program_args *args);
void __init_heap(void);
void __init_time(void);
void __arch_init_time(struct real_time_data *data);
void __arch_init_time(struct real_time_data *data, bool setDefaults);
bigtime_t __arch_get_system_time_offset(struct real_time_data *data);
extern char _single_threaded;