Changeset 96b02eb9 in mainline for kernel/arch/amd64/include


Ignore:
Timestamp:
2010-12-14T12:52:38Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6b10dab
Parents:
554debd
Message:

more unification of basic types

  • use sysarg_t and native_t (unsigned and signed variant) in both kernel and uspace
  • remove ipcarg_t in favour of sysarg_t

(no change in functionality)

Location:
kernel/arch/amd64/include
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/include/asm.h

    r554debd r96b02eb9  
    304304}
    305305
    306 NO_TRACE static inline unative_t read_msr(uint32_t msr)
     306NO_TRACE static inline sysarg_t read_msr(uint32_t msr)
    307307{
    308308        uint32_t ax, dx;
     
    343343        asm volatile (
    344344                "invlpg %[addr]\n"
    345                 :: [addr] "m" (*((unative_t *) addr))
     345                :: [addr] "m" (*((sysarg_t *) addr))
    346346        );
    347347}
     
    398398}
    399399
    400 #define GEN_READ_REG(reg) NO_TRACE static inline unative_t read_ ##reg (void) \
     400#define GEN_READ_REG(reg) NO_TRACE static inline sysarg_t read_ ##reg (void) \
    401401        { \
    402                 unative_t res; \
     402                sysarg_t res; \
    403403                asm volatile ( \
    404404                        "movq %%" #reg ", %[res]" \
     
    408408        }
    409409
    410 #define GEN_WRITE_REG(reg) NO_TRACE static inline void write_ ##reg (unative_t regn) \
     410#define GEN_WRITE_REG(reg) NO_TRACE static inline void write_ ##reg (sysarg_t regn) \
    411411        { \
    412412                asm volatile ( \
  • kernel/arch/amd64/include/proc/thread.h

    r554debd r96b02eb9  
    4141
    4242typedef struct {
    43         unative_t tls;
     43        sysarg_t tls;
    4444        /** User and kernel RSP for syscalls. */
    4545        uint64_t syscall_rsp[2];
  • kernel/arch/amd64/include/types.h

    r554debd r96b02eb9  
    4343typedef uint64_t ipl_t;
    4444
    45 typedef uint64_t unative_t;
     45typedef uint64_t sysarg_t;
    4646typedef int64_t native_t;
    4747typedef uint64_t atomic_count_t;
     
    5454
    5555#define PRIdn  PRId64  /**< Format for native_t. */
    56 #define PRIun  PRIu64  /**< Format for unative_t. */
    57 #define PRIxn  PRIx64  /**< Format for hexadecimal unative_t. */
     56#define PRIun  PRIu64  /**< Format for sysarg_t. */
     57#define PRIxn  PRIx64  /**< Format for hexadecimal sysarg_t. */
    5858#define PRIua  PRIu64  /**< Format for atomic_count_t. */
    5959
Note: See TracChangeset for help on using the changeset viewer.