Symbian3/SDK/Source/GUID-6CDDDD1E-BDB9-5C61-8EFD-8B3369F5A12D.dita
changeset 13 48780e181b38
parent 8 ae94777fff8f
equal deleted inserted replaced
12:80ef3a206772 13:48780e181b38
     7     Nokia Corporation - initial contribution.
     7     Nokia Corporation - initial contribution.
     8 Contributors: 
     8 Contributors: 
     9 -->
     9 -->
    10 <!DOCTYPE concept
    10 <!DOCTYPE concept
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    12 <concept id="GUID-6CDDDD1E-BDB9-5C61-8EFD-8B3369F5A12D" xml:lang="en"><title>P.I.P.S.
    12 <concept id="GUID-6CDDDD1E-BDB9-5C61-8EFD-8B3369F5A12D" xml:lang="en"><title>P.I.P.S. Overview</title><prolog><metadata><keywords/></metadata></prolog><conbody>
    13 Overview</title><prolog><metadata><keywords/></metadata></prolog><conbody>
    13 <p>P.I.P.S. supplies a new framework of POSIX 'C' APIs to be used
    14 <p>P.I.P.S. supplies a new framework of POSIX 'C' APIs to be used by Symbian
    14 by Symbian developers with RTOS, Linux or Microsoft Windows® knowledge.
    15 developers with RTOS, Linux or Microsoft Windows® knowledge. The new APIs
    15 The new APIs are packaged into industry standard libraries - <codeph>libc</codeph>, <codeph>libm</codeph>, <codeph>libpthread</codeph> and <codeph>libdl</codeph> - and will help reduce development costs. </p>
    16 are packaged into industry standard libraries - <codeph>libc</codeph>, <codeph>libm</codeph>, <codeph>libpthread</codeph> and <codeph>libdl</codeph> - and will help reduce development costs. </p>
    16 <section id="GUID-08EF9B92-E9A6-4C4F-8A08-597F2EF32135"><title>Purpose</title> <p>The Symbian platform already provides a library called '<codeph>ESTLIB</codeph>', which includes a subset of Standard C APIs. This
    17 <section id="GUID-08EF9B92-E9A6-4C4F-8A08-597F2EF32135"><title>Purpose</title> <p>The
    17 was created to allow the Java virtual machine to run on the Symbian
    18 Symbian platform already provides a library called '<codeph>ESTLIB</codeph>',
    18 platform rather than to allow applications written in C to be ported
    19 which includes a subset of Standard C APIs. This was created to allow the
    19 to the Symbian platform. Furthermore, the functionality provided by <codeph>ESTLIB</codeph> is not fully compliant with the Standard C and POSIX
    20 Java virtual machine to run on the Symbian platform rather than to allow applications
    20 standards. Symbian intends to deprecate <codeph>ESTLIB</codeph> once
    21 written in C to be ported to the Symbian platform. Furthermore, the functionality
    21 P.I.P.S. is mature. </p> <p>The P.I.P.S. libraries are included in
    22 provided by <codeph>ESTLIB</codeph> is not fully compliant with the Standard
    22 ROM on certain smartphones based on Symbian OS v9.3 onwards. For smartphones
    23 C and POSIX standards. Symbian intends to deprecate <codeph>ESTLIB</codeph> once
    23 based on earlier versions of Symbian platform, a freely downloadable
    24 P.I.P.S. is mature. </p> <p>The P.I.P.S. libraries are included in ROM on
    24 SIS file is available from the Symbian Developer Network (specifically <xref href="http://developer.symbian.org/wiki/index.php/Open_C_and_Open_C%2B%2B_Quick_Start" scope="external">http://developer.symbian.org/wiki/index.php/Open_C_and_Open_C%2B%2B_Quick_Start</xref>) and can be installed on any Symbian OS v9.x smartphones. </p> </section>
    25 certain smartphones based on Symbian OS v9.3 onwards. For smartphones based
    25 <section id="GUID-6E46D602-BED1-4E20-AE6B-5137615E2440"><title>Required
    26 on earlier versions of Symbian platform, a freely downloadable SIS file is
    26 background</title> <p><b>The differences between the Symbian platform
    27 available from the Symbian Developer Network (specifically <xref href="http://developer.symbian.org/wiki/index.php/Open_C_and_Open_C%2B%2B_Quick_Start" scope="external">http://developer.symbian.org/wiki/index.php/Open_C_and_Open_C%2B%2B_Quick_Start</xref>)
    27 and other operating systems</b> </p> <p>The Symbian platform is an
    28 and can be installed on any Symbian OS v9.x smartphones. </p> </section>
    28 operating system designed for mobile devices and comes in the form
    29 <section id="GUID-6E46D602-BED1-4E20-AE6B-5137615E2440"><title>Required background</title> <p><b>The
    29 of many libraries that contain hundreds of classes and thousands of
    30 differences between the Symbian platform and other operating systems</b> </p> <p>The
    30 member functions. </p> <p>The Symbian platform has been specifically
    31 Symbian platform is an operating system designed for mobile devices and comes
    31 designed to provide efficient memory and power management. </p> <p>P.I.P.S. has been introduced to the Symbian platform to make it more
    32 in the form of many libraries that contain hundreds of classes and thousands
    32 attractive to third party Symbian developers with C/C++ experience
    33 of member functions. </p> <p>The Symbian platform has been specifically designed
    33 and to allow them to port their applications to the Symbian platform
    34 to provide efficient memory and power management. </p> <p>P.I.P.S. has been
    34 with greater ease. </p> <p>The P.I.P.S. initiative aims to reduce
    35 introduced to the Symbian platform to make it more attractive to third party
    35 the development cost of porting software to run on the Symbian platform.
    36 Symbian developers with C/C++ experience and to allow them to port their applications
    36 It achieves this by providing a POSIX-like API layer above the Symbian
    37 to the Symbian platform with greater ease. </p> <p>The P.I.P.S. initiative
    37 platform. Given the structure of the Symbian platform, however, it
    38 aims to reduce the development cost of porting software to run on the Symbian
    38 is not possible to provide a fully compliant API and some functionality,
    39 platform. It achieves this by providing a POSIX-like API layer above the Symbian
    39 such as, <xref href="GUID-432C9AA0-A698-3A62-95D8-CB010965F92C.dita"><apiname>fork()</apiname></xref> and <xref href="GUID-1F3AB7F6-B354-36DB-AA0C-D8F2DC89A6DD.dita"><apiname>exec()</apiname></xref> are
    40 platform. Given the structure of the Symbian platform, however, it is not
    40 not supported. This guide details such non-compliance and recommended
    41 possible to provide a fully compliant API and some functionality, such as, <xref href="GUID-432C9AA0-A698-3A62-95D8-CB010965F92C.dita"><apiname>fork()</apiname></xref> and <xref href="GUID-1F3AB7F6-B354-36DB-AA0C-D8F2DC89A6DD.dita"><apiname>exec()</apiname></xref> are
    41 alternatives. </p> <p>Specific differences between the Symbian platform
    42 not supported. This guide details such non-compliance and recommended alternatives. </p> <p>Specific
    42 and Unix-like systems are described in the relevant sections of this
    43 differences between the Symbian platform and Unix-like systems are described
    43 guide. </p> <p><b>What P.I.P.S. is not</b> </p> <p>The P.I.P.S. environment
    44 in the relevant sections of this guide. </p> <p><b>What P.I.P.S. is not</b> </p> <p>The
    44 is <b>not</b> a UNIX® application environment. You will not be able
    45 P.I.P.S. environment is <b>not</b> a UNIX® application environment. You will
    45 to run a UNIX application on the Symbian platform 'as is'. At a minimum,
    46 not be able to run a UNIX application on the Symbian platform 'as is'. At
    46 you will need to create a <filepath>.mmp</filepath> file and a <filepath>bld.inf</filepath> file for the application and rebuild the application's
    47 a minimum, you will need to create a <filepath>.mmp</filepath> file and a <filepath>bld.inf</filepath> file
    47 source code for the Symbian platform. </p> <p>If the application does
    48 for the application and rebuild the application's source code for the Symbian
    48 not work at the first attempt, you may have to modify the application
    49 platform. For further information, see <xref href="GUID-3100800B-B2F7-50EF-BD4C-3C345ECCB2A5.dita">The
    49 code to replace missing APIs or port the required APIs to extend the
    50 Symbian build process</xref> section. </p> <p>If the application does not
    50 P.I.P.S. environment. To find out more about porting C libraries to
    51 work at the first attempt, you may have to modify the application code to
    51 the Symbian platform, see the <xref href="GUID-C4C85189-BA6F-5F11-ABB3-727D8C1F5984.dita">P.I.P.S. Porting
    52 replace missing APIs or port the required APIs to extend the P.I.P.S. environment.
    52 Tutorials</xref> sections. </p> <p>The P.I.P.S. environment is not
    53 To find out more about porting C libraries to the Symbian platform, see the <xref href="GUID-C4C85189-BA6F-5F11-ABB3-727D8C1F5984.dita">P.I.P.S. Porting Tutorials</xref> sections. </p> <p>The
    53 100% POSIX compliant and it is not officially certified as POSIX compatible.
    54 P.I.P.S. environment is not 100% POSIX compliant and it is not officially
    54 However, the implementation is as compliant as the underlying Symbian
    55 certified as POSIX compatible. However, the implementation is as compliant
    55 platform allows it to be. For example, P.I.P.S. does not provide the
    56 as the underlying Symbian platform allows it to be. For example, P.I.P.S.
    56 APIs <codeph>fork()</codeph> and <codeph>exec()</codeph>, but it does
    57 does not provide the APIs <codeph>fork()</codeph> and <codeph>exec()</codeph>,
    57 provide <xref href="GUID-A9DB6E7C-B8D6-377A-BBE6-39E0A7A09E5D.dita"><apiname>popen()</apiname></xref>, <xref href="GUID-F4749DAA-1B29-3D1D-A3AA-0D52B851E501.dita"><apiname>mkfifo()</apiname></xref> and
    58 but it does provide <xref href="GUID-A9DB6E7C-B8D6-377A-BBE6-39E0A7A09E5D.dita"><apiname>popen()</apiname></xref>, <xref href="GUID-F4749DAA-1B29-3D1D-A3AA-0D52B851E501.dita"><apiname>mkfifo()</apiname></xref> and
    58 so on, which can be used to implement well known alternative patterns.
    59 so on, which can be used to implement well known alternative patterns. For
    59 For further information, see the <xref href="GUID-AF07AD54-86F1-5DB7-80FF-633A559DA4BD.dita">Process Creation</xref> section. </p> </section>
    60 further information, see the <xref href="GUID-AF07AD54-86F1-5DB7-80FF-633A559DA4BD.dita">Process
    60 <section id="GUID-22E7E427-C9D1-4C26-BCA8-E4A48CE0E45F"><title>Architecture</title> <p>P.I.P.S. provides an API layer above the native Symbian platform
    61 Creation</xref> section. </p> </section>
    61 APIs that is more closely aligned with industry standard APIs. </p> <p>The core P.I.P.S. libraries are: </p> <ul>
    62 <section id="GUID-22E7E427-C9D1-4C26-BCA8-E4A48CE0E45F"><title>Architecture</title> <p>P.I.P.S.
    62 <li id="GUID-213D2779-C303-5A11-A339-8E464D4B4A68"><p> <codeph>libc</codeph>: Standard C and POSIX APIs - includes support for files, sockets,
    63 provides an API layer above the native Symbian platform APIs that is more
    63 pipes, message queues, shared memory APIs and environment variables </p> </li>
    64 closely aligned with industry standard APIs. </p> <p>The core P.I.P.S. libraries
    64 <li id="GUID-1209CBDA-DFEB-5ECA-AD4F-A1452762C2CC"><p> <codeph>libm</codeph>: Standard C maths support APIs </p> </li>
    65 are: </p> <ul>
    65 <li id="GUID-138D2894-8362-5C13-B5BB-24A9A22DF415"><p> <codeph>libpthread</codeph>: Standard POSIX threading APIs </p> </li>
    66 <li id="GUID-213D2779-C303-5A11-A339-8E464D4B4A68"><p> <codeph>libc</codeph>:
    66 <li id="GUID-E00112DA-D5BB-55C0-A6A4-A443B67858C0"><p> <codeph>libdl</codeph>: Standard C dynamic loading and symbol lookup APIs (only ordinal
    67 Standard C and POSIX APIs - includes support for files, sockets, pipes, message
    67 lookup is supported on pre-Symbian OS v9.3 releases). </p> </li>
    68 queues, shared memory APIs and environment variables </p> </li>
    68 </ul> <p>The first three libraries listed above are seeded from <xref href="http://www.freebsd.org/" scope="external">FreeBSD</xref>. </p> <p>The diagram below shows the high level architecture of the P.I.P.S.
    69 <li id="GUID-1209CBDA-DFEB-5ECA-AD4F-A1452762C2CC"><p> <codeph>libm</codeph>:
    69 environment. </p> <fig id="GUID-103BEA25-EE1B-50D0-8C0C-950C1A43656D">
    70 Standard C maths support APIs </p> </li>
       
    71 <li id="GUID-138D2894-8362-5C13-B5BB-24A9A22DF415"><p> <codeph>libpthread</codeph>:
       
    72 Standard POSIX threading APIs </p> </li>
       
    73 <li id="GUID-E00112DA-D5BB-55C0-A6A4-A443B67858C0"><p> <codeph>libdl</codeph>:
       
    74 Standard C dynamic loading and symbol lookup APIs (only ordinal lookup is
       
    75 supported on pre-Symbian OS v9.3 releases). </p> </li>
       
    76 </ul> <p>The first three libraries listed above are seeded from <xref href="http://www.freebsd.org/" scope="external">FreeBSD</xref>. </p> <p>The diagram below shows the high
       
    77 level architecture of the P.I.P.S. environment. </p> <fig id="GUID-103BEA25-EE1B-50D0-8C0C-950C1A43656D">
       
    78 <title>              P.I.P.S. environment architecture            </title>
    70 <title>              P.I.P.S. environment architecture            </title>
    79 <image href="GUID-ACA2AFE8-4872-42FA-A871-34EB80197495_d0e148518_href.png" placement="inline"/>
    71 <image href="GUID-ACA2AFE8-4872-42FA-A871-34EB80197495_d0e153600_href.png" placement="inline"/>
    80 </fig> <p>This diagram shows how P.I.P.S. fits in with the Symbian platform,
    72 </fig> <p>This diagram shows how P.I.P.S. fits in with the Symbian
    81 and also how C/C++ applications, additional C shared libraries and hybrid
    73 platform, and also how C/C++ applications, additional C shared libraries
    82 applications developed by third party Symbian developers using P.I.P.S. fit
    74 and hybrid applications developed by third party Symbian developers
    83 in. </p> <p>P.I.P.S. environment is based on industry-standard APIs. These
    75 using P.I.P.S. fit in. </p> <p>P.I.P.S. environment is based on industry-standard
    84 standards include </p> <ul>
    76 APIs. These standards include </p> <ul>
    85 <li id="GUID-09A5848E-7934-5202-BB09-BE6390FC2F12"><p>Standard C (<codeph>stdC</codeph>)
    77 <li id="GUID-09A5848E-7934-5202-BB09-BE6390FC2F12"><p>Standard C (<codeph>stdC</codeph>) and </p> </li>
    86 and </p> </li>
       
    87 <li id="GUID-0478A6C5-238C-5CFF-8625-791293800E9B"><p>POSIX. </p> </li>
    78 <li id="GUID-0478A6C5-238C-5CFF-8625-791293800E9B"><p>POSIX. </p> </li>
    88 </ul> <p>The P.I.P.S. environment is a mandatory part of Symbian OS v9.5 onward. </p> <p>For
    79 </ul> <p>The P.I.P.S. environment is a mandatory part of Symbian OS
    89 devices already in the market, a SIS file is freely downloadable from the
    80 v9.5 onward. </p> <p>For devices already in the market, a SIS file
    90 Forum Nokia site (specifically <xref href="http://www.forum.nokia.com/Technology_Topics/Development_Platforms/Open_C_and_C++/" scope="external">http://www.forum.nokia.com/Technology_Topics/Development_Platforms/Open_C_and_C++/</xref>)
    81 is freely downloadable from the Forum Nokia site (specifically <xref href="http://www.forum.nokia.com/Technology_Topics/Development_Platforms/Open_C_and_C++/" scope="external">http://www.forum.nokia.com/Technology_Topics/Development_Platforms/Open_C_and_C++/</xref>) and can be installed on any v9.x phone. </p> <p><b>Components</b> </p> <p>P.I.P.S. is based on an industry-standard API and system
    91 and can be installed on any v9.x phone. </p> <p><b>Components</b> </p> <p>P.I.P.S.
    82 behaviour.  The relevant industry standards are Open Group standards
    92 is based on an industry-standard API and system behaviour.  The relevant
    83 and include Standard C (<codeph>stdC</codeph>), POSIX, GNU C library
    93 industry standards are Open Group standards and include Standard C (<codeph>stdC</codeph>),
    84 (<codeph>glibc</codeph>) and Standard C++ (<codeph>stdC++</codeph>). </p> <p>The diagram below shows how the Standard C libraries and
    94 POSIX, GNU C library (<codeph>glibc</codeph>) and Standard C++ (<codeph>stdC++</codeph>). </p> <p>The
    85 exported applications fit into the native platform. </p> <fig id="GUID-02F370A6-0713-5E7F-A851-339E03603A0A">
    95 diagram below shows how the Standard C libraries and exported applications
       
    96 fit into the native platform. </p> <fig id="GUID-02F370A6-0713-5E7F-A851-339E03603A0A">
       
    97 <title>                 The subsystem components               </title>
    86 <title>                 The subsystem components               </title>
    98 <image href="GUID-5746BC4A-E8D2-51DE-B101-4BA68F0E1769_d0e148577_href.png" placement="inline"/>
    87 <image href="GUID-5746BC4A-E8D2-51DE-B101-4BA68F0E1769_d0e153659_href.png" placement="inline"/>
    99 </fig> <p>The System Call Adaptation Layer (SCAL) is not directly accessed
    88 </fig> <p>The System Call Adaptation Layer (SCAL) is not directly
   100 by the developer wishing to export to the Symbian platform, but through calls
    89 accessed by the developer wishing to export to the Symbian platform,
   101 in the P.I.P.S. libraries. </p> <p>Traditionally, in Unix-like systems, system
    90 but through calls in the P.I.P.S. libraries. </p> <p>Traditionally,
   102 calls are implemented in the kernel, separate from the C libraries. On the
    91 in Unix-like systems, system calls are implemented in the kernel,
   103 Symbian platform, the 'System Call Adaptation Layer' runs in the context of
    92 separate from the C libraries. On the Symbian platform, the 'System
   104 the user side but is considered 'kernel-like' code. APIs that belong to this
    93 Call Adaptation Layer' runs in the context of the user side but is
   105 layer are tagged as <codeph>@internalComponent</codeph> and may only be extended
    94 considered 'kernel-like' code. APIs that belong to this layer are
   106 by Symbian. </p> <p>Note that P.I.P.S. is not a Linux application environment
    95 tagged as <codeph>@internalComponent</codeph> and may only be extended
   107 - you cannot simply run an application that you've compiled for your Linux
    96 by Symbian. </p> <p>Note that P.I.P.S. is not a Linux application
   108 desktop. At a minimum, you will have to rebuild your application from source. </p> <p>For
    97 environment - you cannot simply run an application that you've compiled
   109 more information, see the <xref href="GUID-79100974-CAE1-5451-9ED7-E06C9B27131B.dita">Build
    98 for your Linux desktop. At a minimum, you will have to rebuild your
   110 Process</xref> section. </p> <p id="GUID-49C7F951-8317-5F41-B1B9-9F7B8803E655"><b>Glue
    99 application from source. </p> <p id="GUID-49C7F951-8317-5F41-B1B9-9F7B8803E655"><b>Glue code (CRT0)</b> </p> <p>Executables built for the Symbian platform enter via <codeph>E32Main()</codeph>, whereas Standard C applications expect to be
   111 code (CRT0)</b> </p> <p>Executables built for the Symbian platform enter via <codeph>E32Main()</codeph>,
   100 started from <codeph>main()</codeph>. It is therefore necessary to
   112 whereas Standard C applications expect to be started from <codeph>main()</codeph>.
   101 have 'glue code' (formerly known as CRT0) between these two functions.
   113 It is therefore necessary to have 'glue code' (formerly known as CRT0) between
   102 The glue code is also responsible for allocating any system resources,
   114 these two functions. The glue code is also responsible for allocating any
   103 obtaining system and environment data, and initialising the SCAL infrastructure
   115 system resources, obtaining system and environment data, and initialising
   104 prior to calling the <codeph>main()</codeph> function of the application.
   116 the SCAL infrastructure prior to calling the <codeph>main()</codeph> function
   105 There are two versions of the glue code library - <filepath>libcrt0.lib</filepath> (for use by applications that enter via char <codeph>main()</codeph>) and <filepath>libwcrt0.lib</filepath> (for use by applications
   117 of the application. There are two versions of the glue code library - <filepath>libcrt0.lib</filepath> (for
   106 that enter via wide char <codeph>main()</codeph>). </p> <p>To include
   118 use by applications that enter via char <codeph>main()</codeph>) and <filepath>libwcrt0.lib</filepath> (for
   107 the glue code library you should explicity link to <filepath>libcrt0.lib</filepath> and <filepath>libwcrt0.lib</filepath> statically, however, if you
   119 use by applications that enter via wide char <codeph>main()</codeph>). </p> <p>To
   108 are using the <codeph>STDEXE</codeph> or <codeph>STDDLL</codeph> target
   120 include the glue code library you should explicity link to <filepath>libcrt0.lib</filepath> and <filepath>libwcrt0.lib</filepath> statically,
   109 types, glue code will be added automatically. </p> <p id="GUID-1DDC11E7-D9D6-5251-89CE-981C4869D109"><b>P.I.P.S. Core libraries</b> </p> <p>Currently, the C libraries include the <codeph>libc</codeph>, <codeph>libm</codeph>, and <codeph>libpthread</codeph> (seeded
   121 however, if you are using the <codeph>STDEXE</codeph> or <codeph>STDDLL</codeph> target
   110 from <xref href="http://www.freebsd.org/" scope="external">FreeBSD</xref>) and <codeph>libdl</codeph> libraries. The APIs provided by these
   122 types, glue code will be added automatically. </p> <p id="GUID-1DDC11E7-D9D6-5251-89CE-981C4869D109"><b>P.I.P.S.
   111 libraries are defined to be compliant, via compatibility features,
   123 Core libraries</b> </p> <p>Currently, the C libraries include the <codeph>libc</codeph>, <codeph>libm</codeph>,
   112 with the POSIX standard. They are not officially certified as POSIX
   124 and <codeph>libpthread</codeph> (seeded from <xref href="http://www.freebsd.org/" scope="external">FreeBSD</xref>) and <codeph>libdl</codeph> libraries. The
   113 compatible but they conform to it mostly. </p> <p>The P.I.P.S. libraries
   125 APIs provided by these libraries are defined to be compliant, via compatibility
   114 include the following APIs: </p> <ul>
   126 features, with the POSIX standard. They are not officially certified as POSIX
   115 <li id="GUID-95E53F0A-B919-5EEE-9A6F-427E87547088"><p> <codeph>stdio</codeph>, including <xref href="GUID-E69DB3CD-E6DA-3B1D-A499-AE68EC432CAC.dita"><apiname>print()</apiname></xref>, <xref href="GUID-58616261-FB60-37C5-9289-239144CD8FB8.dita"><apiname>scanf()</apiname></xref>, and so on </p> </li>
   127 compatible but they conform to it mostly. </p> <p>The P.I.P.S. libraries include
   116 <li id="GUID-5359692C-17C8-5486-9DCB-0A5B9AD1C90A"><p> <codeph>stdlib</codeph>, including environment variable support, and so on </p> </li>
   128 the following APIs: </p> <ul>
       
   129 <li id="GUID-95E53F0A-B919-5EEE-9A6F-427E87547088"><p> <codeph>stdio</codeph>,
       
   130 including <xref href="GUID-E69DB3CD-E6DA-3B1D-A499-AE68EC432CAC.dita"><apiname>print()</apiname></xref>, <xref href="GUID-58616261-FB60-37C5-9289-239144CD8FB8.dita"><apiname>scanf()</apiname></xref>, and so on </p> </li>
       
   131 <li id="GUID-5359692C-17C8-5486-9DCB-0A5B9AD1C90A"><p> <codeph>stdlib</codeph>,
       
   132 including environment variable support, and so on </p> </li>
       
   133 <li id="GUID-F0E19C9C-5581-5E47-A775-A6B57C22EE92"><p>string manipulation
   117 <li id="GUID-F0E19C9C-5581-5E47-A775-A6B57C22EE92"><p>string manipulation
   134 and character APIs </p> </li>
   118 and character APIs </p> </li>
   135 <li id="GUID-B0F2B006-6D62-5DD6-9CDC-7ADFB693E77E"><p>locale and system services </p> </li>
   119 <li id="GUID-B0F2B006-6D62-5DD6-9CDC-7ADFB693E77E"><p>locale and system
   136 <li id="GUID-C5440DE9-24A2-5A34-A2A7-47E836E1545D"><p>searching, sort and
   120 services </p> </li>
   137 pattern matching </p> </li>
   121 <li id="GUID-C5440DE9-24A2-5A34-A2A7-47E836E1545D"><p>searching, sort
   138 <li id="GUID-33D03F27-4B97-56CA-B4ED-67901701A1E2"><p>IPC mechanisms, including
   122 and pattern matching </p> </li>
   139 shared memory, pipes, FIFOs and message queues </p> </li>
   123 <li id="GUID-33D03F27-4B97-56CA-B4ED-67901701A1E2"><p>IPC mechanisms,
   140 <li id="GUID-15AE7775-5FC8-59A4-924E-3987F9314F58"><p>process creation, including <xref href="GUID-A9DB6E7C-B8D6-377A-BBE6-39E0A7A09E5D.dita"><apiname>popen()</apiname></xref>, <xref href="GUID-E7C4DE71-BC5B-34AE-ACB3-C34A0DB1FC16.dita"><apiname>posix_spawn()</apiname></xref> and <xref href="GUID-3D9040E5-F6FB-3DEA-9800-A55F0CEE7B08.dita"><apiname>system()</apiname></xref>  </p> </li>
   124 including shared memory, pipes, FIFOs and message queues </p> </li>
   141 <li id="GUID-2AEE41E3-A696-588C-9E5B-8E362E96D4B5"><p>networking and socket
   125 <li id="GUID-15AE7775-5FC8-59A4-924E-3987F9314F58"><p>process creation,
   142 APIs </p> </li>
   126 including <xref href="GUID-A9DB6E7C-B8D6-377A-BBE6-39E0A7A09E5D.dita"><apiname>popen()</apiname></xref>, <xref href="GUID-E7C4DE71-BC5B-34AE-ACB3-C34A0DB1FC16.dita"><apiname>posix_spawn()</apiname></xref> and <xref href="GUID-3D9040E5-F6FB-3DEA-9800-A55F0CEE7B08.dita"><apiname>system()</apiname></xref>  </p> </li>
   143 <li id="GUID-ACF6B3A6-0F83-50D3-B0FB-FA765BDA408D"><p>mathematical and arithmetic
   127 <li id="GUID-2AEE41E3-A696-588C-9E5B-8E362E96D4B5"><p>networking and
   144 APIs </p> </li>
   128 socket APIs </p> </li>
   145 <li id="GUID-595D4C61-0FC9-5A05-BEDD-7412CEA585BA"><p>dynamic loading and
   129 <li id="GUID-ACF6B3A6-0F83-50D3-B0FB-FA765BDA408D"><p>mathematical
   146 symbol lookup </p> </li>
   130 and arithmetic APIs </p> </li>
   147 <li id="GUID-DC3DB027-B384-52D1-8284-BF868A5CD543"><p>thread creation and
   131 <li id="GUID-595D4C61-0FC9-5A05-BEDD-7412CEA585BA"><p>dynamic loading
   148 synchronisation mechanisms. </p> </li>
   132 and symbol lookup </p> </li>
   149 </ul> <p>Due to fundamental differences between Linux and the Symbian platform
   133 <li id="GUID-DC3DB027-B384-52D1-8284-BF868A5CD543"><p>thread creation
   150 kernel architecture, there is no support for <xref href="GUID-432C9AA0-A698-3A62-95D8-CB010965F92C.dita"><apiname>fork()</apiname></xref> and <xref href="GUID-1F3AB7F6-B354-36DB-AA0C-D8F2DC89A6DD.dita"><apiname>exec()</apiname></xref>.
   134 and synchronisation mechanisms. </p> </li>
   151 For more information, see the <xref href="GUID-AF07AD54-86F1-5DB7-80FF-633A559DA4BD.dita">Process
   135 </ul> <p>Due to fundamental differences between Linux and the Symbian
   152 Creation</xref> section. </p> <p>The original seed directory structure (<xref href="http://www.freebsd.org/" scope="external">FreeBSD</xref>) is preserved
   136 platform kernel architecture, there is no support for <xref href="GUID-432C9AA0-A698-3A62-95D8-CB010965F92C.dita"><apiname>fork()</apiname></xref> and <xref href="GUID-1F3AB7F6-B354-36DB-AA0C-D8F2DC89A6DD.dita"><apiname>exec()</apiname></xref>. For more information, see the <xref href="GUID-AF07AD54-86F1-5DB7-80FF-633A559DA4BD.dita">Process Creation</xref> section. </p> <p>The original seed directory structure (<xref href="http://www.freebsd.org/" scope="external">FreeBSD</xref>) is
   153 as fully as possible to allow for future catch-ups to be performed more easily.
   137 preserved as fully as possible to allow for future catch-ups to be
   154 The table below shows the original seed directory structure in FreeBSD. </p> <table id="GUID-A1D61A32-6F99-5B0A-B348-135373DC3AEA">
   138 performed more easily. The table below shows the original seed directory
       
   139 structure in FreeBSD. </p> <table id="GUID-A1D61A32-6F99-5B0A-B348-135373DC3AEA">
   155 <tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/>
   140 <tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/>
   156 <tbody>
   141 <tbody>
   157 <row>
   142 <row>
   158 <entry><p> <b>Module</b>  </p> </entry>
   143 <entry><p> <b>Module</b>  </p> </entry>
   159 <entry><p> <b>Description</b>  </p> </entry>
   144 <entry><p> <b>Description</b>  </p> </entry>
   160 </row>
   145 </row>
   161 <row>
   146 <row>
   162 <entry><p> <filepath>core\libc</filepath>  </p> </entry>
   147 <entry><p> <filepath>core\libc</filepath>  </p> </entry>
   163 <entry><p>Contains Standard C and POSIX APIs as defined by the Standard C
   148 <entry><p>Contains Standard C and POSIX APIs as defined by the Standard
   164 and POSIX standards </p> </entry>
   149 C and POSIX standards </p> </entry>
   165 </row>
   150 </row>
   166 <row>
   151 <row>
   167 <entry><p> <filepath>core\libm</filepath>  </p> </entry>
   152 <entry><p> <filepath>core\libm</filepath>  </p> </entry>
   168 <entry><p>Contains the Standard C <codeph>Math</codeph> API as defined by
   153 <entry><p>Contains the Standard C <codeph>Math</codeph> API as defined
   169 Standard C </p> </entry>
   154 by Standard C </p> </entry>
   170 </row>
   155 </row>
   171 <row>
   156 <row>
   172 <entry><p> <filepath>core\libpthread</filepath>  </p> </entry>
   157 <entry><p> <filepath>core\libpthread</filepath>  </p> </entry>
   173 <entry><p>Contains POSIX threading APIs as defined the POSIX standards </p> </entry>
   158 <entry><p>Contains POSIX threading APIs as defined the POSIX standards </p> </entry>
   174 </row>
   159 </row>
   176 <entry><p> <filepath>core\libdl</filepath>  </p> </entry>
   161 <entry><p> <filepath>core\libdl</filepath>  </p> </entry>
   177 <entry><p>Contains APIs for dynamic loading and symbol lookup by name. </p> </entry>
   162 <entry><p>Contains APIs for dynamic loading and symbol lookup by name. </p> </entry>
   178 </row>
   163 </row>
   179 </tbody>
   164 </tbody>
   180 </tgroup>
   165 </tgroup>
   181 </table> <p>Although P.I.P.S. provides a wide range of APIs, some of the functionality
   166 </table> <p>Although P.I.P.S. provides a wide range of APIs, some
   182 required in order to complete a porting task might be missing - this could
   167 of the functionality required in order to complete a porting task
   183 be some APIs from an existing library or an entire library. </p> <p>Several
   168 might be missing - this could be some APIs from an existing library
   184 options are available to the user: </p> <ul>
   169 or an entire library. </p> <p>Several options are available to the
   185 <li id="GUID-99935DCF-2678-5D76-98E9-8E94269E7CAC"><p>Port the missing APIs
   170 user: </p> <ul>
   186 using the P.I.P.S. libraries </p> </li>
   171 <li id="GUID-99935DCF-2678-5D76-98E9-8E94269E7CAC"><p>Port the missing
   187 <li id="GUID-FFA95C02-268F-5281-B0D3-5A4A64BC5A27"><p>Implement the missing
   172 APIs using the P.I.P.S. libraries </p> </li>
   188 APIs on top of the Symbian platform native C++ APIs </p> </li>
   173 <li id="GUID-FFA95C02-268F-5281-B0D3-5A4A64BC5A27"><p>Implement the
   189 <li id="GUID-D70619B7-E889-5D11-81C7-FD99420F3D1D"><p>Use a workaround - for
   174 missing APIs on top of the Symbian platform native C++ APIs </p> </li>
   190 example, use <xref href="GUID-A9DB6E7C-B8D6-377A-BBE6-39E0A7A09E5D.dita"><apiname>popen()</apiname></xref> instead of <codeph>fork()</codeph>. </p> </li>
   175 <li id="GUID-D70619B7-E889-5D11-81C7-FD99420F3D1D"><p>Use a workaround
   191 </ul> <p> <b>Note:</b> The following are the limitations associated with porting
   176 - for example, use <xref href="GUID-A9DB6E7C-B8D6-377A-BBE6-39E0A7A09E5D.dita"><apiname>popen()</apiname></xref> instead of <codeph>fork()</codeph>. </p> </li>
   192 a UNIX® application: </p> <ul>
   177 </ul> <p> <b>Note:</b> The following are the limitations associated
   193 <li id="GUID-4057ED21-65DD-5C20-A65B-B9228BE920BD"><p> <b>Limited stack-space:</b> The
   178 with porting a UNIX® application: </p> <ul>
   194 default stack size per thread on Unix-like operating systems ranges from 64
   179 <li id="GUID-4057ED21-65DD-5C20-A65B-B9228BE920BD"><p> <b>Limited
   195 kB to 1 MB. The Symbian platform, however, defines a default stack size of
   180 stack-space:</b> The default stack size per thread on Unix-like operating
   196 8 kB per thread. P.I.P.S. Pthreads use this by default. You can use the <codeph>pthread_attr_setstacksize()</codeph> function
   181 systems ranges from 64 kB to 1 MB. The Symbian platform, however,
   197 to modify this before calling <codeph>pthread_create()</codeph>. </p> </li>
   182 defines a default stack size of 8 kB per thread. P.I.P.S. Pthreads
   198 <li id="GUID-8329F811-34A6-5812-B033-2BE49C038D3E"><p> <b>Limited threads
   183 use this by default. You can use the <codeph>pthread_attr_setstacksize()</codeph> function to modify this before calling <codeph>pthread_create()</codeph>. </p> </li>
   199 per process:</b> Assuming that all threads use the default stack size (8 kB),
   184 <li id="GUID-8329F811-34A6-5812-B033-2BE49C038D3E"><p> <b>Limited
   200 Symbian specifies a limit of 128 threads per process. The limit changes depending
   185 threads per process:</b> Assuming that all threads use the default
   201 on the stack size you use for individual threads. For example, if you create
   186 stack size (8 kB), Symbian specifies a limit of 128 threads per process.
   202 your threads with a stack size of 16 kB, the OS only supports 64 threads per
   187 The limit changes depending on the stack size you use for individual
   203 process. </p> </li>
   188 threads. For example, if you create your threads with a stack size
       
   189 of 16 kB, the OS only supports 64 threads per process. </p> </li>
   204 </ul> </section>
   190 </ul> </section>
   205 </conbody><related-links>
   191 </conbody><related-links>
   206 <link href="GUID-2016EF4B-F001-5EB2-8095-6048582511D6.dita"><linktext>P.I.P.S.
   192 <link href="GUID-2016EF4B-F001-5EB2-8095-6048582511D6.dita"><linktext>P.I.P.S.
   207 Concepts</linktext></link>
   193 Concepts</linktext></link>
   208 <link href="GUID-C4C85189-BA6F-5F11-ABB3-727D8C1F5984.dita"><linktext>P.I.P.S.
   194 <link href="GUID-C4C85189-BA6F-5F11-ABB3-727D8C1F5984.dita"><linktext>P.I.P.S.