Changeset df29f24 in mainline for kernel/generic/src/proc
- Timestamp:
- 2011-06-01T09:04:08Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0a7627b, c9f0975
- Parents:
- e51a514 (diff), 5d1b3aa (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- kernel/generic/src/proc
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/proc/program.c
re51a514 rdf29f24 54 54 #include <proc/program.h> 55 55 56 #ifndef LOADED_PROG_STACK_PAGES_NO57 #define LOADED_PROG_STACK_PAGES_NO 158 #endif59 60 56 /** 61 57 * Points to the binary image used as the program loader. All non-initial … … 90 86 91 87 /* 92 * Create the dataaddress space area.88 * Create the stack address space area. 93 89 */ 94 90 as_area_t *area = as_area_create(as, 95 91 AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE, 96 LOADED_PROG_STACK_PAGES_NO * PAGE_SIZE, USTACK_ADDRESS,97 AS_AREA_ATTR_NONE,&anon_backend, NULL);92 STACK_SIZE, USTACK_ADDRESS, AS_AREA_ATTR_NONE, 93 &anon_backend, NULL); 98 94 if (!area) 99 95 return ENOMEM; -
kernel/generic/src/proc/scheduler.c
re51a514 rdf29f24 376 376 context_save(&CPU->saved_context); 377 377 context_set(&CPU->saved_context, FADDR(scheduler_separated_stack), 378 (uintptr_t) CPU->stack, CPU_STACK_SIZE);378 (uintptr_t) CPU->stack, STACK_SIZE); 379 379 context_restore(&CPU->saved_context); 380 380 -
kernel/generic/src/proc/task.c
re51a514 rdf29f24 190 190 str_cpy(task->name, TASK_NAME_BUFLEN, name); 191 191 192 task->cont ext = CONTEXT;192 task->container = CONTAINER; 193 193 task->capabilities = 0; 194 194 task->ucycles = 0; … … 211 211 212 212 if ((ipc_phone_0) && 213 (cont ext_check(ipc_phone_0->task->context, task->context)))213 (container_check(ipc_phone_0->task->container, task->container))) 214 214 ipc_phone_connect(&task->phones[0], ipc_phone_0); 215 215 … … 584 584 printf("%-8" PRIu64 " %-14s %-5" PRIu32 " %10p %10p" 585 585 " %9" PRIu64 "%c %9" PRIu64 "%c\n", task->taskid, 586 task->name, task->cont ext, task, task->as,586 task->name, task->container, task, task->as, 587 587 ucycles, usuffix, kcycles, ksuffix); 588 588 #endif … … 595 595 else 596 596 printf("%-8" PRIu64 " %-14s %-5" PRIu32 " %18p %18p\n", 597 task->taskid, task->name, task->cont ext, task, task->as);597 task->taskid, task->name, task->container, task, task->as); 598 598 #endif 599 599 … … 625 625 printf("[id ] [threads] [calls] [callee\n"); 626 626 else 627 printf("[id ] [name ] [ct x] [address ] [as ]"627 printf("[id ] [name ] [ctn] [address ] [as ]" 628 628 " [ucycles ] [kcycles ]\n"); 629 629 #endif … … 634 634 " [callee\n"); 635 635 else 636 printf("[id ] [name ] [ct x] [address ]"636 printf("[id ] [name ] [ctn] [address ]" 637 637 " [as ]\n"); 638 638 #endif -
kernel/generic/src/proc/the.c
re51a514 rdf29f24 58 58 the->task = NULL; 59 59 the->as = NULL; 60 the->magic = MAGIC; 60 61 } 61 62 … … 70 71 NO_TRACE void the_copy(the_t *src, the_t *dst) 71 72 { 73 ASSERT(src->magic == MAGIC); 72 74 *dst = *src; 73 75 } -
kernel/generic/src/proc/thread.c
re51a514 rdf29f24 68 68 #include <errno.h> 69 69 70 71 #ifndef LOADED_PROG_STACK_PAGES_NO72 #define LOADED_PROG_STACK_PAGES_NO 173 #endif74 75 76 70 /** Thread states */ 77 71 const char *thread_states[] = { … … 300 294 301 295 /* Not needed, but good for debugging */ 302 memsetb(thread->kstack, THREAD_STACK_SIZE * 1 << STACK_FRAMES, 0);296 memsetb(thread->kstack, STACK_SIZE, 0); 303 297 304 298 irq_spinlock_lock(&tidlock, true); … … 308 302 context_save(&thread->saved_context); 309 303 context_set(&thread->saved_context, FADDR(cushion), 310 (uintptr_t) thread->kstack, THREAD_STACK_SIZE);304 (uintptr_t) thread->kstack, STACK_SIZE); 311 305 312 306 the_initialize((the_t *) thread->kstack); … … 605 599 printf("%-8" PRIu64 " %-14s %10p %-8s %10p %-5" PRIu32 "\n", 606 600 thread->tid, name, thread, thread_states[thread->state], 607 thread->task, thread->task->cont ext);601 thread->task, thread->task->container); 608 602 #endif 609 603 … … 617 611 printf("%-8" PRIu64 " %-14s %18p %-8s %18p %-5" PRIu32 "\n", 618 612 thread->tid, name, thread, thread_states[thread->state], 619 thread->task, thread->task->cont ext);613 thread->task, thread->task->container); 620 614 #endif 621 615 … … 658 652 else 659 653 printf("[id ] [name ] [address ] [state ] [task ]" 660 " [ct x]\n");654 " [ctn]\n"); 661 655 #endif 662 656 … … 667 661 } else 668 662 printf("[id ] [name ] [address ] [state ]" 669 " [task ] [ct x]\n");663 " [task ] [ctn]\n"); 670 664 #endif 671 665
Note:
See TracChangeset
for help on using the changeset viewer.
