Page MenuHomeFreeBSD

sys/power.h: `enum power_sstate_transition`
Needs ReviewPublic

Authored by obiwac on Fri, Sep 12, 1:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 2, 5:31 PM
Unknown Object (File)
Wed, Oct 1, 1:35 AM
Unknown Object (File)
Tue, Sep 30, 9:05 AM
Unknown Object (File)
Mon, Sep 29, 11:41 PM
Unknown Object (File)
Sat, Sep 27, 9:14 PM
Unknown Object (File)
Mon, Sep 22, 3:22 PM
Unknown Object (File)
Sun, Sep 21, 3:28 PM
Unknown Object (File)
Thu, Sep 18, 5:26 AM
Subscribers

Details

Reviewers
markj
jrm
mckusick
Summary

Turn POWER_SLEEP_STATE_* defines into enum power_sstate_transition.

Maybe I missed some places where just an int is being used for the sleep state, gonna look at this deeper later.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 66984
Build 63867: arc lint + arc unit

Event Timeline

sys/sys/power.h
55–57

Is there a particular reason we'd want to explicitly set these values? Is it preferred style in FreeBSD to explicitly set these when an enum is used in an interface or something?

sys/dev/acpi_support/acpi_ibm.c
1454

Does this perhaps suggest that it isn't very useful in general to distinguish between SSTATE_TRANSITION_* and STYPE_*?

sys/sys/power.h
55–57

That's not necessary for internal kernel interfaces.

obiwac added inline comments.
sys/dev/acpi_support/acpi_ibm.c
1454

can you elaborate on in what way this suggests the distinction is not useful? Other places need to know if the suspend type is s2idle or s2mem, I just added this comment to note that the use of the name "IBM_EVENT_SUSPEND_TO_RAM" here doesn't necessarily mean s2mem, but could also be s2idle