|
||
P.I.P.S. applications can be written either as pure C or as hybrid applications which mix native Symbian C++ and Standard C. In addition to the core P.I.P.S. libraries, an application can also use P.I.P.S. extensions or third-party C shared libraries. Hybrid applications can also link against native Symbian OS libraries.
The use cases for hybrid applications are as follows:
Native Symbian EXE
using both Standard C and native
Symbian OS C++ APIs
STDEXE
using both Standard C and native Symbian OS C++
APIs
Native Symbian EXE
depending on an STDDLL
which uses Standard C APIs
STDEXE
using a native Symbian DLL
which
uses native Symbian OS C++ APIs
STDDLL
using both Standard C and native Symbian OS C++
APIs
Native Symbian DLL
using both Standard C and native
Symbian OS C++ APIs
The pthread
and RThread
APIs do not
mix. Symbian OS heaps are managed thread-wise whereas P.I.P.S. heaps are
managed process-wise. Mixing pthread
and RThread
may result in panics due to data being lost or orphaned. So, do
not mix the two unless you know what you're doing.
User libraries or executables written using P.I.P.S. must not allocate resources in the context of the calling thread as the thread might be using a private heap which is inaccessible to other threads and might have a different lifetime.
To minimise the risks avoid using RThread
APIs in
primarily POSIX applications or libraries (those entering via
main()
), and avoid using pthread
in primarily Symbian
OS applications or libraries (those entering via E32Main()
).