Moved definition of the PAUSE macro to <cpu.h>, respectively
<arch/cpu.h>. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28221 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -17,6 +17,10 @@
|
|||||||
#endif // !_ASSEMBLER
|
#endif // !_ASSEMBLER
|
||||||
|
|
||||||
|
|
||||||
|
#undef PAUSE
|
||||||
|
#define PAUSE() asm volatile ("pause;")
|
||||||
|
|
||||||
|
|
||||||
// MSR registers (possibly Intel specific)
|
// MSR registers (possibly Intel specific)
|
||||||
#define IA32_MSR_APIC_BASE 0x1b
|
#define IA32_MSR_APIC_BASE 0x1b
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,12 @@
|
|||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
|
|
||||||
|
|
||||||
|
// define PAUSE, if not done in arch/cpu.h
|
||||||
|
#ifndef PAUSE
|
||||||
|
# define PAUSE()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* CPU local data structure */
|
/* CPU local data structure */
|
||||||
|
|
||||||
typedef struct cpu_ent {
|
typedef struct cpu_ent {
|
||||||
@@ -30,7 +36,7 @@ typedef struct cpu_ent {
|
|||||||
bigtime_t last_user_time;
|
bigtime_t last_user_time;
|
||||||
|
|
||||||
bool disabled;
|
bool disabled;
|
||||||
|
|
||||||
// arch-specific stuff
|
// arch-specific stuff
|
||||||
arch_cpu_info arch;
|
arch_cpu_info arch;
|
||||||
} cpu_ent __attribute__((aligned(64)));
|
} cpu_ent __attribute__((aligned(64)));
|
||||||
|
|||||||
@@ -33,12 +33,6 @@
|
|||||||
# define TRACE(x) ;
|
# define TRACE(x) ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __INTEL__
|
|
||||||
# define PAUSE() asm volatile ("pause;")
|
|
||||||
#else
|
|
||||||
# define PAUSE()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MSG_POOL_SIZE (SMP_MAX_CPUS * 4)
|
#define MSG_POOL_SIZE (SMP_MAX_CPUS * 4)
|
||||||
|
|
||||||
struct smp_msg {
|
struct smp_msg {
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
#include <arch/timer.h>
|
#include <arch/timer.h>
|
||||||
#include <boot/kernel_args.h>
|
#include <boot/kernel_args.h>
|
||||||
|
#include <cpu.h>
|
||||||
#include <smp.h>
|
#include <smp.h>
|
||||||
#include <thread.h>
|
#include <thread.h>
|
||||||
#include <util/AutoLock.h>
|
#include <util/AutoLock.h>
|
||||||
@@ -36,12 +37,6 @@ static per_cpu_timer_data sPerCPU[B_MAX_CPU_COUNT];
|
|||||||
# define TRACE(x) ;
|
# define TRACE(x) ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __INTEL__
|
|
||||||
# define PAUSE() asm volatile ("pause;")
|
|
||||||
#else
|
|
||||||
# define PAUSE()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
timer_init(kernel_args *args)
|
timer_init(kernel_args *args)
|
||||||
@@ -168,7 +163,7 @@ add_timer(timer *event, timer_hook hook, bigtime_t period, int32 flags)
|
|||||||
bigtime_t scheduleTime;
|
bigtime_t scheduleTime;
|
||||||
bigtime_t currentTime = system_time();
|
bigtime_t currentTime = system_time();
|
||||||
cpu_status state;
|
cpu_status state;
|
||||||
|
|
||||||
if (event == NULL || hook == NULL || period < 0)
|
if (event == NULL || hook == NULL || period < 0)
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user