Changeset 20d50a1 in mainline for generic/src/proc
- Timestamp:
- 2006-01-13T13:02:45Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f9425006
- Parents:
- 0369911
- Location:
- generic/src/proc
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/proc/scheduler.c
r0369911 r20d50a1 33 33 #include <mm/frame.h> 34 34 #include <mm/page.h> 35 #include <mm/ vm.h>35 #include <mm/as.h> 36 36 #include <arch/asm.h> 37 37 #include <arch/faddr.h> … … 353 353 */ 354 354 if (TASK != THREAD->task) { 355 vm_t *m1 = NULL;356 vm_t *m2;355 as_t *as1 = NULL; 356 as_t *as2; 357 357 358 358 if (TASK) { 359 359 spinlock_lock(&TASK->lock); 360 m1 = TASK->vm;360 as1 = TASK->as; 361 361 spinlock_unlock(&TASK->lock); 362 362 } 363 363 364 364 spinlock_lock(&THREAD->task->lock); 365 m2 = THREAD->task->vm;365 as2 = THREAD->task->as; 366 366 spinlock_unlock(&THREAD->task->lock); 367 367 368 368 /* 369 * Note that it is possible for two tasks to share one vm mapping.370 */ 371 if ( m1 != m2) {372 /* 373 * Both tasks and vm mappings are different.369 * Note that it is possible for two tasks to share one address space. 370 */ 371 if (as1 != as2) { 372 /* 373 * Both tasks and address spaces are different. 374 374 * Replace the old one with the new one. 375 375 */ 376 vm_install(m2);376 as_install(as2); 377 377 } 378 378 TASK = THREAD->task; -
generic/src/proc/task.c
r0369911 r20d50a1 29 29 #include <proc/thread.h> 30 30 #include <proc/task.h> 31 #include <mm/ vm.h>31 #include <mm/as.h> 32 32 #include <mm/heap.h> 33 33 … … 55 55 * Create new task with no threads. 56 56 * 57 * @param m Task's virtual memory structure.57 * @param as Task's address space. 58 58 * 59 59 * @return New task's structure on success, NULL on failure. 60 60 * 61 61 */ 62 task_t *task_create( vm_t *m)62 task_t *task_create(as_t *as) 63 63 { 64 64 ipl_t ipl; … … 70 70 list_initialize(&ta->th_head); 71 71 list_initialize(&ta->tasks_link); 72 ta-> vm = m;72 ta->as = as; 73 73 74 74 ipl = interrupts_disable(); -
generic/src/proc/the.c
r0369911 r20d50a1 43 43 the->thread = NULL; 44 44 the->task = NULL; 45 the-> vm= NULL;45 the->as = NULL; 46 46 } 47 47
Note:
See TracChangeset
for help on using the changeset viewer.