* config/{HaikuConfig.h,types.h}:

- Added macro __HAIKU_ARCH_BITS specifying the architecture bitness (32/64)
    (might be more convenient to use than __HAIKU_ARCH_{32,64}_BIT).
  - Added macros __HAIKU_ARCH_PHYSICAL_BITS, __HAIKU_ARCH_PHYSICAL_{32,64}_BIT,
    and the types __haiku_phys_[s]addr_t. The intention is to use separate
    macros and types for virtual and physical addresses, since for some
    architectures (e.g. x86 with PAE) those actually differ.
* sys/types.h, BeBuild.h, SupportDefs.h:
  - Added types phys_[s]addr_t and respective printf() format macros.
  - Added public macros B_HAIKU_BITS, B_HAIKU_PHYSICAL_BITS,
    B_HAIKU_PHYSICAL_{32,64}_BIT.

Might break the build under older Haiku installations. Will test next.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36926 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2010-05-24 19:55:38 +00:00
parent fe9c332517
commit d34daac82a
12 changed files with 215 additions and 45 deletions
@@ -1493,6 +1493,7 @@
#define ulong fssh_ulong
#define addr_t fssh_addr_t
#define phys_addr_t fssh_phys_addr_t
#define dev_t fssh_dev_t
#define ino_t fssh_ino_t
+15 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2007-2009, Ingo Weinhold, [email protected].
* Copyright 2007-2010, Ingo Weinhold, [email protected].
* Distributed under the terms of the MIT License.
*/
#ifndef _FSSH_TYPES_H
@@ -15,8 +15,10 @@ typedef volatile int64_t vint64_t;
#ifdef HAIKU_HOST_PLATFORM_64_BIT
typedef uint64_t fssh_addr_t;
typedef uint64_t fssh_phys_addr_t;
#else
typedef uint32_t fssh_addr_t;
typedef uint32_t fssh_phys_addr_t;
#endif
typedef int32_t fssh_dev_t;
@@ -114,6 +116,18 @@ typedef int32_t fssh_pid_t;
# define FSSH_B_PRIxADDR FSSH_B_PRIx32
# define FSSH_B_PRIXADDR FSSH_B_PRIX32
#endif
/* phys_addr_t */
#ifdef HAIKU_HOST_PLATFORM_64_BIT
# define FSSH_B_PRIuPHYSADDR FSSH_B_PRIu64
# define FSSH_B_PRIoPHYSADDR FSSH_B_PRIo64
# define FSSH_B_PRIxPHYSADDR FSSH_B_PRIx64
# define FSSH_B_PRIXPHYSADDR FSSH_B_PRIX64
#else
# define FSSH_B_PRIuPHYSADDR FSSH_B_PRIu32
# define FSSH_B_PRIoPHYSADDR FSSH_B_PRIo32
# define FSSH_B_PRIxPHYSADDR FSSH_B_PRIx32
# define FSSH_B_PRIXPHYSADDR FSSH_B_PRIX32
#endif
/* off_t */
#define FSSH_B_PRIdOFF FSSH_B_PRId64
#define FSSH_B_PRIiOFF FSSH_B_PRIi64