cosmetic changes

This commit is contained in:
Stefan Lankes 2011-07-19 09:58:40 +02:00
parent a422926dda
commit 8e9accd6ed
2 changed files with 2 additions and 10 deletions

View file

@ -99,14 +99,6 @@ struct state {
unsigned int ss;
};
/** @brief Read out APIC CPU ID
* @return The APIC CPU ID
*/
uint32_t apic_cpu_id(void);
/// Convenience-define constant
#define LOGICAL_CPUID apic_cpu_id()
#ifdef __cplusplus
}
#endif

View file

@ -37,13 +37,13 @@ typedef unsigned int tid_t;
#define DEFINE_PER_CORE(type, name, def_value) type name = def_value;
#define CORE_ID 0
#else
#define per_core(name) name[LOGICAL_CPUID].var
#define per_core(name) name[smp_id()].var
#define DECLARE_PER_CORE(type, name) \
typedef struct { type var __attribute__ ((aligned (CACHE_LINE))); } aligned_##name;\
extern aligned_##name name[MAX_CORES];
#define DEFINE_PER_CORE(type, name, def_value) \
aligned_##name name[MAX_CORES] = {[0 ... MAX_CORES-1] = {def_value}};
#define CORE_ID LOGICAL_CPUID
#define CORE_ID smp_id()
#endif
/* needed to find the task, which is currently running on this core */