Changeset 459 for trunk/hal/tsar_mips32/core/hal_context.c
- Timestamp:
- Aug 13, 2018, 1:43:20 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/core/hal_context.c
r457 r459 186 186 // get remote child thread cluster and local pointer 187 187 cxy_t child_cxy = GET_CXY( child_xp ); 188 thread_t * child_ptr = (thread_t *)GET_PTR( child_xp );188 thread_t * child_ptr = GET_PTR( child_xp ); 189 189 190 190 // get remote child cpu_context local pointer … … 257 257 // get thread cluster and local pointer 258 258 cxy_t cxy = GET_CXY( thread_xp ); 259 thread_t * ptr = (thread_t *)GET_PTR( thread_xp );259 thread_t * ptr = GET_PTR( thread_xp ); 260 260 261 261 // get context pointer … … 358 358 { 359 359 // allocate a local FPU context in kernel stack 360 hal_fpu_context_t context;360 hal_fpu_context_t src_context; 361 361 362 362 // get remote child cluster and local pointer 363 363 cxy_t thread_cxy = GET_CXY( thread_xp ); 364 thread_t * thread_ptr = (thread_t *)GET_PTR( thread_xp );364 thread_t * thread_ptr = GET_PTR( thread_xp ); 365 365 366 366 asm volatile( … … 399 399 "swc1 $f31, 31*4(%0) \n" 400 400 ".set reorder \n" 401 : : "r"(&context) ); 401 : : "r"(&src_context) ); 402 403 // get local pointer on target thread FPU context 404 void * dst_context = hal_remote_lpt( XPTR( thread_cxy , &thread_ptr->fpu_context ) ); 402 405 403 406 // copy local context to remote child context) 404 hal_remote_memcpy( XPTR( thread_cxy , &thread_ptr->fpu_context ),405 XPTR( local_cxy , & context ),407 hal_remote_memcpy( XPTR( thread_cxy , dst_context ), 408 XPTR( local_cxy , &src_context ), 406 409 sizeof( hal_fpu_context_t ) ); 407 410 … … 411 414 void hal_fpu_context_restore( thread_t * thread ) 412 415 { 416 // get pointer on FPU context and cast to uint32_t 413 417 uint32_t ctx = (uint32_t)thread->fpu_context; 414 418
Note: See TracChangeset
for help on using the changeset viewer.