On Wed, 18 Feb 2009, Artem Kachitchkine wrote: > > > 4.2.5. Register CPU idle notification callback > > int cpu_idle_register_callback(uint_t priority, > > cpu_idle_callback_t *callbackp, void *arg, void **hdlpp); > > This interface registers a callback to be called when CPU idle state > > changes. All registered callbacks will be called in priority order > > from high to low when CPU enters idle state and will be called in > > reverse order when CPU exits idle state. > > Argument priority is used to determine the calling order of > > registered callbacks. > > Argument arg will be passed back to registered callback and how to > > use it is determined by callback. > > What are possible return values and their meaning? > > On architectures that do not implement this functionality (sparc?), will these > functions exist, i.e. will consumers be #ifdef free, and if so, what's the > behavior: fail callback registration, or succeed but never callback. > > -Artem >
FWIW, Sparc can use this functionality. Though CPU PM on Sparc is different than on x64, some platforms (especially newer or in development ones) could use and even exploit this mechanism. Individual consumers, though, would likely be platform specific, and wouldn't likely have #ifdefs even if the API were only x64. The project team will hopefully elaborate further, but it would seem to me that the answer would be "succeed, but never callback". The worst case is that there are some internal resources that are never used (i.e. storing callbacks that will never be called), but certainly if a platform that previously could not use the feature finds a way to do so would be able to see results immediately. ---- Randy