|
||
P.I.P.S. is based on an industry-standard API and system behaviour.
The relevant industry standards are Open Group standards and include Standard
C (stdC
), POSIX, GNU C library (glibc
) and Standard
C++ (stdC++
).
The diagram below shows how the Standard C libraries and exported applications fit into the native platform.
The System Call Adaptation Layer (SCAL) is not directly accessed by the developer wishing to export to Symbian OS, but through calls in the P.I.P.S. libraries.
Traditionally, in Unix-like systems, system calls are implemented in
the kernel, separate from the C libraries. In Symbian OS, the 'System Call
Adaptation Layer' runs in the context of the user side but is considered
'kernel-like' code. APIs that belong to this layer are tagged as
@internalComponent
and may only be extended by Symbian.
Note that P.I.P.S. is not a Linux application environment - you cannot simply run an application that you've compiled for your Linux desktop. At a minimum, you will have to rebuild your application from source.
For more information, see the Build Process section.
Executables built for Symbian OS enter via E32Main()
,
whereas Standard C applications expect to be started from main()
.
It is therefore necessary to have 'glue code' (formerly known as CRT0) between
these two functions. The glue code is also responsible for allocating any
system resources, obtaining system and environment data, and initialising the
SCAL infrastructure prior to calling the main()
function of the
application. There are two versions of the glue code library -
libcrt0.lib
(for use by applications that enter via char
main()
) and libwcrt0.lib
(for use by applications
that enter via wide char main()
).
To include the glue code library you should explicity link to
libcrt0.lib
and libwcrt0.lib
statically, however, if
you are using the STDEXE
or STDDLL
target types, glue
code will be added automatically.
Currently, the C libraries include the libc
,
libm
, and libpthread
(seeded from
FreeBSD) and libdl
libraries. The APIs provided by these libraries are defined to be compliant,
via compatibility features, with the POSIX standard. They are not officially
certified as POSIX compatible but they conform to it mostly.
The P.I.P.S. libraries include the following APIs:
stdio
, including print()
,
scanf()
, and so on
stdlib
, including environment variable support, and so
on
string manipulation and character APIs
locale and system services
searching, sort and pattern matching
IPC mechanisms, including shared memory, pipes, FIFOs and message queues
process creation, including popen()
,
posix_spawn()
and system()
networking and socket APIs
mathematical and arithmetic APIs
dynamic loading and symbol lookup
thread creation and synchronisation mechanisms.
Due to fundamental differences between Linux and the Symbian OS kernel
architecture, there is no support for fork()
,
exec()
and signals. For more information see the
POSIX Signals and
Process Creation sections.
The original seed directory structure (FreeBSD) is preserved as fully as possible to allow for future catch-ups to be performed more easily. The table below shows the original seed directory structure in FreeBSD.
Module |
Description |
|
Contains Standard C and POSIX APIs as defined by the Standard C and POSIX standards |
|
Contains the Standard C |
|
Contains POSIX threading APIs as defined the POSIX standards |
|
Contains APIs for dynamic loading and symbol lookup by name. |