Changeset c47e1a8 in mainline for kernel/generic/include


Ignore:
Timestamp:
2010-05-21T07:50:04Z (15 years ago)
Author:
Lenka Trochtova <trochtova.lenka@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d51ee2b
Parents:
cf8cc36 (diff), 15b592b (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 mainline changes (rev. 451)

Location:
kernel/generic/include
Files:
2 added
64 edited
1 moved

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/adt/avl.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_AVLTREE_H_
    3737
    38 #include <arch/types.h>
    3938#include <typedefs.h>
    4039
  • kernel/generic/include/adt/bitmap.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_BITMAP_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939
    4040#define BITS2BYTES(bits)        (bits ? ((((bits)-1)>>3)+1) : 0)
  • kernel/generic/include/adt/btree.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_BTREE_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939#include <adt/list.h>
    4040
  • kernel/generic/include/adt/hash_table.h

    rcf8cc36 rc47e1a8  
    3737
    3838#include <adt/list.h>
    39 #include <arch/types.h>
     39#include <typedefs.h>
    4040
    4141/** Set of operations for hash table. */
  • kernel/generic/include/adt/list.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_LIST_H_
    3737
    38 #include <arch/types.h>
    3938#include <typedefs.h>
    4039
  • kernel/generic/include/arch.h

    rcf8cc36 rc47e1a8  
    2727 */
    2828
    29 /** @addtogroup generic 
     29/** @addtogroup generic
    3030 * @{
    3131 */
     
    4141#include <mm/as.h>
    4242
    43 #define DEFAULT_CONTEXT         0
     43#define DEFAULT_CONTEXT  0
    4444
    45 #define CPU                     THE->cpu
    46 #define THREAD                  THE->thread
    47 #define TASK                    THE->task
    48 #define AS                      THE->as
    49 #define CONTEXT         (THE->task ? THE->task->context : DEFAULT_CONTEXT)
    50 #define PREEMPTION_DISABLED     THE->preemption_disabled
     45#define CPU                  THE->cpu
     46#define THREAD               THE->thread
     47#define TASK                 THE->task
     48#define AS                   THE->as
     49#define CONTEXT              (THE->task ? THE->task->context : DEFAULT_CONTEXT)
     50#define PREEMPTION_DISABLED  THE->preemption_disabled
    5151
    52 #define context_check(ctx1, ctx2)       ((ctx1) == (ctx2))
     52#define context_check(ctx1, ctx2)  ((ctx1) == (ctx2))
    5353
    5454/**
     
    5858 */
    5959typedef struct {
    60         size_t preemption_disabled;     /**< Preemption disabled counter. */
    61         thread_t *thread;               /**< Current thread. */
    62         task_t *task;                   /**< Current task. */
    63         cpu_t *cpu;                     /**< Executing cpu. */
    64         as_t *as;                       /**< Current address space. */
     60        size_t preemption_disabled;  /**< Preemption disabled counter. */
     61        thread_t *thread;            /**< Current thread. */
     62        task_t *task;                /**< Current task. */
     63        cpu_t *cpu;                  /**< Executing cpu. */
     64        as_t *as;                    /**< Current address space. */
    6565} the_t;
    6666
    6767#define THE  ((the_t * )(get_stack_base()))
    6868
    69 extern void the_initialize(the_t *the);
    70 extern void the_copy(the_t *src, the_t *dst);
     69extern void the_initialize(the_t *);
     70extern void the_copy(the_t *, the_t *);
    7171
    7272extern void arch_pre_mm_init(void);
     
    8080extern void reboot(void);
    8181extern void arch_reboot(void);
    82 extern void *arch_construct_function(fncptr_t *fptr, void *addr, void *caller);
     82extern void *arch_construct_function(fncptr_t *, void *, void *);
    8383
    8484#endif
  • kernel/generic/include/atomic.h

    rcf8cc36 rc47e1a8  
    2727 */
    2828
    29 /** @addtogroup generic 
     29/** @addtogroup generic
    3030 * @{
    3131 */
     
    3636#define KERN_ATOMIC_H_
    3737
    38 typedef struct atomic {
    39         volatile long count;
    40 } atomic_t;
    41 
     38#include <typedefs.h>
    4239#include <arch/atomic.h>
    4340
    44 static inline void atomic_set(atomic_t *val, long i)
     41static inline void atomic_set(atomic_t *val, atomic_count_t i)
    4542{
    4643        val->count = i;
    4744}
    4845
    49 static inline long atomic_get(atomic_t *val)
     46static inline atomic_count_t atomic_get(atomic_t *val)
    5047{
    5148        return val->count;
  • kernel/generic/include/bitops.h

    rcf8cc36 rc47e1a8  
    6565        }
    6666       
    67         if (arg >> 1) {
    68                 arg >>= 1;
     67        if (arg >> 1)
    6968                n += 1;
    70         }
    7169       
    7270        return n;
  • kernel/generic/include/byteorder.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_BYTEORDER_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939
    4040#if !(defined(__BE__) ^ defined(__LE__))
  • kernel/generic/include/config.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_CONFIG_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939#include <arch/mm/page.h>
    4040
  • kernel/generic/include/console/chardev.h

    rcf8cc36 rc47e1a8  
    3737
    3838#include <adt/list.h>
    39 #include <arch/types.h>
     39#include <typedefs.h>
    4040#include <synch/waitq.h>
    4141#include <synch/spinlock.h>
     
    5353/** Character input device. */
    5454typedef struct indev {
    55         char *name;
     55        const char *name;
    5656        waitq_t wq;
    5757       
     
    8181/** Character output device. */
    8282typedef struct outdev {
    83         char *name;
     83        const char *name;
    8484       
    8585        /** Protects everything below. */
     
    9595} outdev_t;
    9696
    97 extern void indev_initialize(char *name, indev_t *indev,
     97extern void indev_initialize(const char *name, indev_t *indev,
    9898    indev_operations_t *op);
    9999extern void indev_push_character(indev_t *indev, wchar_t ch);
    100100extern wchar_t indev_pop_character(indev_t *indev);
    101101
    102 extern void outdev_initialize(char *name, outdev_t *outdev,
     102extern void outdev_initialize(const char *name, outdev_t *outdev,
    103103    outdev_operations_t *op);
    104104
  • kernel/generic/include/console/console.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_CONSOLE_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939#include <console/chardev.h>
    4040
    4141extern indev_t *stdin;
    4242extern outdev_t *stdout;
    43 extern bool silent;
    4443
    4544extern indev_t *stdin_wire(void);
  • kernel/generic/include/console/kconsole.h

    rcf8cc36 rc47e1a8  
    9494extern void kconsole_notify_init(void);
    9595extern bool kconsole_check_poll(void);
    96 extern void kconsole(char *prompt, char *msg, bool kcon);
     96extern void kconsole(const char *prompt, const char *msg, bool kcon);
    9797extern void kconsole_thread(void *data);
    9898
  • kernel/generic/include/context.h

    rcf8cc36 rc47e1a8  
    2727 */
    2828
    29 /** @addtogroup generic 
     29/** @addtogroup generic
    3030 * @{
    3131 */
     
    3636#define KERN_CONTEXT_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939#include <arch/context.h>
    4040
     41#define context_set_generic(ctx, _pc, stack, size) \
     42        (ctx)->pc = (uintptr_t) (_pc); \
     43        (ctx)->sp = ((uintptr_t) (stack)) + (size) - SP_DELTA;
    4144
    42 #ifndef context_set
    43 #define context_set(c, _pc, stack, size)        \
    44         (c)->pc = (uintptr_t) (_pc);            \
    45         (c)->sp = ((uintptr_t) (stack)) + (size) - SP_DELTA;
    46 #endif /* context_set */
    47 
    48 extern int context_save_arch(context_t *c) __attribute__ ((returns_twice));
    49 extern void context_restore_arch(context_t *c) __attribute__ ((noreturn));
     45extern int context_save_arch(context_t *ctx) __attribute__((returns_twice));
     46extern void context_restore_arch(context_t *ctx) __attribute__((noreturn));
    5047
    5148/** Save register context.
     
    7370 * saved like that would therefore lead to a disaster.
    7471 *
    75  * @param c             Context structure.
     72 * @param ctx Context structure.
    7673 *
    77  * @return              context_save() returns 1, context_restore() returns 0.
     74 * @return context_save() returns 1, context_restore() returns 0.
     75 *
    7876 */
    79 #define context_save(c)   context_save_arch(c)
     77#define context_save(ctx)  context_save_arch(ctx)
    8078
    8179/** Restore register context.
     
    8886 * being return value.
    8987 *
    90  * @param c             Context structure.
     88 * @param ctx Context structure.
    9189 */
    92 static inline void context_restore(context_t *c)
     90static inline void context_restore(context_t *ctx)
    9391{
    94         context_restore_arch(c);
     92        context_restore_arch(ctx);
    9593}
    9694
  • kernel/generic/include/cpu.h

    rcf8cc36 rc47e1a8  
    4848 * There is one structure like this for every processor.
    4949 */
    50 typedef struct {
     50typedef struct cpu {
    5151        SPINLOCK_DECLARE(lock);
    5252
     
    6868                                             are disabled. */
    6969
     70        bool idle;
     71        uint64_t idle_ticks;
     72        uint64_t busy_ticks;
     73
    7074        /**
    7175         * Processor ID assigned by kernel.
     
    7377        unsigned int id;
    7478       
    75         int active;
     79        bool active;
    7680        int tlb_active;
    7781
  • kernel/generic/include/ddi/ddi.h

    rcf8cc36 rc47e1a8  
    3737
    3838#include <ddi/ddi_arg.h>
    39 #include <arch/types.h>
     39#include <typedefs.h>
    4040#include <proc/task.h>
    4141#include <adt/list.h>
  • kernel/generic/include/ddi/device.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_DEVICE_H_
    3737
    38 #include <arch/types.h>
    3938#include <typedefs.h>
    4039
  • kernel/generic/include/ddi/irq.h

    rcf8cc36 rc47e1a8  
    8181#ifdef KERNEL
    8282
    83 #include <arch/types.h>
     83#include <typedefs.h>
    8484#include <adt/list.h>
    8585#include <adt/hash_table.h>
  • kernel/generic/include/func.h

    rcf8cc36 rc47e1a8  
    2727 */
    2828
    29 /** @addtogroup generic 
     29/** @addtogroup generic
    3030 * @{
    3131 */
     
    3636#define KERN_FUNC_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939#include <atomic.h>
    4040
     
    4242
    4343extern void halt(void) __attribute__((noreturn));
    44 extern unative_t atoi(const char *text);
    45 extern void order(const uint64_t val, uint64_t *rv, char *suffix);
    4644
    4745#endif
  • kernel/generic/include/interrupt.h

    rcf8cc36 rc47e1a8  
    3737
    3838#include <arch/interrupt.h>
    39 #include <arch/types.h>
     39#include <typedefs.h>
    4040#include <proc/task.h>
    4141#include <proc/thread.h>
     
    4646typedef void (* iroutine)(int n, istate_t *istate);
    4747
    48 extern void fault_if_from_uspace(istate_t *istate, char *fmt, ...);
     48extern void fault_if_from_uspace(istate_t *istate, const char *fmt, ...);
    4949extern iroutine exc_register(int n, const char *name, iroutine f);
    5050extern void exc_dispatch(int n, istate_t *t);
  • kernel/generic/include/ipc/event.h

    rcf8cc36 rc47e1a8  
    3737
    3838#include <ipc/event_types.h>
    39 #include <arch/types.h>
     39#include <typedefs.h>
    4040#include <synch/spinlock.h>
    4141#include <ipc/ipc.h>
  • kernel/generic/include/ipc/ipc.h

    rcf8cc36 rc47e1a8  
    227227#ifdef KERNEL
    228228
    229 #define IPC_MAX_PHONES  16
     229#define IPC_MAX_PHONES  32
    230230
    231231#include <synch/spinlock.h>
  • kernel/generic/include/ipc/irq.h

    rcf8cc36 rc47e1a8  
    4141#include <ipc/ipc.h>
    4242#include <ddi/irq.h>
    43 #include <arch/types.h>
     43#include <typedefs.h>
    4444#include <adt/list.h>
    4545
  • kernel/generic/include/ipc/sysipc.h

    rcf8cc36 rc47e1a8  
    3838#include <ipc/ipc.h>
    3939#include <ipc/irq.h>
    40 #include <arch/types.h>
     40#include <typedefs.h>
    4141
    4242unative_t sys_ipc_call_sync_fast(unative_t phoneid, unative_t method,
     
    5757unative_t sys_ipc_forward_slow(unative_t callid, unative_t phoneid,
    5858    ipc_data_t *data, int mode);
    59 unative_t sys_ipc_hangup(int phoneid);
     59unative_t sys_ipc_hangup(unative_t phoneid);
    6060unative_t sys_ipc_register_irq(inr_t inr, devno_t devno, unative_t method,
    6161    irq_code_t *ucode);
  • kernel/generic/include/lib/elf.h

    rcf8cc36 rc47e1a8  
    3737
    3838#include <arch/elf.h>
    39 #include <arch/types.h>
     39#include <typedefs.h>
    4040
    4141/**
    4242 * current ELF version
    4343 */
    44 #define EV_CURRENT      1
    45 
    46 /** 
    47  * ELF types 
     44#define EV_CURRENT      1
     45
     46/**
     47 * ELF types
    4848 */
    4949#define ET_NONE         0       /* No type */
     
    338338#endif
    339339
    340 extern char *elf_error(unsigned int rc);
     340extern const char *elf_error(unsigned int rc);
    341341
    342342/* Interpreter string used to recognize the program loader */
  • kernel/generic/include/lib/rd.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_RD_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939
    4040/**
    4141 * RAM disk version
    4242 */
    43 #define RD_VERSION      1
     43#define RD_VERSION      1
    4444
    4545/**
  • kernel/generic/include/macros.h

    rcf8cc36 rc47e1a8  
    3838#ifndef __ASM__
    3939
    40 #include <arch/types.h>
     40#include <typedefs.h>
    4141
    4242/** Return true if the intervals overlap.
     
    8484#define STRING_ARG(arg)  #arg
    8585
    86 #define LOWER32(arg)  ((arg) & 0xffffffff)
    87 #define UPPER32(arg)  (((arg) >> 32) & 0xffffffff)
     86#define LOWER32(arg)  (((uint64_t) (arg)) & 0xffffffff)
     87#define UPPER32(arg)  (((((uint64_t) arg)) >> 32) & 0xffffffff)
    8888
    8989#define MERGE_LOUP32(lo, up) \
  • kernel/generic/include/main/main.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_MAIN_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939
    4040extern size_t hardcoded_kdata_size;
  • kernel/generic/include/main/uinit.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_UINIT_H_
    3737
    38 #include <arch/types.h>
    39 
    4038extern void uinit(void *arg);
    4139
  • kernel/generic/include/memstr.h

    rcf8cc36 rc47e1a8  
    2727 */
    2828
    29 /** @addtogroup generic 
     29/** @addtogroup generic
    3030 * @{
    3131 */
     
    3636#define KERN_MEMSTR_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939#include <arch/memstr.h>
    4040
  • kernel/generic/include/mm/as.h

    rcf8cc36 rc47e1a8  
    11/*
    2  * Copyright (c) 2001-2004 Jakub Jermar
     2 * Copyright (c) 2010 Jakub Jermar
    33 * All rights reserved.
    44 *
     
    3737
    3838#ifdef KERNEL
    39 #include <arch/types.h>
     39        #include <typedefs.h>
    4040#else
    41 #include <sys/types.h>
     41        #include <sys/types.h>
    4242#endif
    4343
     
    6565#include <arch/mm/as.h>
    6666#include <arch/mm/asid.h>
    67 #include <arch/types.h>
     67#include <typedefs.h>
    6868#include <synch/spinlock.h>
    6969#include <synch/mutex.h>
     
    227227extern void as_init(void);
    228228
    229 extern as_t *as_create(int flags);
    230 extern void as_destroy(as_t *as);
    231 extern void as_switch(as_t *old_as, as_t *new_as);
    232 extern int as_page_fault(uintptr_t page, pf_access_t access, istate_t *istate);
    233 
    234 extern as_area_t *as_area_create(as_t *as, int flags, size_t size,
    235     uintptr_t base, int attrs, mem_backend_t *backend,
    236     mem_backend_data_t *backend_data);
    237 extern int as_area_destroy(as_t *as, uintptr_t address);       
    238 extern int as_area_resize(as_t *as, uintptr_t address, size_t size, int flags);
    239 int as_area_share(as_t *src_as, uintptr_t src_base, size_t acc_size,
    240     as_t *dst_as, uintptr_t dst_base, int dst_flags_mask);
    241 extern int as_area_change_flags(as_t *as, int flags, uintptr_t address);
    242 
    243 extern int as_area_get_flags(as_area_t *area);
    244 extern bool as_area_check_access(as_area_t *area, pf_access_t access);
    245 extern size_t as_area_get_size(uintptr_t base);
    246 extern int used_space_insert(as_area_t *a, uintptr_t page, size_t count);
    247 extern int used_space_remove(as_area_t *a, uintptr_t page, size_t count);
     229extern as_t *as_create(int);
     230extern void as_destroy(as_t *);
     231extern void as_hold(as_t *);
     232extern void as_release(as_t *);
     233extern void as_switch(as_t *, as_t *);
     234extern int as_page_fault(uintptr_t, pf_access_t, istate_t *);
     235
     236extern as_area_t *as_area_create(as_t *, int, size_t, uintptr_t, int,
     237    mem_backend_t *, mem_backend_data_t *);
     238extern int as_area_destroy(as_t *, uintptr_t);
     239extern int as_area_resize(as_t *, uintptr_t, size_t, int);
     240extern int as_area_share(as_t *, uintptr_t, size_t, as_t *, uintptr_t, int);
     241extern int as_area_change_flags(as_t *, int, uintptr_t);
     242
     243extern int as_area_get_flags(as_area_t *);
     244extern bool as_area_check_access(as_area_t *, pf_access_t);
     245extern size_t as_area_get_size(uintptr_t);
     246extern int used_space_insert(as_area_t *, uintptr_t, size_t);
     247extern int used_space_remove(as_area_t *, uintptr_t, size_t);
    248248
    249249
    250250/* Interface to be implemented by architectures. */
    251251#ifndef as_constructor_arch
    252 extern int as_constructor_arch(as_t *as, int flags);
     252extern int as_constructor_arch(as_t *, int);
    253253#endif /* !def as_constructor_arch */
    254254#ifndef as_destructor_arch
    255 extern int as_destructor_arch(as_t *as);
     255extern int as_destructor_arch(as_t *);
    256256#endif /* !def as_destructor_arch */
    257257#ifndef as_create_arch
    258 extern int as_create_arch(as_t *as, int flags);
     258extern int as_create_arch(as_t *, int);
    259259#endif /* !def as_create_arch */
    260260#ifndef as_install_arch
    261 extern void as_install_arch(as_t *as);
     261extern void as_install_arch(as_t *);
    262262#endif /* !def as_install_arch */
    263263#ifndef as_deinstall_arch
    264 extern void as_deinstall_arch(as_t *as);
     264extern void as_deinstall_arch(as_t *);
    265265#endif /* !def as_deinstall_arch */
    266266
     
    277277#define ELD_F_LOADER    1
    278278
    279 extern unsigned int elf_load(elf_header_t *header, as_t *as, int flags);
     279extern unsigned int elf_load(elf_header_t *, as_t *, int);
    280280
    281281/* Address space area related syscalls. */
    282 extern unative_t sys_as_area_create(uintptr_t address, size_t size, int flags);
    283 extern unative_t sys_as_area_resize(uintptr_t address, size_t size, int flags);
    284 extern unative_t sys_as_area_change_flags(uintptr_t address, int flags);
    285 extern unative_t sys_as_area_destroy(uintptr_t address);
     282extern unative_t sys_as_area_create(uintptr_t, size_t, int);
     283extern unative_t sys_as_area_resize(uintptr_t, size_t, int);
     284extern unative_t sys_as_area_change_flags(uintptr_t, int);
     285extern unative_t sys_as_area_destroy(uintptr_t);
    286286
    287287/* Introspection functions. */
    288 extern void as_get_area_info(as_t *as, as_area_info_t **obuf, size_t *osize);
    289 extern void as_print(as_t *as);
     288extern void as_get_area_info(as_t *, as_area_info_t **, size_t *);
     289extern void as_print(as_t *);
    290290
    291291#endif /* KERNEL */
  • kernel/generic/include/mm/buddy.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_BUDDY_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939#include <adt/list.h>
    4040
  • kernel/generic/include/mm/frame.h

    rcf8cc36 rc47e1a8  
    3737#define KERN_FRAME_H_
    3838
    39 #include <arch/types.h>
     39#include <typedefs.h>
    4040#include <adt/list.h>
    4141#include <mm/buddy.h>
     
    169169extern bool zone_merge(size_t, size_t);
    170170extern void zone_merge_all(void);
    171 extern uint64_t zone_total_size(void);
     171extern uint64_t zones_total_size(void);
     172extern void zones_stats(uint64_t *, uint64_t *, uint64_t *, uint64_t *);
    172173
    173174/*
    174175 * Console functions
    175176 */
    176 extern void zone_print_list(void);
     177extern void zones_print_list(void);
    177178extern void zone_print_one(size_t);
    178179
  • kernel/generic/include/mm/page.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_PAGE_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939#include <mm/as.h>
    4040#include <memstr.h>
  • kernel/generic/include/mm/slab.h

    rcf8cc36 rc47e1a8  
    8686
    8787typedef struct {
    88         char *name;
     88        const char *name;
    8989       
    9090        link_t link;
     
    123123} slab_cache_t;
    124124
    125 extern slab_cache_t *slab_cache_create(char *, size_t, size_t,
     125extern slab_cache_t *slab_cache_create(const char *, size_t, size_t,
    126126    int (*)(void *, int), int (*)(void *), int);
    127127extern void slab_cache_destroy(slab_cache_t *);
  • kernel/generic/include/mm/tlb.h

    rcf8cc36 rc47e1a8  
    3737
    3838#include <arch/mm/asid.h>
    39 #include <arch/types.h>
     39#include <typedefs.h>
    4040
    4141/**
  • kernel/generic/include/panic.h

    rcf8cc36 rc47e1a8  
    2727 */
    2828
    29 /** @addtogroup generic 
     29/** @addtogroup generic
    3030 * @{
    3131 */
     
    3636#define KERN_PANIC_H_
    3737
     38#include <typedefs.h>
    3839#include <stacktrace.h>
    3940#include <print.h>
     
    4243#       define panic(format, ...) \
    4344                do { \
     45                        silent = false; \
    4446                        printf("Kernel panic in %s() at %s:%u.\n", \
    4547                            __func__, __FILE__, __LINE__); \
     
    5052#else
    5153#       define panic(format, ...) \
    52                 panic_printf("Kernel panic: " format "\n", ##__VA_ARGS__);
     54                do { \
     55                        silent = false; \
     56                        panic_printf("Kernel panic: " format "\n", ##__VA_ARGS__); \
     57                } while (0)
    5358#endif
    5459
    55 extern void panic_printf(char *fmt, ...) __attribute__((noreturn));
     60extern bool silent;
     61
     62extern void panic_printf(const char *fmt, ...) __attribute__((noreturn));
    5663
    5764#endif
  • kernel/generic/include/preemption.h

    rcf8cc36 rc47e1a8  
    2727 */
    2828
    29 /** @addtogroup generic 
     29/** @addtogroup generic
    3030 * @{
    3131 */
  • kernel/generic/include/print.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_PRINT_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939#include <stdarg.h>
    4040
    41 #define EOF (-1)
     41#define EOF  (-1)
    4242
    4343extern int puts(const char *s);
  • kernel/generic/include/printf/printf_core.h

    rcf8cc36 rc47e1a8  
    5151} printf_spec_t;
    5252
    53 int printf_core(const char *fmt, printf_spec_t *ps, va_list ap);
     53extern int printf_core(const char *fmt, printf_spec_t *ps, va_list ap);
    5454
    5555#endif
  • kernel/generic/include/proc/program.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_PROGRAM_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939
    4040struct task;
     
    4545 * A program is an abstraction of a freshly created (not yet running)
    4646 * userspace task containing a main thread along with its userspace stack.
     47 *
    4748 */
    4849typedef struct program {
    49         struct task *task;              /**< Program task */
    50         struct thread *main_thread;     /**< Program main thread */
     50        struct task *task;           /**< Program task */
     51        struct thread *main_thread;  /**< Program main thread */
    5152} program_t;
    5253
    5354extern void *program_loader;
    5455
    55 extern void program_create(as_t *as, uintptr_t entry_addr, char *name,
    56     program_t *p);
    57 extern int program_create_from_image(void *image_addr, char *name,
    58     program_t *p);
    59 extern int program_create_loader(program_t *p, char *name);
    60 extern void program_ready(program_t *p);
     56extern int program_create(as_t *, uintptr_t, char *, program_t *);
     57extern int program_create_from_image(void *, char *, program_t *);
     58extern int program_create_loader(program_t *, char *);
     59extern void program_ready(program_t *);
    6160
    62 extern unative_t sys_program_spawn_loader(char *uspace_name, size_t name_len);
     61extern unative_t sys_program_spawn_loader(char *, size_t);
    6362
    6463#endif
  • kernel/generic/include/proc/scheduler.h

    rcf8cc36 rc47e1a8  
    3737
    3838#include <synch/spinlock.h>
    39 #include <time/clock.h>         /* HZ */
     39#include <time/clock.h>
     40#include <typedefs.h>
    4041#include <atomic.h>
    4142#include <adt/list.h>
    4243
    43 #define RQ_COUNT                16
    44 #define NEEDS_RELINK_MAX        (HZ)
     44#define RQ_COUNT          16
     45#define NEEDS_RELINK_MAX  (HZ)
    4546
    4647/** Scheduler run queue structure. */
    4748typedef struct {
    4849        SPINLOCK_DECLARE(lock);
    49         link_t rq_head;         /**< List of ready threads. */
    50         size_t n;               /**< Number of threads in rq_ready. */
     50        link_t rq_head;          /**< List of ready threads. */
     51        size_t n;                /**< Number of threads in rq_ready. */
    5152} runq_t;
    5253
     
    6162
    6263/*
    63  * To be defined by architectures:
     64 * To be defined by architectures.
    6465 */
    6566extern void before_task_runs_arch(void);
  • kernel/generic/include/proc/task.h

    rcf8cc36 rc47e1a8  
    11/*
    2  * Copyright (c) 2001-2004 Jakub Jermar
     2 * Copyright (c) 2010 Jakub Jermar
    33 * All rights reserved.
    44 *
     
    5656#include <ipc/kbox.h>
    5757#include <mm/as.h>
    58 
    59 #define TASK_NAME_BUFLEN        20
     58#include <sysinfo/abi.h>
    6059
    6160struct thread;
     
    8180        task_id_t taskid;
    8281        /** Task security context. */
    83         context_id_t context;   
     82        context_id_t context;
    8483
    8584        /** Number of references (i.e. threads). */
     
    8988
    9089        /** Task capabilities. */
    91         cap_t capabilities;     
     90        cap_t capabilities;
    9291
    9392        /* IPC stuff */
    9493        answerbox_t answerbox;  /**< Communication endpoint */
    9594        phone_t phones[IPC_MAX_PHONES];
     95        stats_ipc_t ipc_info;   /**< IPC statistics */
    9696        /**
    9797         * Active asynchronous messages. It is used for limiting uspace to
     
    119119        mutex_t futexes_lock;
    120120        /** B+tree of futexes referenced by this task. */
    121         btree_t futexes;       
     121        btree_t futexes;
    122122       
    123123        /** Accumulated accounting. */
    124         uint64_t cycles;
     124        uint64_t ucycles;
     125        uint64_t kcycles;
    125126} task_t;
    126127
     
    130131extern void task_init(void);
    131132extern void task_done(void);
    132 extern task_t *task_create(as_t *as, char *name);
    133 extern void task_destroy(task_t *t);
    134 extern task_t *task_find_by_id(task_id_t id);
    135 extern int task_kill(task_id_t id);
    136 extern uint64_t task_get_accounting(task_t *t);
     133extern task_t *task_create(as_t *, const char *);
     134extern void task_destroy(task_t *);
     135extern void task_hold(task_t *);
     136extern void task_release(task_t *);
     137extern task_t *task_find_by_id(task_id_t);
     138extern int task_kill(task_id_t);
     139extern void task_get_accounting(task_t *, uint64_t *, uint64_t *);
    137140extern void task_print_list(void);
    138141
    139 extern void cap_set(task_t *t, cap_t caps);
    140 extern cap_t cap_get(task_t *t);
     142extern void cap_set(task_t *, cap_t);
     143extern cap_t cap_get(task_t *);
    141144
    142145#ifndef task_create_arch
    143 extern void task_create_arch(task_t *t);
     146extern void task_create_arch(task_t *);
    144147#endif
    145148
    146149#ifndef task_destroy_arch
    147 extern void task_destroy_arch(task_t *t);
     150extern void task_destroy_arch(task_t *);
    148151#endif
    149152
    150 extern unative_t sys_task_get_id(task_id_t *uspace_task_id);
    151 extern unative_t sys_task_set_name(const char *uspace_name, size_t name_len);
     153extern unative_t sys_task_get_id(task_id_t *);
     154extern unative_t sys_task_set_name(const char *, size_t);
    152155
    153156#endif
  • kernel/generic/include/proc/thread.h

    rcf8cc36 rc47e1a8  
    4848#include <proc/uarg.h>
    4949#include <udebug/udebug.h>
     50#include <sysinfo/abi.h>
    5051
    5152#define THREAD_STACK_SIZE       STACK_SIZE
    5253#define THREAD_NAME_BUFLEN      20
    5354
    54 extern char *thread_states[];
     55extern const char *thread_states[];
    5556
    5657/* Thread flags */
     
    6970#define THREAD_FLAG_NOATTACH    (1 << 3)
    7071
    71 /** Thread states. */
    72 typedef enum {
    73         /** It is an error, if thread is found in this state. */
    74         Invalid,
    75         /** State of a thread that is currently executing on some CPU. */
    76         Running,
    77         /** Thread in this state is waiting for an event. */
    78         Sleeping,
    79         /** State of threads in a run queue. */
    80         Ready,
    81         /** Threads are in this state before they are first readied. */
    82         Entering,
    83         /** After a thread calls thread_exit(), it is put into Exiting state. */
    84         Exiting,
    85         /** Threads that were not detached but exited are Lingering. */
    86         Lingering
    87 } state_t;
    88 
    8972/** Thread structure. There is one per thread. */
    9073typedef struct thread {
     
    189172       
    190173        /** Thread accounting. */
    191         uint64_t cycles;
     174        uint64_t ucycles;
     175        uint64_t kcycles;
    192176        /** Last sampled cycle. */
    193177        uint64_t last_cycle;
     
    225209
    226210extern void thread_init(void);
    227 extern thread_t *thread_create(void (*)(void *), void *, task_t *, int, char *,
    228     bool);
     211extern thread_t *thread_create(void (*)(void *), void *, task_t *, int,
     212    const char *, bool);
    229213extern void thread_attach(thread_t *, task_t *);
    230214extern void thread_ready(thread_t *);
     
    252236extern void thread_print_list(void);
    253237extern void thread_destroy(thread_t *);
    254 extern void thread_update_accounting(void);
     238extern thread_t *thread_find_by_id(thread_id_t);
     239extern void thread_update_accounting(bool);
    255240extern bool thread_exists(thread_t *);
    256241
  • kernel/generic/include/security/cap.h

    rcf8cc36 rc47e1a8  
    4949
    5050#include <syscall/sysarg64.h>
    51 #include <arch/types.h>
     51#include <typedefs.h>
    5252
    5353/**
  • kernel/generic/include/smp/ipi.h

    rcf8cc36 rc47e1a8  
    2727 */
    2828
    29 /** @addtogroup generic 
     29/** @addtogroup generic
    3030 * @{
    3131 */
     
    3737
    3838#ifdef CONFIG_SMP
    39 extern void ipi_broadcast(int ipi);
    40 extern void ipi_broadcast_arch(int ipi);
     39
     40extern void ipi_broadcast(int);
     41extern void ipi_broadcast_arch(int);
     42
    4143#else
    42 #define ipi_broadcast(x)        ;
     44
     45        #define ipi_broadcast(ipi)
     46
    4347#endif /* CONFIG_SMP */
    4448
  • kernel/generic/include/sort.h

    rcf8cc36 rc47e1a8  
    2727 */
    2828
    29 /** @addtogroup generic 
     29/** @addtogroup generic
    3030 * @{
    3131 */
     
    3636#define KERN_SORT_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939
    4040/*
  • kernel/generic/include/stacktrace.h

    rcf8cc36 rc47e1a8  
    2727 */
    2828
    29 /** @addtogroup genericdebug 
     29/** @addtogroup genericdebug
    3030 * @{
    3131 */
     
    3636#define KERN_STACKTRACE_H_
    3737
    38 #include <arch/types.h>
    3938#include <typedefs.h>
    4039
     
    4645        bool (* frame_pointer_prev)(uintptr_t, uintptr_t *);
    4746        bool (* return_address_get)(uintptr_t, uintptr_t *);
    48         bool (* symbol_resolve)(uintptr_t, char **, uintptr_t *);
     47        bool (* symbol_resolve)(uintptr_t, const char **, uintptr_t *);
    4948} stack_trace_ops_t;
    5049
     
    6059 */
    6160extern uintptr_t frame_pointer_get(void);
    62 extern uintptr_t program_counter_get();
     61extern uintptr_t program_counter_get(void);
    6362
    6463extern bool kernel_frame_pointer_validate(uintptr_t);
  • kernel/generic/include/str.h

    rcf8cc36 rc47e1a8  
    3333 */
    3434
    35 #ifndef KERN_STRING_H_
    36 #define KERN_STRING_H_
     35#ifndef KERN_STR_H_
     36#define KERN_STR_H_
    3737
    3838#include <typedefs.h>
     
    8989extern void wstr_to_str(char *dest, size_t size, const wchar_t *src);
    9090
     91extern char *str_dup(const char *src);
     92extern char *str_ndup(const char *src, size_t n);
     93
    9194extern char *str_chr(const char *str, wchar_t ch);
    9295
     
    9497extern bool wstr_remove(wchar_t *str, size_t pos);
    9598
     99extern int str_uint64(const char *, char **, unsigned int, bool, uint64_t *);
     100
     101extern void order_suffix(const uint64_t val, uint64_t *rv, char *suffix);
     102
    96103#endif
    97104
  • kernel/generic/include/symtab.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_SYMTAB_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939
    4040#define MAX_SYMBOL_NAME 64
     
    4545};
    4646
    47 extern int symtab_name_lookup(uintptr_t, char **, uintptr_t *);
    48 extern char *symtab_fmt_name_lookup(uintptr_t);
     47extern int symtab_name_lookup(uintptr_t, const char **, uintptr_t *);
     48extern const char *symtab_fmt_name_lookup(uintptr_t);
    4949extern int symtab_addr_lookup(const char *, uintptr_t *);
    5050extern void symtab_print_search(const char *);
  • kernel/generic/include/synch/condvar.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_CONDVAR_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939#include <synch/waitq.h>
    4040#include <synch/mutex.h>
  • kernel/generic/include/synch/futex.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_FUTEX_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939#include <synch/waitq.h>
    4040
  • kernel/generic/include/synch/mutex.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_MUTEX_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939#include <synch/semaphore.h>
    4040#include <synch/synch.h>
  • kernel/generic/include/synch/rwlock.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_RWLOCK_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939#include <synch/mutex.h>
    4040#include <synch/synch.h>
  • kernel/generic/include/synch/semaphore.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_SEMAPHORE_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939#include <synch/waitq.h>
    4040#include <synch/synch.h>
  • kernel/generic/include/synch/spinlock.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_SPINLOCK_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939#include <arch/barrier.h>
    4040#include <preemption.h>
     
    4848       
    4949#ifdef CONFIG_DEBUG_SPINLOCK
    50         char *name;
     50        const char *name;
    5151#endif
    5252} spinlock_t;
     
    7777        }
    7878
    79 #define spinlock_lock(lock)  spinlock_lock_debug(lock)
     79#define spinlock_lock(lock)     spinlock_lock_debug((lock))
     80#define spinlock_unlock(lock)   spinlock_unlock_debug((lock))
    8081
    8182#else
     
    9192        }
    9293
    93 #define spinlock_lock(lock)  atomic_lock_arch(&(lock)->val)
     94#define spinlock_lock(lock)     atomic_lock_arch(&(lock)->val)
     95#define spinlock_unlock(lock)   spinlock_unlock_nondebug((lock))
    9496
    9597#endif
     
    101103        SPINLOCK_STATIC_INITIALIZE_NAME(lock_name, #lock_name)
    102104
    103 extern void spinlock_initialize(spinlock_t *lock, char *name);
     105extern void spinlock_initialize(spinlock_t *lock, const char *name);
    104106extern int spinlock_trylock(spinlock_t *lock);
    105107extern void spinlock_lock_debug(spinlock_t *lock);
     108extern void spinlock_unlock_debug(spinlock_t *lock);
    106109
    107110/** Unlock spinlock
    108111 *
    109  * Unlock spinlock.
     112 * Unlock spinlock for non-debug kernels.
    110113 *
    111114 * @param sl Pointer to spinlock_t structure.
    112115 */
    113 static inline void spinlock_unlock(spinlock_t *lock)
     116static inline void spinlock_unlock_nondebug(spinlock_t *lock)
    114117{
    115         ASSERT(atomic_get(&lock->val) != 0);
    116        
    117118        /*
    118119         * Prevent critical section code from bleeding out this way down.
  • kernel/generic/include/synch/waitq.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_WAITQ_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939#include <synch/spinlock.h>
    4040#include <synch/synch.h>
  • kernel/generic/include/syscall/copy.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_COPY_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939
    4040/** Label within memcpy_from_uspace() that contains return -1. */
  • kernel/generic/include/syscall/syscall.h

    rcf8cc36 rc47e1a8  
    7171        SYS_IPC_REGISTER_IRQ,
    7272        SYS_IPC_UNREGISTER_IRQ,
    73 
     73       
    7474        SYS_EVENT_SUBSCRIBE,
    7575       
     
    8383        SYS_INTERRUPT_ENABLE,
    8484       
    85         SYS_SYSINFO_VALID,
    86         SYS_SYSINFO_VALUE,
     85        SYS_SYSINFO_GET_TAG,
     86        SYS_SYSINFO_GET_VALUE,
     87        SYS_SYSINFO_GET_DATA_SIZE,
     88        SYS_SYSINFO_GET_DATA,
    8789       
    8890        SYS_DEBUG_ENABLE_CONSOLE,
    8991        SYS_DEBUG_DISABLE_CONSOLE,
     92       
    9093        SYS_IPC_CONNECT_KBOX,
    9194        SYSCALL_END
     
    9497#ifdef KERNEL
    9598
    96 #include <arch/types.h>
     99#include <typedefs.h>
    97100
    98101typedef unative_t (*syshandler_t)(unative_t, unative_t, unative_t, unative_t,
  • kernel/generic/include/sysinfo/sysinfo.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_SYSINFO_H_
    3737
    38 #include <arch/types.h>
    39 #include <string.h>
     38#include <typedefs.h>
     39#include <str.h>
    4040
     41/** Framebuffer info exported flags */
    4142extern bool fb_exported;
    4243
    43 typedef union sysinfo_item_val {
    44         unative_t val;
    45         void *fn;
     44/** Item value type
     45 *
     46 */
     47typedef enum {
     48        SYSINFO_VAL_UNDEFINED = 0,     /**< Undefined value */
     49        SYSINFO_VAL_VAL = 1,           /**< Constant numeric value */
     50        SYSINFO_VAL_DATA = 2,          /**< Constant binary data */
     51        SYSINFO_VAL_FUNCTION_VAL = 3,  /**< Generated numeric value */
     52        SYSINFO_VAL_FUNCTION_DATA = 4  /**< Generated binary data */
     53} sysinfo_item_val_type_t;
     54
     55/** Subtree type
     56 *
     57 */
     58typedef enum {
     59        SYSINFO_SUBTREE_NONE = 0,     /**< No subtree (leaf item) */
     60        SYSINFO_SUBTREE_TABLE = 1,    /**< Fixed subtree */
     61        SYSINFO_SUBTREE_FUNCTION = 2  /**< Generated subtree */
     62} sysinfo_subtree_type_t;
     63
     64struct sysinfo_item;
     65
     66/** Gerated numeric value function */
     67typedef unative_t (*sysinfo_fn_val_t)(struct sysinfo_item *);
     68
     69/** Generated binary data function */
     70typedef void *(*sysinfo_fn_data_t)(struct sysinfo_item *, size_t *, bool);
     71
     72/** Sysinfo item binary data
     73 *
     74 */
     75typedef struct {
     76        void *data;   /**< Data */
     77        size_t size;  /**< Size (bytes) */
     78} sysinfo_data_t;
     79
     80/** Sysinfo item value (union)
     81 *
     82 */
     83typedef union {
     84        unative_t val;              /**< Constant numberic value */
     85        sysinfo_fn_val_t fn_val;    /**< Generated numeric value function */
     86        sysinfo_fn_data_t fn_data;  /**< Generated binary data function */
     87        sysinfo_data_t data;        /**< Constant binary data */
    4688} sysinfo_item_val_t;
    4789
     90/** Sysinfo return holder
     91 *
     92 * This structure is generated from the constant
     93 * items or by the generating functions. Note that
     94 * the validity of the data is limited by the scope
     95 * of single sysinfo invocation guarded by sysinfo_lock.
     96 *
     97 */
     98typedef struct {
     99        sysinfo_item_val_type_t tag;  /**< Return value type */
     100        union {
     101                unative_t val;            /**< Numberic value */
     102                sysinfo_data_t data;      /**< Binary data */
     103        };
     104} sysinfo_return_t;
     105
     106/** Generated subtree function */
     107typedef sysinfo_return_t (*sysinfo_fn_subtree_t)(const char *, bool);
     108
     109/** Sysinfo subtree (union)
     110 *
     111 */
     112typedef union {
     113        struct sysinfo_item *table;     /**< Fixed subtree (list of subitems) */
     114        sysinfo_fn_subtree_t get_data;  /**< Generated subtree function */
     115} sysinfo_subtree_t;
     116
     117/** Sysinfo item
     118 *
     119 */
    48120typedef struct sysinfo_item {
    49         char *name;
    50         union {
    51                 unative_t val;
    52                 void *fn;
    53         } val;
    54 
    55         union {
    56                 struct sysinfo_item *table;
    57                 void *fn;
    58         } subinfo;
    59 
    60         struct sysinfo_item *next;
    61         int val_type;
    62         int subinfo_type;
     121        char *name;                           /**< Item name */
     122       
     123        sysinfo_item_val_type_t val_type;     /**< Item value type */
     124        sysinfo_item_val_t val;               /**< Item value */
     125       
     126        sysinfo_subtree_type_t subtree_type;  /**< Subtree type */
     127        sysinfo_subtree_t subtree;            /**< Subtree */
     128       
     129        struct sysinfo_item *next;            /**< Sibling item */
    63130} sysinfo_item_t;
    64131
    65 #define SYSINFO_VAL_VAL        0
    66 #define SYSINFO_VAL_FUNCTION   1
    67 #define SYSINFO_VAL_UNDEFINED  U_SPECIAL
     132extern void sysinfo_set_item_val(const char *, sysinfo_item_t **, unative_t);
     133extern void sysinfo_set_item_data(const char *, sysinfo_item_t **, void *,
     134    size_t);
     135extern void sysinfo_set_item_fn_val(const char *, sysinfo_item_t **,
     136    sysinfo_fn_val_t);
     137extern void sysinfo_set_item_fn_data(const char *, sysinfo_item_t **,
     138    sysinfo_fn_data_t);
     139extern void sysinfo_set_item_undefined(const char *, sysinfo_item_t **);
    68140
    69 #define SYSINFO_SUBINFO_NONE      0
    70 #define SYSINFO_SUBINFO_TABLE     1
    71 #define SYSINFO_SUBINFO_FUNCTION  2
     141extern void sysinfo_set_subtree_fn(const char *, sysinfo_item_t **,
     142    sysinfo_fn_subtree_t);
    72143
    73 typedef unative_t (*sysinfo_val_fn_t)(sysinfo_item_t *root);
    74 typedef unative_t (*sysinfo_subinfo_fn_t)(const char *subname);
     144extern void sysinfo_init(void);
     145extern void sysinfo_dump(sysinfo_item_t *);
    75146
    76 typedef struct sysinfo_rettype {
    77         unative_t val;
    78         unative_t valid;
    79 } sysinfo_rettype_t;
    80 
    81 void sysinfo_set_item_val(const char *name, sysinfo_item_t **root, unative_t val);
    82 void sysinfo_dump(sysinfo_item_t **root, int depth);
    83 void sysinfo_set_item_function(const char *name, sysinfo_item_t **root, sysinfo_val_fn_t fn);
    84 void sysinfo_set_item_undefined(const char *name, sysinfo_item_t **root);
    85 
    86 sysinfo_rettype_t sysinfo_get_val(const char *name, sysinfo_item_t **root);
    87 
    88 unative_t sys_sysinfo_valid(unative_t ptr, unative_t len);
    89 unative_t sys_sysinfo_value(unative_t ptr, unative_t len);
     147extern unative_t sys_sysinfo_get_tag(void *, size_t);
     148extern unative_t sys_sysinfo_get_value(void *, size_t, void *);
     149extern unative_t sys_sysinfo_get_data_size(void *, size_t, void *);
     150extern unative_t sys_sysinfo_get_data(void *, size_t, void *, size_t);
    90151
    91152#endif
  • kernel/generic/include/time/clock.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_CLOCK_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939
    40 #define HZ              100
     40#define HZ  100
    4141
    4242/** Uptime structure */
  • kernel/generic/include/time/delay.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_DELAY_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939
    4040extern void delay(uint32_t microseconds);
  • kernel/generic/include/time/timeout.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_TIMEOUT_H_
    3737
    38 #include <arch/types.h>
     38#include <typedefs.h>
    3939#include <adt/list.h>
    4040#include <cpu.h>
  • kernel/generic/include/typedefs.h

    rcf8cc36 rc47e1a8  
    3636#define KERN_TYPEDEFS_H_
    3737
     38#include <arch/common.h>
    3839#include <arch/types.h>
    3940
    40 #define NULL 0
    41 #define false 0
    42 #define true 1
     41#define NULL  0
     42
     43#define false  0
     44#define true   1
     45
     46typedef struct {
     47        uint64_t lo;
     48        int64_t hi;
     49} int128_t;
     50
     51typedef struct {
     52        uint64_t lo;
     53        uint64_t hi;
     54} uint128_t;
     55
     56typedef struct {
     57        volatile atomic_count_t count;
     58} atomic_t;
    4359
    4460typedef void (* function)();
  • kernel/generic/include/userspace.h

    rcf8cc36 rc47e1a8  
    2727 */
    2828
    29 /** @addtogroup generic 
     29/** @addtogroup generic
    3030 * @{
    3131 */
     
    3737
    3838#include <proc/thread.h>
    39 #include <arch/types.h>
     39#include <typedefs.h>
    4040
    4141/** Switch to user-space (CPU user priviledge level) */
Note: See TracChangeset for help on using the changeset viewer.