This is something I've suspected for a while, but finally verified.
The *(int*)0x1934=(int)taskHook thing we use to hook task start on DryOS is not a task create hook. It's more like a context switch hook, I think. Trying to debug the startup file crash, I logged the first 128 task names called with this function.
As you can see, many appear multiple times. It might be a good idea to not do strcmp() on all the task names every time.
Also, assuming this is a context switch hook, there may be other interesting ways to abuse it.
init
WdtReset
(null tcb->name)
WdtPrint
(null tcb->name)
ImageSensorTask
(null tcb->name)
Thermometer
(null tcb->name)
ZoomLens
(null tcb->name)
ZoomEvent
(null tcb->name)
FocusLens
(null tcb->name)
FocusEvent
(null tcb->name)
MechaShutter
(null tcb->name)
Nd
(null tcb->name)
CZ
(null tcb->name)
ISComTask
(null tcb->name)
ISComTask
(null tcb->name)
LEDCon
(null tcb->name)
ImgPlayDrv
(null tcb->name)
ASIF
(null tcb->name)
BeepTask
(null tcb->name)
CtrlSrv
(null tcb->name)
PhySw
(null tcb->name)
SsTask
(null tcb->name)
CaptSeqTask
(null tcb->name)
Bye
(null tcb->name)
SpyTask
AudioTsk
(null tcb->name)
PhySw
(null tcb->name)
InitCHDKPTP
SpyTask
TempCheck
(null tcb->name)
TempCheck
ClockSave
(null tcb->name)
CtrlSrv
(null tcb->name)
CtrlSrv
(null tcb->name)
CtrlSrv
(null tcb->name)
CtrlSrv
(null tcb->name)
PhySw
(null tcb->name)
InitFileModules
FsIoNotifyTask
InitFileModules
SpyTask
CommonDrivers
ReadScheduleTas
PhySw
CtrlSrv
InitFileModules
SpyTask
CommonDrivers
Fencing
CommonDrivers
MotionVector
CommonDrivers
SceneDetectTask
CommonDrivers
DevelopModule
CommonDrivers
DetectVerticalW
CommonDrivers
SynchTask
CommonDrivers
SyncPeriod
CommonDrivers
AfIntSrvTask
CommonDrivers
AFTask
CommonDrivers
WBIntegTask
CommonDrivers
OBCtrlTask
CommonDrivers
ExpDrvTask
CommonDrivers
ExpDrvSubTask
CommonDrivers
BrtMsrTask
CommonDrivers
EFChargeT
CommonDrivers
CntFlashTask
CommonDrivers
PhySw
InitFileModules
SpyTask
CommonDrivers
InitFileModules
CommonDrivers
InitFileModules
CommonDrivers
InitFileModules
CommonDrivers
InitFileModules
CommonDrivers
InitFileModules
CommonDrivers
InitFileModules
CommonDrivers
InitFileModules
CommonDrivers