Changeset 3e828ea in mainline for abi/include/_bits/native.h


Ignore:
Timestamp:
2019-09-23T12:49:29Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9be2358
Parents:
9259d20 (diff), 1a4ec93f (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.
git-author:
Jiri Svoboda <jiri@…> (2019-09-22 12:49:07)
git-committer:
Jiri Svoboda <jiri@…> (2019-09-23 12:49:29)
Message:

Merge changes from master, especially Meson build

File:
1 edited

Legend:

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

    r9259d20 r3e828ea  
    4747
    4848#include <inttypes.h>
     49#include <_bits/decls.h>
     50
     51__HELENOS_DECLS_BEGIN;
    4952
    5053typedef uintptr_t pfn_t;
     
    5356typedef intptr_t  native_t;
    5457
    55 #define PRIdn  PRIdPTR  /**< Format for native_t. */
    56 #define PRIun  PRIuPTR  /**< Format for sysarg_t. */
    57 #define PRIxn  PRIxPTR  /**< Format for hexadecimal sysarg_t. */
     58#ifdef KERNEL
     59
     60typedef sysarg_t uspace_addr_t;
     61/* We might implement a way to check validity of the type some day. */
     62#define uspace_ptr(type) uspace_addr_t
     63#define USPACE_NULL 0
     64
     65#else /* !KERNEL */
     66
     67typedef void *uspace_addr_t;
     68#define uspace_ptr(type) type *
     69
     70#endif
     71
     72// TODO: Put this in a better location.
     73#define uspace_ptr_as_area_info_t uspace_ptr(as_area_info_t)
     74#define uspace_ptr_as_area_pager_info_t uspace_ptr(as_area_pager_info_t)
     75#define uspace_ptr_cap_irq_handle_t uspace_ptr(cap_irq_handle_t)
     76#define uspace_ptr_cap_phone_handle_t uspace_ptr(cap_phone_handle_t)
     77#define uspace_ptr_cap_waitq_handle_t uspace_ptr(cap_waitq_handle_t)
     78#define uspace_ptr_char uspace_ptr(char)
     79#define uspace_ptr_const_char uspace_ptr(const char)
     80#define uspace_ptr_ddi_ioarg_t uspace_ptr(ddi_ioarg_t)
     81#define uspace_ptr_ipc_data_t uspace_ptr(ipc_data_t)
     82#define uspace_ptr_irq_code_t uspace_ptr(irq_code_t)
     83#define uspace_ptr_size_t uspace_ptr(size_t)
     84#define uspace_ptr_struct_uspace_arg uspace_ptr(struct uspace_arg)
     85#define uspace_ptr_sysarg64_t uspace_ptr(sysarg64_t)
     86#define uspace_ptr_task_id_t uspace_ptr(task_id_t)
     87#define uspace_ptr_thread_id_t uspace_ptr(thread_id_t)
     88#define uspace_ptr_uintptr_t uspace_ptr(uintptr_t)
     89#define uspace_ptr_uspace_arg_t uspace_ptr(uspace_arg_t)
     90#define uspace_ptr_uspace_thread_function_t uspace_ptr(uspace_thread_function_t)
     91
     92__HELENOS_DECLS_END;
    5893
    5994#endif
Note: See TracChangeset for help on using the changeset viewer.