Changeset 96b02eb9 in mainline for kernel/generic/src/udebug/udebug_ops.c
- Timestamp:
- 2010-12-14T12:52:38Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6b10dab
- Parents:
- 554debd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/udebug/udebug_ops.c
r554debd r96b02eb9 371 371 372 372 /* 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); 374 374 375 375 mutex_lock(&TASK->udebug.lock); … … 385 385 /* Copy down the thread IDs */ 386 386 387 size_t max_ids = buf_size / sizeof( unative_t);387 size_t max_ids = buf_size / sizeof(sysarg_t); 388 388 size_t copied_ids = 0; 389 389 size_t extra_ids = 0; … … 404 404 if (copied_ids < max_ids) { 405 405 /* Using thread struct pointer as identification hash */ 406 id_buffer[copied_ids++] = ( unative_t) thread;406 id_buffer[copied_ids++] = (sysarg_t) thread; 407 407 } else 408 408 extra_ids++; … … 414 414 415 415 *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); 418 418 419 419 return 0; … … 463 463 { 464 464 /* 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); 466 466 467 467 /* On success, this will lock t->udebug.lock. */ … … 478 478 479 479 /* 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)); 481 481 482 482 _thread_op_end(thread); … … 539 539 * 540 540 */ 541 int udebug_mem_read( unative_t uspace_addr, size_t n, void **buffer)541 int udebug_mem_read(sysarg_t uspace_addr, size_t n, void **buffer) 542 542 { 543 543 /* Verify task state */
Note:
See TracChangeset
for help on using the changeset viewer.