Changeset 7f1c620 in mainline for generic/include


Ignore:
Timestamp:
2006-07-04T17:17:56Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0ffa3ef5
Parents:
991779c5
Message:

Replace old u?? types with respective C99 variants (e.g. uint32_t, int64_t, uintptr_t etc.).

Location:
generic/include
Files:
44 edited

Legend:

Unmodified
Added
Removed
  • generic/include/adt/bitmap.h

    r991779c5 r7f1c620  
    4242
    4343typedef struct {
    44         __u8 *map;
     44        uint8_t *map;
    4545        count_t bits;
    4646} bitmap_t;
    4747
    48 extern void bitmap_initialize(bitmap_t *bitmap, __u8 *map, count_t bits);
     48extern void bitmap_initialize(bitmap_t *bitmap, uint8_t *map, count_t bits);
    4949extern void bitmap_set_range(bitmap_t *bitmap, index_t start, count_t bits);
    5050extern void bitmap_clear_range(bitmap_t *bitmap, index_t start, count_t bits);
  • generic/include/adt/btree.h

    r991779c5 r7f1c620  
    4343#define BTREE_MAX_KEYS  (BTREE_M - 1)
    4444
    45 typedef __u64 btree_key_t;
     45typedef uint64_t btree_key_t;
    4646
    4747/** B-tree node structure. */
  • generic/include/adt/hash_table.h

    r991779c5 r7f1c620  
    5656         * @return Index into hash table.
    5757         */
    58         index_t (* hash)(__native key[]);
     58        index_t (* hash)(unative_t key[]);
    5959       
    6060        /** Hash table item comparison function.
     
    6464         * @return true if the keys match, false otherwise.
    6565         */
    66         bool (*compare)(__native key[], count_t keys, link_t *item);
     66        bool (*compare)(unative_t key[], count_t keys, link_t *item);
    6767
    6868        /** Hash table item removal callback.
     
    7676
    7777extern void hash_table_create(hash_table_t *h, count_t m, count_t max_keys, hash_table_operations_t *op);
    78 extern void hash_table_insert(hash_table_t *h, __native key[], link_t *item);
    79 extern link_t *hash_table_find(hash_table_t *h, __native key[]);
    80 extern void hash_table_remove(hash_table_t *h, __native key[], count_t keys);
     78extern void hash_table_insert(hash_table_t *h, unative_t key[], link_t *item);
     79extern link_t *hash_table_find(hash_table_t *h, unative_t key[]);
     80extern void hash_table_remove(hash_table_t *h, unative_t key[], count_t keys);
    8181
    8282#endif
  • generic/include/adt/list.h

    r991779c5 r7f1c620  
    176176}
    177177
    178 #define list_get_instance(link,type,member) (type *)(((__u8*)(link))-((__u8*)&(((type *)NULL)->member)))
     178#define list_get_instance(link,type,member) (type *)(((uint8_t*)(link))-((uint8_t*)&(((type *)NULL)->member)))
    179179
    180180extern bool list_member(const link_t *link, const link_t *head);
  • generic/include/bitops.h

    r991779c5 r7f1c620  
    4343 * If number is zero, it returns 0
    4444 */
    45 static inline int fnzb32(__u32 arg)
     45static inline int fnzb32(uint32_t arg)
    4646{
    4747        int n = 0;
     
    5555}
    5656
    57 static inline int fnzb64(__u64 arg)
     57static inline int fnzb64(uint64_t arg)
    5858{
    5959        int n = 0;
    6060
    6161        if (arg >> 32) { arg >>= 32;n += 32;}
    62         return n + fnzb32((__u32) arg);
     62        return n + fnzb32((uint32_t) arg);
    6363}
    6464
  • generic/include/byteorder.h

    r991779c5 r7f1c620  
    3636#define __BYTEORDER_H__
    3737
    38 static inline __u64 __u64_byteorder_swap(__u64 n)
     38static inline uint64_t uint64_t_byteorder_swap(uint64_t n)
    3939{
    4040        return ((n & 0xff) << 56) |
     
    4848}
    4949
    50 static inline __u32 __u32_byteorder_swap(__u32 n)
     50static inline uint32_t uint32_t_byteorder_swap(uint32_t n)
    5151{
    5252        return ((n & 0xff) << 24) |
  • generic/include/config.h

    r991779c5 r7f1c620  
    4747
    4848typedef struct {
    49         __address addr;
     49        uintptr_t addr;
    5050        size_t size;
    5151} init_task_t;
     
    6060        volatile count_t cpu_active;    /**< Number of processors that are up and running. */
    6161
    62         __address base;
     62        uintptr_t base;
    6363        size_t memory_size;             /**< Size of detected memory in bytes. */
    6464        size_t kernel_size;             /**< Size of memory in bytes taken by kernel and stack */
  • generic/include/console/chardev.h

    r991779c5 r7f1c620  
    6060        waitq_t wq;
    6161        SPINLOCK_DECLARE(lock);         /**< Protects everything below. */
    62         __u8 buffer[CHARDEV_BUFLEN];
     62        uint8_t buffer[CHARDEV_BUFLEN];
    6363        count_t counter;
    6464        chardev_operations_t *op;       /**< Implementation of chardev operations. */
     
    7070                               chardev_t *chardev,
    7171                               chardev_operations_t *op);
    72 extern void chardev_push_character(chardev_t *chardev, __u8 ch);
     72extern void chardev_push_character(chardev_t *chardev, uint8_t ch);
    7373
    7474#endif /* __CHARDEV_H__ */
  • generic/include/console/console.h

    r991779c5 r7f1c620  
    4242extern chardev_t *stdout;
    4343
    44 extern __u8 getc(chardev_t *chardev);
    45 __u8 _getc(chardev_t *chardev);
     44extern uint8_t getc(chardev_t *chardev);
     45uint8_t _getc(chardev_t *chardev);
    4646extern count_t gets(chardev_t *chardev, char *buf, size_t buflen);
    4747extern void putchar(char c);
  • generic/include/console/kconsole.h

    r991779c5 r7f1c620  
    5555        void *buffer;                   /**< Buffer where to store data. */
    5656        size_t len;                     /**< Size of the buffer. */
    57         __native intval;                /**< Integer value */
     57        unative_t intval;                /**< Integer value */
    5858        cmd_arg_type_t vartype;         /**< Resulting type of variable arg */
    5959};
  • generic/include/context.h

    r991779c5 r7f1c620  
    4343#ifndef context_set
    4444#define context_set(c, _pc, stack, size)        \
    45         (c)->pc = (__address) (_pc);            \
    46         (c)->sp = ((__address) (stack)) + (size) - SP_DELTA;
     45        (c)->pc = (uintptr_t) (_pc);            \
     46        (c)->sp = ((uintptr_t) (stack)) + (size) - SP_DELTA;
    4747#endif /* context_set */
    4848
  • generic/include/cpu.h

    r991779c5 r7f1c620  
    8181        int tlb_active;
    8282
    83         __u16 frequency_mhz;
    84         __u32 delay_loop_const;
     83        uint16_t frequency_mhz;
     84        uint32_t delay_loop_const;
    8585
    8686        cpu_arch_t arch;
     
    9191         * Stack used by scheduler when there is no running thread.
    9292         */
    93         __u8 *stack;
     93        uint8_t *stack;
    9494};
    9595
  • generic/include/ddi/ddi.h

    r991779c5 r7f1c620  
    4040#include <typedefs.h>
    4141
    42 __native sys_physmem_map(__native phys_base, __native virt_base, __native pages,
    43                          __native flags);
    44 extern __native sys_iospace_enable(ddi_ioarg_t *uspace_io_arg);
    45 extern __native sys_preempt_control(int enable);
     42unative_t sys_physmem_map(unative_t phys_base, unative_t virt_base, unative_t pages,
     43                         unative_t flags);
     44extern unative_t sys_iospace_enable(ddi_ioarg_t *uspace_io_arg);
     45extern unative_t sys_preempt_control(int enable);
    4646
    4747/*
    4848 * Interface to be implemented by all architectures.
    4949 */
    50 extern int ddi_iospace_enable_arch(task_t *task, __address ioaddr, size_t size);
     50extern int ddi_iospace_enable_arch(task_t *task, uintptr_t ioaddr, size_t size);
    5151
    5252#endif
  • generic/include/debug.h

    r991779c5 r7f1c620  
    3939#include <arch/debug.h>
    4040
    41 #define CALLER       ((__address)__builtin_return_address(0))
     41#define CALLER       ((uintptr_t)__builtin_return_address(0))
    4242
    4343#ifndef HERE
    4444/** Current Instruction Pointer address */
    45 #  define HERE ((__address *)0)
     45#  define HERE ((uintptr_t *)0)
    4646#endif
    4747
     
    5656 */
    5757#ifdef CONFIG_DEBUG
    58 #       define ASSERT(expr) if (!(expr)) { panic("assertion failed (%s), caller=%.*p\n", #expr, sizeof(__address) * 2, CALLER); }
     58#       define ASSERT(expr) if (!(expr)) { panic("assertion failed (%s), caller=%.*p\n", #expr, sizeof(uintptr_t) * 2, CALLER); }
    5959#else
    6060#       define ASSERT(expr)
  • generic/include/elf.h

    r991779c5 r7f1c620  
    194194 * in ELF header.
    195195 */
    196 typedef __u64 elf_xword;
    197 typedef __s64 elf_sxword;
    198 typedef __u32 elf_word;
    199 typedef __s32 elf_sword;
    200 typedef __u16 elf_half;
     196typedef uint64_t elf_xword;
     197typedef int64_t elf_sxword;
     198typedef uint32_t elf_word;
     199typedef int32_t elf_sword;
     200typedef uint16_t elf_half;
    201201
    202202/**
     
    205205 * These types are specific for 32-bit format.
    206206 */
    207 typedef __u32 elf32_addr;
    208 typedef __u32 elf32_off;
     207typedef uint32_t elf32_addr;
     208typedef uint32_t elf32_off;
    209209
    210210/**
     
    213213 * These types are specific for 64-bit format.
    214214 */
    215 typedef __u64 elf64_addr;
    216 typedef __u64 elf64_off;
     215typedef uint64_t elf64_addr;
     216typedef uint64_t elf64_off;
    217217
    218218/** ELF header */
    219219struct elf32_header {
    220         __u8 e_ident[EI_NIDENT];
     220        uint8_t e_ident[EI_NIDENT];
    221221        elf_half e_type;
    222222        elf_half e_machine;
     
    234234};
    235235struct elf64_header {
    236         __u8 e_ident[EI_NIDENT];
     236        uint8_t e_ident[EI_NIDENT];
    237237        elf_half e_type;
    238238        elf_half e_machine;
     
    310310        elf32_addr st_value;
    311311        elf_word st_size;
    312         __u8 st_info;
    313         __u8 st_other;
     312        uint8_t st_info;
     313        uint8_t st_other;
    314314        elf_half st_shndx;
    315315};
    316316struct elf64_symbol {
    317317        elf_word st_name;
    318         __u8 st_info;
    319         __u8 st_other;
     318        uint8_t st_info;
     319        uint8_t st_other;
    320320        elf_half st_shndx;
    321321        elf64_addr st_value;
  • generic/include/func.h

    r991779c5 r7f1c620  
    4747extern int strncmp(const char *src, const char *dst, size_t len);
    4848extern void strncpy(char *dest, const char *src, size_t len);
    49 extern __native atoi(const char *text);
     49extern unative_t atoi(const char *text);
    5050
    5151#endif
  • generic/include/ipc/ipc.h

    r991779c5 r7f1c620  
    165165typedef struct phone_s phone_t;
    166166typedef struct {
    167         __native args[IPC_CALL_LEN];
     167        unative_t args[IPC_CALL_LEN];
    168168        phone_t *phone;
    169169}ipc_data_t;
     
    215215        answerbox_t *callerbox;
    216216
    217         __native private; /**< Private data to internal IPC */
     217        unative_t private; /**< Private data to internal IPC */
    218218
    219219        ipc_data_t data;  /**< Data passed from/to userspace */
     
    221221
    222222extern void ipc_init(void);
    223 extern call_t * ipc_wait_for_call(answerbox_t *box, __u32 usec, int flags);
     223extern call_t * ipc_wait_for_call(answerbox_t *box, uint32_t usec, int flags);
    224224extern void ipc_answer(answerbox_t *box, call_t *request);
    225225extern int ipc_call(phone_t *phone, call_t *call);
     
    235235void ipc_cleanup(void);
    236236int ipc_phone_hangup(phone_t *phone);
    237 extern void ipc_backsend_err(phone_t *phone, call_t *call, __native err);
     237extern void ipc_backsend_err(phone_t *phone, call_t *call, unative_t err);
    238238extern void ipc_print_task(task_id_t taskid);
    239239
  • generic/include/ipc/ipcrsc.h

    r991779c5 r7f1c620  
    3636#define __IPCRSC_H__
    3737
    38 call_t * get_call(__native callid);
     38call_t * get_call(unative_t callid);
    3939int phone_alloc(void);
    4040void phone_connect(int phoneid, answerbox_t *box);
  • generic/include/ipc/irq.h

    r991779c5 r7f1c620  
    8080extern int ipc_irq_register(answerbox_t *box, int irq, irq_code_t *ucode);
    8181extern void ipc_irq_send_notif(int irq);
    82 extern void ipc_irq_send_msg(int irq, __native a1, __native a2, __native a3);
     82extern void ipc_irq_send_msg(int irq, unative_t a1, unative_t a2, unative_t a3);
    8383extern void ipc_irq_unregister(answerbox_t *box, int irq);
    84 extern void irq_ipc_bind_arch(__native irq);
     84extern void irq_ipc_bind_arch(unative_t irq);
    8585extern void ipc_irq_cleanup(answerbox_t *box);
    8686
  • generic/include/ipc/sysipc.h

    r991779c5 r7f1c620  
    4040#include <arch/types.h>
    4141
    42 __native sys_ipc_call_sync_fast(__native phoneid, __native method,
    43                                 __native arg1, ipc_data_t *data);
    44 __native sys_ipc_call_sync(__native phoneid, ipc_data_t *question,
     42unative_t sys_ipc_call_sync_fast(unative_t phoneid, unative_t method,
     43                                unative_t arg1, ipc_data_t *data);
     44unative_t sys_ipc_call_sync(unative_t phoneid, ipc_data_t *question,
    4545                           ipc_data_t *reply);
    46 __native sys_ipc_call_async_fast(__native phoneid, __native method,
    47                                  __native arg1, __native arg2);
    48 __native sys_ipc_call_async(__native phoneid, ipc_data_t *data);
    49 __native sys_ipc_answer_fast(__native callid, __native retval,
    50                              __native arg1, __native arg2);
    51 __native sys_ipc_answer(__native callid, ipc_data_t *data);
    52 __native sys_ipc_wait_for_call(ipc_data_t *calldata, __u32 usec, int nonblocking);
    53 __native sys_ipc_forward_fast(__native callid, __native phoneid,
    54                               __native method, __native arg1);
    55 __native sys_ipc_hangup(int phoneid);
    56 __native sys_ipc_register_irq(int irq, irq_code_t *ucode);
    57 __native sys_ipc_unregister_irq(int irq);
     46unative_t sys_ipc_call_async_fast(unative_t phoneid, unative_t method,
     47                                 unative_t arg1, unative_t arg2);
     48unative_t sys_ipc_call_async(unative_t phoneid, ipc_data_t *data);
     49unative_t sys_ipc_answer_fast(unative_t callid, unative_t retval,
     50                             unative_t arg1, unative_t arg2);
     51unative_t sys_ipc_answer(unative_t callid, ipc_data_t *data);
     52unative_t sys_ipc_wait_for_call(ipc_data_t *calldata, uint32_t usec, int nonblocking);
     53unative_t sys_ipc_forward_fast(unative_t callid, unative_t phoneid,
     54                              unative_t method, unative_t arg1);
     55unative_t sys_ipc_hangup(int phoneid);
     56unative_t sys_ipc_register_irq(int irq, irq_code_t *ucode);
     57unative_t sys_ipc_unregister_irq(int irq);
    5858
    5959#endif
  • generic/include/macros.h

    r991779c5 r7f1c620  
    4747
    4848/** Return true if the interlvals overlap. */
    49 static inline int overlaps(__address s1, size_t sz1, __address s2, size_t sz2)
     49static inline int overlaps(uintptr_t s1, size_t sz1, uintptr_t s2, size_t sz2)
    5050{
    51         __address e1 = s1+sz1;
    52         __address e2 = s2+sz2;
     51        uintptr_t e1 = s1+sz1;
     52        uintptr_t e2 = s2+sz2;
    5353
    5454        return s1 < e2 && s2 < e1;
  • generic/include/memstr.h

    r991779c5 r7f1c620  
    4444 */
    4545extern void *_memcpy(void *dst, const void *src, size_t cnt);
    46 extern void _memsetb(__address dst, size_t cnt, __u8 x);
    47 extern void _memsetw(__address dst, size_t cnt, __u16 x);
     46extern void _memsetb(uintptr_t dst, size_t cnt, uint8_t x);
     47extern void _memsetw(uintptr_t dst, size_t cnt, uint16_t x);
    4848
    4949#endif
  • generic/include/mm/as.h

    r991779c5 r7f1c620  
    124124/** Address space area backend structure. */
    125125typedef struct {
    126         int (* page_fault)(as_area_t *area, __address addr, pf_access_t access);
    127         void (* frame_free)(as_area_t *area, __address page, __address frame);
     126        int (* page_fault)(as_area_t *area, uintptr_t addr, pf_access_t access);
     127        void (* frame_free)(as_area_t *area, uintptr_t page, uintptr_t frame);
    128128        void (* share)(as_area_t *area);
    129129} mem_backend_t;
     
    136136        };
    137137        struct {        /**< phys_backend members */
    138                 __address base;
     138                uintptr_t base;
    139139                count_t frames;
    140140        };
     
    152152        int attributes;         /**< Attributes related to the address space area itself. */
    153153        count_t pages;          /**< Size of this area in multiples of PAGE_SIZE. */
    154         __address base;         /**< Base address of this area. */
     154        uintptr_t base;         /**< Base address of this area. */
    155155        btree_t used_space;     /**< Map of used space. */
    156156        share_info_t *sh_info;  /**< If the address space area has been shared, this pointer will
     
    173173extern void as_destroy(as_t *as);
    174174extern void as_switch(as_t *old, as_t *new);
    175 extern int as_page_fault(__address page, pf_access_t access, istate_t *istate);
    176 
    177 extern as_area_t *as_area_create(as_t *as, int flags, size_t size, __address base, int attrs,
     175extern int as_page_fault(uintptr_t page, pf_access_t access, istate_t *istate);
     176
     177extern as_area_t *as_area_create(as_t *as, int flags, size_t size, uintptr_t base, int attrs,
    178178        mem_backend_t *backend, mem_backend_data_t *backend_data);
    179 extern int as_area_destroy(as_t *as, __address address);       
    180 extern int as_area_resize(as_t *as, __address address, size_t size, int flags);
    181 int as_area_share(as_t *src_as, __address src_base, size_t acc_size,
    182                   as_t *dst_as, __address dst_base, int dst_flags_mask);
     179extern int as_area_destroy(as_t *as, uintptr_t address);       
     180extern int as_area_resize(as_t *as, uintptr_t address, size_t size, int flags);
     181int as_area_share(as_t *src_as, uintptr_t src_base, size_t acc_size,
     182                  as_t *dst_as, uintptr_t dst_base, int dst_flags_mask);
    183183
    184184extern int as_area_get_flags(as_area_t *area);
    185185extern bool as_area_check_access(as_area_t *area, pf_access_t access);
    186 extern size_t as_get_size(__address base);
    187 extern int used_space_insert(as_area_t *a, __address page, count_t count);
    188 extern int used_space_remove(as_area_t *a, __address page, count_t count);
     186extern size_t as_get_size(uintptr_t base);
     187extern int used_space_insert(as_area_t *a, uintptr_t page, count_t count);
     188extern int used_space_remove(as_area_t *a, uintptr_t page, count_t count);
    189189
    190190/* Interface to be implemented by architectures. */
     
    199199
    200200/* Address space area related syscalls. */
    201 extern __native sys_as_area_create(__address address, size_t size, int flags);
    202 extern __native sys_as_area_resize(__address address, size_t size, int flags);
    203 extern __native sys_as_area_destroy(__address address);
     201extern unative_t sys_as_area_create(uintptr_t address, size_t size, int flags);
     202extern unative_t sys_as_area_resize(uintptr_t address, size_t size, int flags);
     203extern unative_t sys_as_area_destroy(uintptr_t address);
    204204
    205205#endif /* KERNEL */
  • generic/include/mm/buddy.h

    r991779c5 r7f1c620  
    4646        link_t *(* bisect)(buddy_system_t *, link_t *);                 /**< Bisect the block passed as argument and return pointer to the new right-side buddy. */
    4747        link_t *(* coalesce)(buddy_system_t *, link_t *, link_t *);     /**< Coalesce two buddies into a bigger block. */
    48         void (*set_order)(buddy_system_t *, link_t *, __u8);            /**< Set order of block passed as argument. */
    49         __u8 (*get_order)(buddy_system_t *, link_t *);                  /**< Return order of block passed as argument. */
     48        void (*set_order)(buddy_system_t *, link_t *, uint8_t);         /**< Set order of block passed as argument. */
     49        uint8_t (*get_order)(buddy_system_t *, link_t *);                       /**< Return order of block passed as argument. */
    5050        void (*mark_busy)(buddy_system_t *, link_t *);                  /**< Mark block as busy. */
    5151        void (*mark_available)(buddy_system_t *, link_t *);             /**< Mark block as available. */
    5252        /** Find parent of block that has given order  */
    53         link_t *(* find_block)(buddy_system_t *, link_t *, __u8);
     53        link_t *(* find_block)(buddy_system_t *, link_t *, uint8_t);
    5454        void (* print_id)(buddy_system_t *, link_t *);
    5555};
    5656
    5757struct buddy_system {
    58         __u8 max_order;                         /**< Maximal order of block which can be stored by buddy system. */
     58        uint8_t max_order;                              /**< Maximal order of block which can be stored by buddy system. */
    5959        link_t *order;
    6060        buddy_system_operations_t *op;
     
    6363
    6464extern void buddy_system_create(buddy_system_t *b,
    65                                 __u8 max_order,
     65                                uint8_t max_order,
    6666                                buddy_system_operations_t *op, void *data);
    67 extern link_t *buddy_system_alloc(buddy_system_t *b, __u8 i);
    68 extern bool buddy_system_can_alloc(buddy_system_t *b, __u8 order);
     67extern link_t *buddy_system_alloc(buddy_system_t *b, uint8_t i);
     68extern bool buddy_system_can_alloc(buddy_system_t *b, uint8_t order);
    6969extern void buddy_system_free(buddy_system_t *b, link_t *block);
    7070extern void buddy_system_structure_print(buddy_system_t *b, size_t elem_size);
  • generic/include/mm/frame.h

    r991779c5 r7f1c620  
    6666#define FRAME_ERROR             2       /* frame_alloc return status */
    6767
    68 static inline __address PFN2ADDR(pfn_t frame)
     68static inline uintptr_t PFN2ADDR(pfn_t frame)
    6969{
    70         return (__address)(frame << FRAME_WIDTH);
     70        return (uintptr_t)(frame << FRAME_WIDTH);
    7171}
    7272
    73 static inline pfn_t ADDR2PFN(__address addr)
     73static inline pfn_t ADDR2PFN(uintptr_t addr)
    7474{
    7575        return (pfn_t)(addr >> FRAME_WIDTH);
     
    8383}
    8484
    85 #define IS_BUDDY_ORDER_OK(index, order)         ((~(((__native) -1) << (order)) & (index)) == 0)
     85#define IS_BUDDY_ORDER_OK(index, order)         ((~(((unative_t) -1) << (order)) & (index)) == 0)
    8686#define IS_BUDDY_LEFT_BLOCK(zone, frame)        (((frame_index((zone), (frame)) >> (frame)->buddy_order) & 0x1) == 0)
    8787#define IS_BUDDY_RIGHT_BLOCK(zone, frame)       (((frame_index((zone), (frame)) >> (frame)->buddy_order) & 0x1) == 1)
     
    9292
    9393extern void frame_init(void);
    94 extern void * frame_alloc_generic(__u8 order, int flags, int *pzone);
    95 extern void frame_free(__address frame);
     94extern void * frame_alloc_generic(uint8_t order, int flags, int *pzone);
     95extern void frame_free(uintptr_t frame);
    9696extern void frame_reference_add(pfn_t pfn);
    9797
     
    100100void frame_set_parent(pfn_t frame, void *data, int hint);
    101101void frame_mark_unavailable(pfn_t start, count_t count);
    102 __address zone_conf_size(count_t count);
     102uintptr_t zone_conf_size(count_t count);
    103103void zone_merge(int z1, int z2);
    104104void zone_merge_all(void);
  • generic/include/mm/page.h

    r991779c5 r7f1c620  
    7777/** Operations to manipulate page mappings. */
    7878struct page_mapping_operations {
    79         void (* mapping_insert)(as_t *as, __address page, __address frame, int flags);
    80         void (* mapping_remove)(as_t *as, __address page);
    81         pte_t *(* mapping_find)(as_t *as, __address page);
     79        void (* mapping_insert)(as_t *as, uintptr_t page, uintptr_t frame, int flags);
     80        void (* mapping_remove)(as_t *as, uintptr_t page);
     81        pte_t *(* mapping_find)(as_t *as, uintptr_t page);
    8282};
    8383typedef struct page_mapping_operations page_mapping_operations_t;
     
    8888extern void page_table_lock(as_t *as, bool lock);
    8989extern void page_table_unlock(as_t *as, bool unlock);
    90 extern void page_mapping_insert(as_t *as, __address page, __address frame, int flags);
    91 extern void page_mapping_remove(as_t *as, __address page);
    92 extern pte_t *page_mapping_find(as_t *as, __address page);
     90extern void page_mapping_insert(as_t *as, uintptr_t page, uintptr_t frame, int flags);
     91extern void page_mapping_remove(as_t *as, uintptr_t page);
     92extern pte_t *page_mapping_find(as_t *as, uintptr_t page);
    9393extern pte_t *page_table_create(int flags);
    9494extern void page_table_destroy(pte_t *page_table);
    95 extern void map_structure(__address s, size_t size);
    96 extern __address hw_map(__address physaddr, size_t size);
     95extern void map_structure(uintptr_t s, size_t size);
     96extern uintptr_t hw_map(uintptr_t physaddr, size_t size);
    9797
    9898#endif
  • generic/include/mm/slab.h

    r991779c5 r7f1c620  
    9191
    9292        /* Computed values */
    93         __u8 order;        /**< Order of frames to be allocated */
     93        uint8_t order;        /**< Order of frames to be allocated */
    9494        int objects;      /**< Number of objects that fit in */
    9595
  • generic/include/mm/tlb.h

    r991779c5 r7f1c620  
    5959        tlb_invalidate_type_t type;     /**< Message type. */
    6060        asid_t asid;                    /**< Address space identifier. */
    61         __address page;                 /**< Page address. */
     61        uintptr_t page;                 /**< Page address. */
    6262        count_t count;                  /**< Number of pages to invalidate. */
    6363};
     
    6767
    6868#ifdef CONFIG_SMP
    69 extern void tlb_shootdown_start(tlb_invalidate_type_t type, asid_t asid, __address page, count_t count);
     69extern void tlb_shootdown_start(tlb_invalidate_type_t type, asid_t asid, uintptr_t page, count_t count);
    7070extern void tlb_shootdown_finalize(void);
    7171extern void tlb_shootdown_ipi_recv(void);
     
    8484extern void tlb_invalidate_all(void);
    8585extern void tlb_invalidate_asid(asid_t asid);
    86 extern void tlb_invalidate_pages(asid_t asid, __address page, count_t cnt);
     86extern void tlb_invalidate_pages(asid_t asid, uintptr_t page, count_t cnt);
    8787#endif
    8888
  • generic/include/proc/task.h

    r991779c5 r7f1c620  
    103103#endif
    104104
    105 extern __native sys_task_get_id(task_id_t *uspace_task_id);
     105extern unative_t sys_task_get_id(task_id_t *uspace_task_id);
    106106
    107107#endif
  • generic/include/proc/thread.h

    r991779c5 r7f1c620  
    143143        task_t *task;                           /**< Containing task. */
    144144
    145         __u64 ticks;                            /**< Ticks before preemption. */
     145        uint64_t ticks;                         /**< Ticks before preemption. */
    146146
    147147        int priority;                           /**< Thread's priority. Implemented as index to CPU->rq */
    148         __u32 tid;                              /**< Thread ID. */
     148        uint32_t tid;                           /**< Thread ID. */
    149149       
    150150        thread_arch_t arch;                     /**< Architecture-specific data. */
    151151
    152         __u8 *kstack;                           /**< Thread's kernel stack. */
     152        uint8_t *kstack;                                /**< Thread's kernel stack. */
    153153};
    154154
     
    172172#endif
    173173
    174 extern void thread_sleep(__u32 sec);
    175 extern void thread_usleep(__u32 usec);
     174extern void thread_sleep(uint32_t sec);
     175extern void thread_usleep(uint32_t usec);
    176176
    177177#define thread_join(t)  thread_join_timeout((t), SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NONE)
    178 extern int thread_join_timeout(thread_t *t, __u32 usec, int flags);
     178extern int thread_join_timeout(thread_t *t, uint32_t usec, int flags);
    179179extern void thread_detach(thread_t *t);
    180180
     
    188188
    189189/** Thread syscall prototypes. */
    190 __native sys_thread_create(uspace_arg_t *uspace_uarg, char *uspace_name);
    191 __native sys_thread_exit(int uspace_status);
     190unative_t sys_thread_create(uspace_arg_t *uspace_uarg, char *uspace_name);
     191unative_t sys_thread_exit(int uspace_status);
    192192
    193193#endif
  • generic/include/security/cap.h

    r991779c5 r7f1c620  
    8080#define CAP_IRQ_REG             (1<<4)
    8181
    82 typedef __u32 cap_t;
     82typedef uint32_t cap_t;
    8383
    8484extern void cap_set(task_t *t, cap_t caps);
    8585extern cap_t cap_get(task_t *t);
    8686
    87 extern __native sys_cap_grant(sysarg64_t *uspace_taskid_arg, cap_t caps);
    88 extern __native sys_cap_revoke(sysarg64_t *uspace_taskid_arg, cap_t caps);
     87extern unative_t sys_cap_grant(sysarg64_t *uspace_taskid_arg, cap_t caps);
     88extern unative_t sys_cap_revoke(sysarg64_t *uspace_taskid_arg, cap_t caps);
    8989
    9090#endif
  • generic/include/sort.h

    r991779c5 r7f1c620  
    4848 */
    4949extern int int_cmp(void * a, void * b);
    50 extern int __u32_cmp(void * a, void * b);
    51 extern int __u16_cmp(void * a, void * b);
    52 extern int __u8_cmp(void * a, void * b);
     50extern int uint32_t_cmp(void * a, void * b);
     51extern int uint16_t_cmp(void * a, void * b);
     52extern int uint8_t_cmp(void * a, void * b);
    5353
    5454#endif
  • generic/include/stackarg.h

    r991779c5 r7f1c620  
    4646typedef struct va_list {
    4747        int pos;
    48         __u8 *last;
     48        uint8_t *last;
    4949} va_list;
    5050
    5151#define va_start(ap, lst)               \
    5252        (ap).pos = sizeof(lst);                         \
    53         (ap).last = (__u8 *) &(lst)
     53        (ap).last = (uint8_t *) &(lst)
    5454
    5555#define va_arg(ap, type)                \
  • generic/include/symtab.h

    r991779c5 r7f1c620  
    4141
    4242struct symtab_entry {
    43         __u64 address_le;
     43        uint64_t address_le;
    4444        char symbol_name[MAX_SYMBOL_NAME];
    4545};
    4646
    47 extern char * get_symtab_entry(__native addr);
    48 extern __address get_symbol_addr(const char *name);
     47extern char * get_symtab_entry(unative_t addr);
     48extern uintptr_t get_symbol_addr(const char *name);
    4949extern void symtab_print_search(const char *name);
    5050extern int symtab_compl(char *name);
  • generic/include/synch/condvar.h

    r991779c5 r7f1c620  
    5353extern void condvar_signal(condvar_t *cv);
    5454extern void condvar_broadcast(condvar_t *cv);
    55 extern int _condvar_wait_timeout(condvar_t *cv, mutex_t *mtx, __u32 usec, int flags);
     55extern int _condvar_wait_timeout(condvar_t *cv, mutex_t *mtx, uint32_t usec, int flags);
    5656
    5757#endif
  • generic/include/synch/futex.h

    r991779c5 r7f1c620  
    2727 */
    2828
    29  /** @addtogroup sync
     29/** @addtogroup sync
    3030 * @{
    3131 */
     
    4444/** Kernel-side futex structure. */
    4545struct futex {
    46         __address paddr;        /**< Physical address of the status variable. */
     46        uintptr_t paddr;        /**< Physical address of the status variable. */
    4747        waitq_t wq;             /**< Wait queue for threads waiting for futex availability. */
    4848        link_t ht_link;         /**< Futex hash table link. */
     
    5151
    5252extern void futex_init(void);
    53 extern __native sys_futex_sleep_timeout(__address uaddr, __u32 usec, int flags);
    54 extern __native sys_futex_wakeup(__address uaddr);
     53extern unative_t sys_futex_sleep_timeout(uintptr_t uaddr, uint32_t usec, int flags);
     54extern unative_t sys_futex_wakeup(uintptr_t uaddr);
    5555
    5656extern void futex_cleanup(void);
     
    5858#endif
    5959
    60  /** @}
     60/** @}
    6161 */
    6262
  • generic/include/synch/mutex.h

    r991779c5 r7f1c620  
    5555
    5656extern void mutex_initialize(mutex_t *mtx);
    57 extern int _mutex_lock_timeout(mutex_t *mtx, __u32 usec, int flags);
     57extern int _mutex_lock_timeout(mutex_t *mtx, uint32_t usec, int flags);
    5858extern void mutex_unlock(mutex_t *mtx);
    5959
  • generic/include/synch/rwlock.h

    r991779c5 r7f1c620  
    7070extern void rwlock_read_unlock(rwlock_t *rwl);
    7171extern void rwlock_write_unlock(rwlock_t *rwl);
    72 extern int _rwlock_read_lock_timeout(rwlock_t *rwl, __u32 usec, int flags);
    73 extern int _rwlock_write_lock_timeout(rwlock_t *rwl, __u32 usec, int flags);
     72extern int _rwlock_read_lock_timeout(rwlock_t *rwl, uint32_t usec, int flags);
     73extern int _rwlock_write_lock_timeout(rwlock_t *rwl, uint32_t usec, int flags);
    7474
    7575#endif
  • generic/include/synch/semaphore.h

    r991779c5 r7f1c620  
    5454
    5555extern void semaphore_initialize(semaphore_t *s, int val);
    56 extern int _semaphore_down_timeout(semaphore_t *s, __u32 usec, int flags);
     56extern int _semaphore_down_timeout(semaphore_t *s, uint32_t usec, int flags);
    5757extern void semaphore_up(semaphore_t *s);
    5858
  • generic/include/synch/waitq.h

    r991779c5 r7f1c620  
    6262
    6363extern void waitq_initialize(waitq_t *wq);
    64 extern int waitq_sleep_timeout(waitq_t *wq, __u32 usec, int flags);
     64extern int waitq_sleep_timeout(waitq_t *wq, uint32_t usec, int flags);
    6565extern ipl_t waitq_sleep_prepare(waitq_t *wq);
    66 extern int waitq_sleep_timeout_unsafe(waitq_t *wq, __u32 usec, int flags);
     66extern int waitq_sleep_timeout_unsafe(waitq_t *wq, uint32_t usec, int flags);
    6767extern void waitq_sleep_finish(waitq_t *wq, int rc, ipl_t ipl);
    6868extern void waitq_wakeup(waitq_t *wq, bool all);
  • generic/include/syscall/syscall.h

    r991779c5 r7f1c620  
    7474#include <typedefs.h>
    7575
    76 typedef __native (*syshandler_t)();
     76typedef unative_t (*syshandler_t)();
    7777
    7878extern syshandler_t syscall_table[SYSCALL_END];
    79 extern __native syscall_handler(__native a1, __native a2, __native a3,
    80                                 __native a4, __native id);
    81 extern __native sys_tls_set(__native addr);
     79extern unative_t syscall_handler(unative_t a1, unative_t a2, unative_t a3,
     80                                unative_t a4, unative_t id);
     81extern unative_t sys_tls_set(unative_t addr);
    8282
    8383
  • generic/include/sysinfo/sysinfo.h

    r991779c5 r7f1c620  
    3737typedef union sysinfo_item_val
    3838{
    39         __native val;
     39        unative_t val;
    4040        void *fn;
    4141}sysinfo_item_val_t;
     
    4646        union
    4747        {
    48                 __native val;
     48                unative_t val;
    4949                void *fn;
    5050        }val;
     
    7070
    7171
    72 typedef __native (*sysinfo_val_fn_t)(sysinfo_item_t *root);
    73 typedef __native (*sysinfo_subinfo_fn_t)(const char *subname);
     72typedef unative_t (*sysinfo_val_fn_t)(sysinfo_item_t *root);
     73typedef unative_t (*sysinfo_subinfo_fn_t)(const char *subname);
    7474
    7575typedef struct sysinfo_rettype
    7676{
    77         __native val;
    78         __native valid;
     77        unative_t val;
     78        unative_t valid;
    7979}sysinfo_rettype_t;
    8080
    81 void sysinfo_set_item_val(const char *name,sysinfo_item_t **root,__native val);
     81void sysinfo_set_item_val(const char *name,sysinfo_item_t **root,unative_t val);
    8282void sysinfo_dump(sysinfo_item_t **root,int depth);
    8383void sysinfo_set_item_function(const char *name,sysinfo_item_t **root,sysinfo_val_fn_t fn);
     
    8686sysinfo_rettype_t sysinfo_get_val(const char *name,sysinfo_item_t **root);
    8787
    88 __native sys_sysinfo_valid(__native ptr,__native len);
    89 __native sys_sysinfo_value(__native ptr,__native len);
     88unative_t sys_sysinfo_valid(unative_t ptr,unative_t len);
     89unative_t sys_sysinfo_value(unative_t ptr,unative_t len);
    9090
    9191
  • generic/include/time/delay.h

    r991779c5 r7f1c620  
    3838#include <arch/types.h>
    3939
    40 extern void delay(__u32 microseconds);
     40extern void delay(uint32_t microseconds);
    4141
    4242#endif
  • generic/include/time/timeout.h

    r991779c5 r7f1c620  
    4141#include <adt/list.h>
    4242
    43 #define us2ticks(us)    ((__u64)(((__u32) (us)/(1000000/HZ))))
     43#define us2ticks(us)    ((uint64_t)(((uint32_t) (us)/(1000000/HZ))))
    4444
    4545typedef void (* timeout_handler_t)(void *arg);
     
    5050        link_t link;                    /**< Link to the list of active timeouts on THE->cpu */
    5151       
    52         __u64 ticks;                    /**< Timeout will be activated in this amount of clock() ticks. */
     52        uint64_t ticks;                 /**< Timeout will be activated in this amount of clock() ticks. */
    5353
    5454        timeout_handler_t handler;      /**< Function that will be called on timeout activation. */
     
    6161extern void timeout_initialize(timeout_t *t);
    6262extern void timeout_reinitialize(timeout_t *t);
    63 extern void timeout_register(timeout_t *t, __u64 usec, timeout_handler_t f, void *arg);
     63extern void timeout_register(timeout_t *t, uint64_t usec, timeout_handler_t f, void *arg);
    6464extern bool timeout_unregister(timeout_t *t);
    6565
Note: See TracChangeset for help on using the changeset viewer.