Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/etc/powerd/scripts



On Fri, Dec 31, 2010 at 04:54:47AM -0800, Paul Goyette wrote:
> However, the current implementation is simply a text string with no 
> defined semantics.  A back-end is able to set the value, and it can be 
> retrieved via the POWER_IOC_GET_TYPE ioctl, but otherwise nothing uses 
> the value.

Sure, I mean the idea, not the actual existing code. Something simple as
sysmon_pswitch(9). Say

        struct sysmon_sleep {
                const char       *smpsl_name;
                void             *smpsl_arg;
                void            (*smpsl_func)(void *, int);
        };

        int     sysmon_sleep_register(struct sysmon_sleep *);
        int     sysmon_sleep_unregister(struct sysmon_sleep *);

And the smpsl::smpsl_func(arg, state) would be called from an ioctl, invoked
by the zzz(8) program.

- Jukka.


Home | Main Index | Thread Index | Old Index