Module is currently active
Jon Abbott (1421) 2651 posts |
How do you forcibly kill a module that reports “Module is currently active” when you try to RMkill it? The Module in question is BASIC and most definitely isn’t active, although was running a BASIC program at some point. Another question I should probably ask, is under what condition does RISCOS decide a Module is “Active”? Is it simply a case of a Module having appspace allocated to it, or do other factors come into play? |
Jeffrey Lee (213) 6048 posts |
It looks like RMKill will consider a module as active if the CAO pointer is within the module body or within the module’s workspace. https://www.riscosopen.org/viewer/view/castle/RiscOS/Sources/Kernel/s/ModHand?rev=4.17#l2719 Interestingly different routines use different logic, e.g. the “enumerate ROM modules” calls only check the CAO against the module body. And of course the code only checks the current CAO, i.e. only the current wimp task. |
Jon Abbott (1421) 2651 posts |
Should be an easy fix then, just reset the CAO before the kill. Thanks. |