source: mainline/kernel/generic/include/typedefs.h@ 5587cf7

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 5587cf7 was 5587cf7, checked in by Martin Decky <martin@…>, 15 years ago
  • use portable constant defines for integer range constants
  • add portable constant defines INTN_C and UINTN_C (for native_t and unative_t)
  • remove explicit wchar_t typedef (use the typedef set by autotool)
  • remove non-standard printf() formatting macros (PRIp, PRIs, PRIdPTR, etc.)
  • introduce PRIua formatting macro (for atomic_count_t)
  • unify kernel and uspace formatting macros
  • Property mode set to 100644
File size: 2.2 KB
Line 
1/*
2 * Copyright (c) 2001-2004 Jakub Jermar
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * - The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29/** @addtogroup generic
30 * @{
31 */
32/** @file
33 */
34
35#ifndef KERN_TYPEDEFS_H_
36#define KERN_TYPEDEFS_H_
37
38#include <stdint.h>
39#include <arch/common.h>
40#include <arch/types.h>
41
42#define NULL ((void *) 0)
43
44#define false 0
45#define true 1
46
47typedef struct {
48 uint64_t lo;
49 int64_t hi;
50} int128_t;
51
52typedef struct {
53 uint64_t lo;
54 uint64_t hi;
55} uint128_t;
56
57typedef struct {
58 volatile atomic_count_t count;
59} atomic_t;
60
61typedef void (* function)();
62
63typedef uint8_t bool;
64typedef uint64_t thread_id_t;
65typedef uint64_t task_id_t;
66typedef uint32_t context_id_t;
67
68typedef int32_t inr_t;
69typedef int32_t devno_t;
70
71typedef volatile uint8_t ioport8_t;
72typedef volatile uint16_t ioport16_t;
73typedef volatile uint32_t ioport32_t;
74
75#endif
76
77/** @}
78 */
Note: See TracBrowser for help on using the repository browser.