The title is a bit scarier than the actual impact.Newer DryOS versions (from r54 on) have brought a significant change in some of the kernel functions.
Previously, functions like SetEventFlag, TakeSemaphore, ReceiveMessageQueue, etc, silently ignored (returned with error) when they were passed an invalid (such as 0) ID.
For recent DryOS revisions, this condition trips an assert.
It was not previously noticed, but a number of event procedures we're using in CHDK core does use eventflags. These eventflags are only created when the InitializeAdjustmentFunction or InitializeAdjustmentSystem event procedures are executed.
Hence, just executing something like MoveFocusLensToDistance crashes the r54+ camera due to a nonexistent eventflag.
Possible solution:
- Executing InitializeAdjustmentFunction during the boot process. Pro: it's only one line of code. Cons: this does a bit more than just creating the above mentioned eventflags, for example it registers several dozen event procedures.
- Executing only the needed parts of InitializeAdjustmentFunction. Pro: only the required eventflags will be created. Con: more work (separate functions need to be called for focus, zoom, ND, etc. related event procedures).
There is an additional impact:
The event procedures which use the eventflags will wait until their job is done. This may have unforeseen consequences.
edit:
Modified title from "Kernel changes in DryOS r54 and the impact on CHDK"