Changeset 96b02eb9 in mainline for kernel/generic/src/udebug


Ignore:
Timestamp:
2010-12-14T12:52:38Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6b10dab
Parents:
554debd
Message:

more unification of basic types

  • use sysarg_t and native_t (unsigned and signed variant) in both kernel and uspace
  • remove ipcarg_t in favour of sysarg_t

(no change in functionality)

Location:
kernel/generic/src/udebug
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/udebug/udebug.c

    r554debd r96b02eb9  
    219219 *
    220220 */
    221 void udebug_syscall_event(unative_t a1, unative_t a2, unative_t a3,
    222     unative_t a4, unative_t a5, unative_t a6, unative_t id, unative_t rc,
     221void udebug_syscall_event(sysarg_t a1, sysarg_t a2, sysarg_t a3,
     222    sysarg_t a4, sysarg_t a5, sysarg_t a6, sysarg_t id, sysarg_t rc,
    223223    bool end_variant)
    224224{
     
    314314        IPC_SET_RETVAL(call->data, 0);
    315315        IPC_SET_ARG1(call->data, UDEBUG_EVENT_THREAD_B);
    316         IPC_SET_ARG2(call->data, (unative_t) thread);
     316        IPC_SET_ARG2(call->data, (sysarg_t) thread);
    317317       
    318318        /*
  • kernel/generic/src/udebug/udebug_ipc.c

    r554debd r96b02eb9  
    210210static void udebug_receive_name_read(call_t *call)
    211211{
    212         unative_t uspace_addr;
    213         unative_t to_copy;
     212        sysarg_t uspace_addr;
     213        sysarg_t to_copy;
    214214        size_t data_size;
    215215        size_t buf_size;
     
    257257static void udebug_receive_areas_read(call_t *call)
    258258{
    259         unative_t uspace_addr;
    260         unative_t to_copy;
     259        sysarg_t uspace_addr;
     260        sysarg_t to_copy;
    261261        size_t data_size;
    262262        size_t buf_size;
     
    304304{
    305305        thread_t *t;
    306         unative_t uspace_addr;
     306        sysarg_t uspace_addr;
    307307        int rc;
    308308        void *buffer;
     
    328328           (no way to distinguish method in answer) */
    329329        IPC_SET_ARG1(call->data, uspace_addr);
    330         IPC_SET_ARG2(call->data, 6 * sizeof(unative_t));
     330        IPC_SET_ARG2(call->data, 6 * sizeof(sysarg_t));
    331331        call->buffer = buffer;
    332332
     
    341341{
    342342        thread_t *t;
    343         unative_t uspace_addr;
    344         unative_t to_copy;
     343        sysarg_t uspace_addr;
     344        sysarg_t to_copy;
    345345        void *buffer;
    346346        int rc;
     
    382382static void udebug_receive_mem_read(call_t *call)
    383383{
    384         unative_t uspace_dst;
    385         unative_t uspace_src;
     384        sysarg_t uspace_dst;
     385        sysarg_t uspace_src;
    386386        unsigned size;
    387387        void *buffer;
  • kernel/generic/src/udebug/udebug_ops.c

    r554debd r96b02eb9  
    371371       
    372372        /* Allocate a buffer to hold thread IDs */
    373         unative_t *id_buffer = malloc(buf_size + 1, 0);
     373        sysarg_t *id_buffer = malloc(buf_size + 1, 0);
    374374       
    375375        mutex_lock(&TASK->udebug.lock);
     
    385385        /* Copy down the thread IDs */
    386386       
    387         size_t max_ids = buf_size / sizeof(unative_t);
     387        size_t max_ids = buf_size / sizeof(sysarg_t);
    388388        size_t copied_ids = 0;
    389389        size_t extra_ids = 0;
     
    404404                if (copied_ids < max_ids) {
    405405                        /* Using thread struct pointer as identification hash */
    406                         id_buffer[copied_ids++] = (unative_t) thread;
     406                        id_buffer[copied_ids++] = (sysarg_t) thread;
    407407                } else
    408408                        extra_ids++;
     
    414414       
    415415        *buffer = id_buffer;
    416         *stored = copied_ids * sizeof(unative_t);
    417         *needed = (copied_ids + extra_ids) * sizeof(unative_t);
     416        *stored = copied_ids * sizeof(sysarg_t);
     417        *needed = (copied_ids + extra_ids) * sizeof(sysarg_t);
    418418       
    419419        return 0;
     
    463463{
    464464        /* Prepare a buffer to hold the arguments. */
    465         unative_t *arg_buffer = malloc(6 * sizeof(unative_t), 0);
     465        sysarg_t *arg_buffer = malloc(6 * sizeof(sysarg_t), 0);
    466466       
    467467        /* On success, this will lock t->udebug.lock. */
     
    478478       
    479479        /* Copy to a local buffer before releasing the lock. */
    480         memcpy(arg_buffer, thread->udebug.syscall_args, 6 * sizeof(unative_t));
     480        memcpy(arg_buffer, thread->udebug.syscall_args, 6 * sizeof(sysarg_t));
    481481       
    482482        _thread_op_end(thread);
     
    539539 *
    540540 */
    541 int udebug_mem_read(unative_t uspace_addr, size_t n, void **buffer)
     541int udebug_mem_read(sysarg_t uspace_addr, size_t n, void **buffer)
    542542{
    543543        /* Verify task state */
Note: See TracChangeset for help on using the changeset viewer.