Changeset 201abde in mainline for kernel/generic/src
- Timestamp:
- 2007-04-07T20:06:52Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7e58979
- Parents:
- 6adbe3c2
- Location:
- kernel/generic/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/adt/btree.c
r6adbe3c2 r201abde 971 971 printf("("); 972 972 for (i = 0; i < node->keys; i++) { 973 printf("%ll d%s", node->key[i], i < node->keys - 1 ? "," : "");973 printf("%llu%s", node->key[i], i < node->keys - 1 ? "," : ""); 974 974 if (node->depth && node->subtree[i]) { 975 975 list_append(&node->subtree[i]->bfs_link, &head); … … 993 993 printf("("); 994 994 for (i = 0; i < node->keys; i++) 995 printf("%ll d%s", node->key[i], i < node->keys - 1 ? "," : "");995 printf("%llu%s", node->key[i], i < node->keys - 1 ? "," : ""); 996 996 printf(")"); 997 997 } -
kernel/generic/src/console/cmd.c
r6adbe3c2 r201abde 714 714 int cmd_set4(cmd_arg_t *argv) 715 715 { 716 uint32_t *addr 716 uint32_t *addr; 717 717 uint32_t arg1 = argv[1].intval; 718 718 bool pointer = false; -
kernel/generic/src/ipc/ipc.c
r6adbe3c2 r201abde 503 503 for (tmp=task->answerbox.calls.next; tmp != &task->answerbox.calls;tmp = tmp->next) { 504 504 call = list_get_instance(tmp, call_t, link); 505 printf("Callid: %p Srctask:%ll dM:%d A1:%d A2:%d A3:%d Flags:%x\n",call,505 printf("Callid: %p Srctask:%llu M:%d A1:%d A2:%d A3:%d Flags:%x\n",call, 506 506 call->sender->taskid, IPC_GET_METHOD(call->data), IPC_GET_ARG1(call->data), 507 507 IPC_GET_ARG2(call->data), IPC_GET_ARG3(call->data), call->flags); … … 513 513 tmp = tmp->next) { 514 514 call = list_get_instance(tmp, call_t, link); 515 printf("Callid: %p Srctask:%ll dM:%d A1:%d A2:%d A3:%d Flags:%x\n",call,515 printf("Callid: %p Srctask:%llu M:%d A1:%d A2:%d A3:%d Flags:%x\n",call, 516 516 call->sender->taskid, IPC_GET_METHOD(call->data), IPC_GET_ARG1(call->data), 517 517 IPC_GET_ARG2(call->data), IPC_GET_ARG3(call->data), call->flags); -
kernel/generic/src/proc/scheduler.c
r6adbe3c2 r201abde 451 451 * Entering state is unexpected. 452 452 */ 453 panic("tid% d: unexpected state %s\n", THREAD->tid,453 panic("tid%llu: unexpected state %s\n", THREAD->tid, 454 454 thread_states[THREAD->state]); 455 455 break; … … 504 504 505 505 #ifdef SCHEDULER_VERBOSE 506 printf("cpu%d: tid % d (priority=%d, ticks=%lld, nrdy=%ld)\n",506 printf("cpu%d: tid %llu (priority=%d, ticks=%llu, nrdy=%ld)\n", 507 507 CPU->id, THREAD->tid, THREAD->priority, THREAD->ticks, 508 508 atomic_get(&CPU->nrdy)); … … 640 640 spinlock_lock(&t->lock); 641 641 #ifdef KCPULB_VERBOSE 642 printf("kcpulb%d: TID % d-> cpu%d, nrdy=%ld, "642 printf("kcpulb%d: TID %llu -> cpu%d, nrdy=%ld, " 643 643 "avg=%nd\n", CPU->id, t->tid, CPU->id, 644 644 atomic_get(&CPU->nrdy), … … 723 723 cur = cur->next) { 724 724 t = list_get_instance(cur, thread_t, rq_link); 725 printf("% d(%s) ", t->tid,725 printf("%llu(%s) ", t->tid, 726 726 thread_states[t->state]); 727 727 } -
kernel/generic/src/proc/task.c
r6adbe3c2 r201abde 400 400 order(task_get_accounting(t), &cycles, &suffix); 401 401 402 printf("%-6ll d%-10s %-3ld %#10zx %#10zx %9llu%c %7zd "402 printf("%-6llu %-10s %-3ld %#10zx %#10zx %9llu%c %7zd " 403 403 "%6zd", t->taskid, t->name, t->context, t, t->as, 404 404 cycles, suffix, t->refcount, … … 487 487 ipc_cleanup(); 488 488 futex_cleanup(); 489 klog_printf("Cleanup of task %ll dcompleted.", TASK->taskid);489 klog_printf("Cleanup of task %llu completed.", TASK->taskid); 490 490 } 491 491 -
kernel/generic/src/proc/thread.c
r6adbe3c2 r201abde 95 95 96 96 SPINLOCK_INITIALIZE(tidlock); 97 uint32_t last_tid = 0;97 thread_id_t last_tid = 0; 98 98 99 99 static slab_cache_t *thread_slab; … … 581 581 order(t->cycles, &cycles, &suffix); 582 582 583 printf("%-6 zd%-10s %#10zx %-8s %#10zx %-3ld %#10zx "583 printf("%-6llu %-10s %#10zx %-8s %#10zx %-3ld %#10zx " 584 584 "%#10zx %9llu%c ", t->tid, t->name, t, 585 585 thread_states[t->state], t->task, t->task->context, … … 637 637 * 638 638 */ 639 unative_t sys_thread_create(uspace_arg_t *uspace_uarg, char *uspace_name )639 unative_t sys_thread_create(uspace_arg_t *uspace_uarg, char *uspace_name, thread_id_t *uspace_thread_id) 640 640 { 641 641 thread_t *t; 642 642 char namebuf[THREAD_NAME_BUFLEN]; 643 643 uspace_arg_t *kernel_uarg; 644 uint32_t tid;645 644 int rc; 646 645 … … 659 658 false); 660 659 if (t) { 661 tid = t->tid;662 660 thread_ready(t); 663 return (unative_t) tid; 664 } else { 661 if (uspace_thread_id != NULL) 662 return (unative_t) copy_to_uspace(uspace_thread_id, &t->tid, 663 sizeof(t->tid)); 664 else 665 return 0; 666 } else 665 667 free(kernel_uarg); 666 }667 668 668 669 return (unative_t) ENOMEM; … … 681 682 /** Syscall for getting TID. 682 683 * 683 * @return Thread ID. 684 */ 685 unative_t sys_thread_get_id(void) 684 * @param uspace_thread_id Userspace address of 8-byte buffer where to store 685 * current thread ID. 686 * 687 * @return 0 on success or an error code from @ref errno.h. 688 */ 689 unative_t sys_thread_get_id(thread_id_t *uspace_thread_id) 686 690 { 687 691 /* … … 689 693 * remains constant for the lifespan of the thread. 690 694 */ 691 return THREAD->tid; 695 return (unative_t) copy_to_uspace(uspace_thread_id, &THREAD->tid, 696 sizeof(THREAD->tid)); 692 697 } 693 698 -
kernel/generic/src/syscall/syscall.c
r6adbe3c2 r201abde 101 101 rc = syscall_table[id](a1, a2, a3, a4); 102 102 else { 103 klog_printf("TASK %ll d: Unknown syscall id %d",TASK->taskid,id);103 klog_printf("TASK %llu: Unknown syscall id %d",TASK->taskid,id); 104 104 task_kill(TASK->taskid); 105 105 thread_exit();
Note:
See TracChangeset
for help on using the changeset viewer.