Changeset 8605b24 in mainline
- Timestamp:
- 2008-06-14T11:48:37Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d7c9fcb
- Parents:
- c7511ec
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/proc/task.c
rc7511ec r8605b24 46 46 #include <synch/waitq.h> 47 47 #include <arch.h> 48 #include <arch/barrier.h> 48 49 #include <panic.h> 49 50 #include <adt/avl.h> … … 260 261 if (rc != EOK) 261 262 return rc; 262 263 uspace_arg_t *kernel_uarg = (uspace_arg_t *) malloc(sizeof(uspace_arg_t), 0); 263 264 /* 265 * Not very efficient and it would be better to call it on code only, 266 * but this whole function is a temporary hack anyway and one day it 267 * will go in favor of the userspace dynamic loader. 268 */ 269 smc_coherence_block(kimage, size); 270 271 uspace_arg_t *kernel_uarg; 272 kernel_uarg = (uspace_arg_t *) malloc(sizeof(uspace_arg_t), 0); 264 273 if (kernel_uarg == NULL) { 265 274 free(kimage); … … 290 299 291 300 as_area_t *area = as_area_create(as, 292 293 294 301 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE, 302 LOADED_PROG_STACK_PAGES_NO * PAGE_SIZE, USTACK_ADDRESS, 303 AS_AREA_ATTR_NONE, &anon_backend, NULL); 295 304 if (area == NULL) { 296 305 as_destroy(as); … … 312 321 313 322 thread_t *thread = thread_create(uinit, kernel_uarg, task, 314 323 THREAD_FLAG_USPACE, "user", false); 315 324 if (thread == NULL) { 316 325 task_destroy(task); … … 443 452 444 453 #ifdef __32_BITS__ 445 printf("%-6" PRIu64 " %-10s %-3" PRIu32 " %10p %10p %9" PRIu64 "%c %7ld %6ld",446 t->taskid, t->name, t->context, t, t->as, cycles, suffix,447 454 printf("%-6" PRIu64 " %-10s %-3" PRIu32 " %10p %10p %9" PRIu64 455 "%c %7ld %6ld", t->taskid, t->name, t->context, t, t->as, cycles, 456 suffix, atomic_get(&t->refcount), atomic_get(&t->active_calls)); 448 457 #endif 449 458 450 459 #ifdef __64_BITS__ 451 printf("%-6" PRIu64 " %-10s %-3" PRIu32 " %18p %18p %9" PRIu64 "%c %7ld %6ld",452 t->taskid, t->name, t->context, t, t->as, cycles, suffix,453 460 printf("%-6" PRIu64 " %-10s %-3" PRIu32 " %18p %18p %9" PRIu64 461 "%c %7ld %6ld", t->taskid, t->name, t->context, t, t->as, cycles, 462 suffix, atomic_get(&t->refcount), atomic_get(&t->active_calls)); 454 463 #endif 455 464 … … 475 484 #ifdef __32_BITS__ 476 485 printf("taskid name ctx address as " 477 486 "cycles threads calls callee\n"); 478 487 printf("------ ---------- --- ---------- ---------- " 479 488 "---------- ------- ------ ------>\n"); 480 489 #endif 481 490 482 491 #ifdef __64_BITS__ 483 492 printf("taskid name ctx address as " 484 493 "cycles threads calls callee\n"); 485 494 printf("------ ---------- --- ------------------ ------------------ " 486 495 "---------- ------- ------ ------>\n"); 487 496 #endif 488 497
Note:
See TracChangeset
for help on using the changeset viewer.