"Shannon" <[EMAIL PROTECTED]> wrote in message
news:12132@palm-dev-forum...
>How do we handle data integrity issues with semaphores?

You can't use semaphores yourself, but I've used a bit in a database's app
info block to the same effect. My goal was to prevent data corruption from
resets, whether due to bugs or a user just resetting for the hell of it. I
didn't go for 100% protection; I assume short DmWrites are effectively
atomic because it's practically impossible to reset part way through the
write. I could have used the sysAppLaunchCmdReset launch code to trigger a
cleanup, but I don't like to do anything significant at reset time. Bugs in
reset code will result in repeated resets and the user is likely to do a
hard reset rather than a no-notify reset when this happens. Instead, I clean
up when the application is launched normally and ignore other launch codes
(like find) if the app crashed previously.

It worked for me - YMMV.


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to