Changeset 240 for soft/giet_vm/sys/common.c
- Timestamp:
- Jun 3, 2013, 5:28:47 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/sys/common.c
r238 r240 26 26 // _get_sched() 27 27 // Access CP0 and returns a pointer (virtual address) on the calling 28 // processor scheduler (taking into account the processor local index).28 // processor scheduler. 29 29 /////////////////////////////////////////////////////////////////////////////////// 30 30 static_scheduler_t* _get_sched() 31 31 { 32 static_scheduler_t* psched; 33 unsigned int vaddr; 34 unsigned int lpid = _procid() % NB_PROCS_MAX; 35 32 unsigned int vaddr; 36 33 asm volatile( 37 34 "mfc0 %0, $22 \n" 38 35 : "=r"(vaddr) ); 39 40 psched = (static_scheduler_t*)vaddr; 41 return (psched + lpid); 36 return (static_scheduler_t*)vaddr; 42 37 } 43 38
Note: See TracChangeset
for help on using the changeset viewer.