>From: Jeff Ishaq 
>Sent: Saturday, May 22, 1999 2:04 PM
>To: '[EMAIL PROTECTED]'
>Subject: Re: Can a shared lib be SysLibLoad()ed twice?

<> SNIP <>

>If I SysLibLoad() my shared library twice, I get two 
>sequential valid reference numbers.  In addition, both copies 
>of the library have their Sleep and Wake entry points called 
>upon sleeping and waking.  This implies that each instance of 
>the library has its own uniqute SysLibTblEntryPtr (this is 
>implicit in the fact that they each have their own reference 
>number, really).

Oop, I just thought of a problem with this.  If you SysLibLoad() two
instances of the same shared library and the device sleeps and wakes up, the
code in your lib's Sleep() and Wake() entry points gets executed twice.
That means that SysLibLoad()'s behavior requires your sleep and wake
functions to be reentrant, and I suspect this is not how Palm intended
shared libs to work.  This is looking more and more like an OS bug.

-Jeff Ishaq
The Windward Group

Reply via email to