Change the runstate of a processor
#include <sys/sysmgr.h>
int sysmgr_runstate( unsigned cpu,
int enable );
int sysmgr_runstate_dynamic( unsigned cpu,
int enable );
BlackBerry 10.0.0
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The sysmgr_runstate() and sysmgr_runstate_dynamic() functions turn the specified CPU on or off as follows:
These settings work together:
| Runstate | Dynamic runstate | Action |
|---|---|---|
| 0 | — | The CPU is permanently off |
| 1 | 0 | The CPU is permanently on (the default) |
| 1 | 1 | The CPU is dynamically brought up or down by the kernel, depending on load. |
| Safety: | |
|---|---|
| Cancellation point | No |
| Interrupt handler | No |
| Signal handler | Yes |
| Thread | Yes |