Changeset 8 for trunk/hal/tsar_mips32/hal_context.c
- Timestamp:
- Apr 26, 2017, 2:20:47 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/hal_context.c
r1 r8 27 27 #include <string.h> 28 28 #include <process.h> 29 #include <printk.h> 29 30 #include <vmm.h> 30 31 #include <core.h> … … 38 39 kmem_req_t req; 39 40 41 context_dmsg("\n[INFO] %s : enters for thread %x in process %x\n", 42 __FUNCTION__ , thread->trdid , thread->process->pid ); 43 40 44 // allocate memory for cpu_context 41 req.type = KMEM_ GENERIC;45 req.type = KMEM_CPU_CTX; 42 46 req.size = sizeof(hal_cpu_context_t); 43 47 req.flags = AF_KERNEL | AF_ZERO; … … 78 82 context->c2_mode = c2_mode; 79 83 84 context_dmsg("\n[INFO] %s : exit for thread %x in process %x\n", 85 __FUNCTION__ , thread->trdid , thread->process->pid ); 86 80 87 return 0; 81 88 } // end hal_cpu_context_create() … … 88 95 89 96 // allocate memory for dst cpu_context 90 req.type = KMEM_ GENERIC;97 req.type = KMEM_CPU_CTX; 91 98 req.size = sizeof(hal_cpu_context_t); 92 99 req.flags = AF_KERNEL | AF_ZERO; … … 112 119 kmem_req_t req; 113 120 114 req.type = KMEM_ GENERIC;121 req.type = KMEM_CPU_CTX; 115 122 req.ptr = thread->cpu_context; 116 123 kmem_free( &req ); … … 124 131 125 132 // allocate memory for uzone 126 req.type = KMEM_ GENERIC;133 req.type = KMEM_FPU_CTX; 127 134 req.size = sizeof(hal_fpu_context_t); 128 135 req.flags = AF_KERNEL | AF_ZERO; … … 144 151 145 152 // allocate memory for dst fpu_context 146 req.type = KMEM_ GENERIC;153 req.type = KMEM_FPU_CTX; 147 154 req.size = sizeof(hal_fpu_context_t); 148 155 req.flags = AF_KERNEL | AF_ZERO; … … 168 175 kmem_req_t req; 169 176 170 req.type = KMEM_ GENERIC;177 req.type = KMEM_FPU_CTX; 171 178 req.ptr = thread->fpu_context; 172 179 kmem_free( &req );
Note: See TracChangeset
for help on using the changeset viewer.