source: trunk/kStuff/kCpu/kCpuGetArchAndCpu.c@ 3585

Last change on this file since 3585 was 3585, checked in by bird, 18 years ago

Cpu / architecture cleanup...

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.7 KB
Line 
1/* $Id: kCpuGetArchAndCpu.c 3585 2007-09-03 01:18:26Z bird $ */
2/** @file
3 * kCpu - kCpuGetArchAndCpu.
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/*******************************************************************************
28* Header Files *
29*******************************************************************************/
30#include <k/kCpu.h>
31
32
33/**
34 * Gets the arch+cpu of the calling cpu.
35 *
36 * @param penmArch Where to store the cpu architecture.
37 * @param penmCpu Where to store the cpu brand/model.
38 */
39KCPU_DECL(void) kCpuGetArchAndCpu(PKCPUARCH penmArch, PKCPU penmCpu)
40{
41#if K_ARCH == K_ARCH_AMD64
42 *penmArch = KCPUARCH_AMD64;
43 *penmCpu = KCPU_AMD64_BLEND; /** @todo check it using cpu. */
44
45#elif K_ARCH == K_ARCH_X86_32
46 *penmArch = KCPUARCH_X86_32;
47 *penmCpu = KCPU_X86_32_BLEND; /** @todo check it using cpu. */
48
49#else
50# error "Port me"
51#endif
52}
53
Note: See TracBrowser for help on using the repository browser.