Ignore:
Timestamp:
2010-12-14T12:52:38Z (14 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)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.