At 10:23 AM -0700 5/6/99, Jim Schram wrote:
>EvtEnqueueKey is called from within interrupt service routines and
>background tasks. Neither the memory manager nor the feature manager can
>safely be called from within an interrupt service routine -- you WILL
>corrupt the dynamic and/or storage heaps, crashing randomly as a result,
>possibly losing all user data in the device.
Um, actually, it's not that bad. In reality, what will happen is the
device will eventually hang when a button is pressed. The hack will
attempt to acquire the memory manager semaphore from an interrupt, which
will block and the other task that has the semaphore will never get a
timeslice to release the semaphore because you're in an interrupt.
Of course, the hang will lead to users resetting the device, which will
necessarily happen in the middle of some operation that required the memory
manager sempahore, and in some cases resetting in the middle of those
operations can corrupt your storage heap. Odds are against it though...
But hanging when you press a key is bad enough all by itself!
--Bob