9 | | === CP0 and CP2 registers access functions === |
| 9 | [[PageOutline]] |
| 10 | |
| 11 | == __1) CP0 registers access functions__ == |
| 12 | |
| 13 | === unsigned int _get_sched( void ) === |
| 14 | Returns the virtual address of the scheduler stored in the SCHED register for the processor running the calling task. |
| 15 | |
| 16 | === unsigned int _get_epc( void ) === |
| 17 | Returns the value stored in the EPC register for the processor running the calling task. |
| 18 | |
| 19 | === unsigned int _get_cr( void ) === |
| 20 | Returns the value stored in the CR register for the processor running the calling task. |
| 21 | |
| 22 | === unsigned int _get_sr( void ) === |
| 23 | Returns the value stored in the SR register for the processor running the calling task. |
| 24 | |
| 25 | === unsigned int _get_bvar( void ) === |
| 26 | Returns the value stored in the BVAR register, for the processor running the calling task. |
| 27 | |
| 28 | === unsigned int _get_procid( void ) === |
| 29 | Returns the global processor identifier stored in the EBASE register for the processor running the calling task. |
| 30 | |
| 31 | === void _set_sched( unsigned int value ) === |
| 32 | Writes ''value'' in the SCHED register, for the processor running the calling task. |
| 33 | |
| 34 | === void _set_sr( unsigned int value ) === |
| 35 | Writes ''value'' in the SR register, for the processor running the calling task. |
| 36 | |
| 37 | === void _it_disable( unsigned int* save_sr_ptr ) === |
| 38 | Disables interrupts for the processor running the calling task and save the SR value at address ''save_sr_ptr''. |
| 39 | |
| 40 | === void _it_restore( unsigned int* save_sr_ptr ) === |
| 41 | Writes the value pointed by ''save_sr_ptr'' into the SR register, for the processor running the calling task. |
| 42 | |
| 43 | |