Closed Bug 813842 Opened 13 years ago Closed 8 years ago

GonkSwitch needs to be rewritten

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: dhylands, Unassigned)

References

Details

Currently, the way that GonkSwitch is written, it has data structures which are allocated and maintained by the IOThread, but which are accessed by the MainThread. Bug 751423 tried to introduce a Monitor to synchronize things, but this has resulted in some hangs, see bug 812880 and bug 813831 I think that we should remove the Monitor lock altogether. We should have the data structures on the IOThread send events to MainThread to update a cache which reflects the state of the switches. MainThread should never directly access the data structures maintained on IOThread and vice-versa.
Hi Dave, What i know for this change are 1. to have a new static variable for caching the switch state of each switch devices in main thread context. 2. to modify GonkSwitch.cpp::GetCurrentSwitchState() as that if sSwitchObserver is not exist already then directly reading the specific sys node of indicated switch device. Are these as what you need? Thanks.
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.