문제

I'm currently implementing suspend/resume for embedded Linux on some non-android network device. The requirement is to implement a sleep manager task in kernel which would trigger system suspend in case that no task is currently running and there's no traffic pending. I guess there should be some similar implementation existing already but failed to find. Can anyone refer me to some kind of similar project on this subject? Thanks a lot

도움이 되었습니까?

해결책

If you don't mind doing some porting, the wakelocks from the Android kernel is exactly what you seem to need. User space acquires a wakelock when it needs to remain active (e.g. a task is running or traffic is taking place) and releases it when it doesn't anymore. When the number of held wakelocks reaches zero, the kernel enters suspend mode.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top