| 1 | /* $Id: kCpu.h 3598 2007-10-04 18:46:12Z bird $ */ | 
|---|
| 2 | /** @file | 
|---|
| 3 | * kCpu - The CPU and Architecture API. | 
|---|
| 4 | */ | 
|---|
| 5 |  | 
|---|
| 6 | /* | 
|---|
| 7 | * Copyright (c) 2007 knut st. osmundsen <bird-src-spam@anduin.net> | 
|---|
| 8 | * | 
|---|
| 9 | * This file is part of kStuff. | 
|---|
| 10 | * | 
|---|
| 11 | * kStuff is free software; you can redistribute it and/or | 
|---|
| 12 | * modify it under the terms of the GNU Lesser General Public | 
|---|
| 13 | * License as published by the Free Software Foundation; either | 
|---|
| 14 | * version 2.1 of the License, or (at your option) any later version. | 
|---|
| 15 | * | 
|---|
| 16 | * kStuff is distributed in the hope that it will be useful, | 
|---|
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|---|
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU | 
|---|
| 19 | * Lesser General Public License for more details. | 
|---|
| 20 | * | 
|---|
| 21 | * You should have received a copy of the GNU Lesser General Public | 
|---|
| 22 | * License along with kStuff; if not, write to the Free Software | 
|---|
| 23 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA | 
|---|
| 24 | * | 
|---|
| 25 | */ | 
|---|
| 26 |  | 
|---|
| 27 | #ifndef ___k_kCpu_h___ | 
|---|
| 28 | #define ___k_kCpu_h___ | 
|---|
| 29 |  | 
|---|
| 30 | #include <k/kDefs.h> | 
|---|
| 31 | #include <k/kTypes.h> | 
|---|
| 32 | #include <k/kCpus.h> | 
|---|
| 33 |  | 
|---|
| 34 |  | 
|---|
| 35 | /** @defgroup grp_kCpu      kCpu  - The CPU And Architecture API | 
|---|
| 36 | * @{ | 
|---|
| 37 | */ | 
|---|
| 38 |  | 
|---|
| 39 | /** @def KCPU_DECL | 
|---|
| 40 | * Declares a kCpu function according to build context. | 
|---|
| 41 | * @param type          The return type. | 
|---|
| 42 | */ | 
|---|
| 43 | #if defined(KCPU_BUILDING_DYNAMIC) | 
|---|
| 44 | # define KCPU_DECL(type)        K_DECL_EXPORT(type) | 
|---|
| 45 | #elif defined(KCPU_BUILT_DYNAMIC) | 
|---|
| 46 | # define KCPU_DECL(type)        K_DECL_IMPORT(type) | 
|---|
| 47 | #else | 
|---|
| 48 | # define KCPU_DECL(type)        type | 
|---|
| 49 | #endif | 
|---|
| 50 |  | 
|---|
| 51 | #ifdef __cplusplus | 
|---|
| 52 | extern "C" { | 
|---|
| 53 | #endif | 
|---|
| 54 |  | 
|---|
| 55 | KCPU_DECL(void) kCpuGetArchAndCpu(PKCPUARCH penmArch, PKCPU penmCpu); | 
|---|
| 56 | KCPU_DECL(int)  kCpuCompare(KCPUARCH enmCodeArch, KCPU enmCodeCpu, KCPUARCH enmArch, KCPU enmCpu); | 
|---|
| 57 |  | 
|---|
| 58 | #ifdef __cplusplus | 
|---|
| 59 | } | 
|---|
| 60 | #endif | 
|---|
| 61 |  | 
|---|
| 62 | /** @} */ | 
|---|
| 63 |  | 
|---|
| 64 | #endif | 
|---|