Changeset 810a36f in mainline for abi/include/_bits/native.h


Ignore:
Timestamp:
2017-10-24T05:29:08Z (7 years ago)
Author:
jzr <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b1eb7ef
Parents:
c8fbbe7 (diff), 673ea28 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'types'.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • abi/include/_bits/native.h

    rc8fbbe7 r810a36f  
    11/*
    2  * Copyright (c) 2006 Ondrej Palkovsky
     2 * Copyright (c) 2017 CZ.NIC, z.s.p.o.
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup libcabs32
     29/* Authors:
     30 *      Jiří Zárevúcky (jzr) <zarevucky.jiri@gmail.com>
     31 */
     32
     33/** @addtogroup bits
    3034 * @{
    3135 */
    3236/** @file
     37 * A bunch of type aliases HelenOS code uses.
     38 *
     39 * They were originally defined as either u/int32_t or u/int64_t,
     40 * specifically for each architecture, but in practice they are
     41 * currently assumed to be identical to u/intptr_t, so we do just that.
    3342 */
    3443
    35 #ifndef LIBC_abs32_STDINT_H_
    36 #define LIBC_abs32_STDINT_H_
     44#ifndef _BITS_NATIVE_H_
     45#define _BITS_NATIVE_H_
    3746
    38 #include <libarch/common.h>
     47#include <_bits/macros.h>
    3948
    40 #define SIZE_MAX UINT32_MAX
     49#define ATOMIC_COUNT_MIN  __UINTPTR_MIN__
     50#define ATOMIC_COUNT_MAX  __UINTPTR_MAX__
    4151
    42 #define UINTPTR_MAX UINT32_MAX
    43 typedef uint32_t uintptr_t;
     52typedef __UINTPTR_TYPE__ pfn_t;
     53typedef __UINTPTR_TYPE__ ipl_t;
     54typedef __UINTPTR_TYPE__ sysarg_t;
     55typedef __INTPTR_TYPE__  native_t;
     56typedef __UINTPTR_TYPE__ atomic_count_t;
     57typedef __INTPTR_TYPE__  atomic_signed_t;
    4458
    45 #define INTPTR_MIN INT32_MIN
    46 #define INTPTR_MAX INT32_MAX
    47 typedef int32_t intptr_t;
    48 
    49 #define UINTMAX_MAX UINT64_MAX
    50 typedef uint64_t uintmax_t;
    51 
    52 #define INTMAX_MAX INT64_MAX
    53 typedef int64_t intmax_t;
     59#define PRIdn  __PRIdPTR__  /**< Format for native_t. */
     60#define PRIun  __PRIuPTR__  /**< Format for sysarg_t. */
     61#define PRIxn  __PRIxPTR__  /**< Format for hexadecimal sysarg_t. */
     62#define PRIua  __PRIuPTR__  /**< Format for atomic_count_t. */
    5463
    5564#endif
Note: See TracChangeset for help on using the changeset viewer.