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 xml:lang="en" id="GUID-9AC6774A-41E9-5298-8696-0A317A09E1E9"><title>Librt Overview</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>Support for the Librt library on Symbian platform enables you to port Librt-based applications to Symbian platform quickly and easily. With knowledge of the Librt library you can also develop Librt-based applications on Symbian platform with minimal coding effort and without much knowledge of the native Symbian Utility C++ APIs. </p> <section><title>Librt library details</title> <p>The <filepath>librt.dll</filepath> provides the Librt functionality and your code must link to <filepath>librt.lib</filepath>. </p> <p> <b>Important:</b> Your application or library that uses the Librt library for the clock solutions must link to <filepath>librt.dll</filepath> prior to all other libraries in the link order. This is because both <filepath>libc.dll</filepath> and <filepath>librt.dll</filepath> provide similar clock interfaces but only the Librt library is modified to behave according to the LSB 3.1 specification. </p> </section> <section><title>Architecture</title> <p>The following image illustrates how the Librt library interacts with the components of the P.I.P.S. environment and also with Symbian platform: </p> <fig id="GUID-A29F100E-2726-501C-B141-BED577C50768"><title> |
12 <concept id="GUID-9AC6774A-41E9-5298-8696-0A317A09E1E9" xml:lang="en"><title>Librt |
13 The Librt library interacting with P.I.P.S. and Symbian platform |
13 Overview</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
14 </title> <image href="GUID-AE85751A-77CA-5C41-AF61-C9C9D776B066_d0e178165_href.png" placement="inline"/></fig> </section> <section><title>APIs</title> <p>The following table is a comprehensive list of Librt APIs as per the <xref scope="external" href="http://refspecs.linux-foundation.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/librt.html">LSB 3.1 specification</xref>: </p> <table id="GUID-843027AF-D604-5C35-9879-BE79121EE94D"><tgroup cols="1"><colspec colname="col0"/><thead><row><entry>API</entry> </row> </thead> <tbody><row><entry><p> <b>Shared Memory APIs</b> </p> </entry> </row> <row><entry><p> <xref href="GUID-FF8FD54D-4CD3-3DC7-9A48-56043F26E5DD.dita"><apiname>shm_open()</apiname></xref> </p> </entry> </row> <row><entry><p> <xref href="GUID-BF359599-0088-3F3E-BD80-B09C1F5DA380.dita"><apiname>shm_unlink()</apiname></xref> </p> </entry> </row> <row><entry><p> <b>Clock APIs</b> </p> </entry> </row> <row><entry><p> <xref href="GUID-D4D30F8D-82D9-3919-9711-DFEE78946DBE.dita"><apiname>clock_getcpuclockid()</apiname></xref> </p> </entry> </row> <row><entry><p> <xref href="GUID-B27CD3ED-C472-3226-8B9F-C920E42FA918.dita"><apiname>clock_getres()</apiname></xref> </p> </entry> </row> <row><entry><p> <xref href="GUID-2E94C94E-6D65-3B18-959D-60E6224E6C40.dita"><apiname>clock_gettime()</apiname></xref> </p> </entry> </row> <row><entry><p> <xref href="GUID-24155E9E-530A-3D43-9B71-CF59153B33C9.dita"><apiname>clock_nanosleep()</apiname></xref> </p> </entry> </row> <row><entry><p> <xref href="GUID-7FA65BF7-2F4F-3AA9-A52F-2CF655053AB7.dita"><apiname>clock_settime()</apiname></xref> </p> </entry> </row> <row><entry><p> <b>Timer APIs</b> </p> </entry> </row> <row><entry><p> <xref href="GUID-FD961A81-8D92-38D6-A2CE-F3215D5CCF38.dita"><apiname>timer_create()</apiname></xref> </p> </entry> </row> <row><entry><p> <xref href="GUID-3C9E5145-5A20-3AE6-88C1-2D76BD68B2F0.dita"><apiname>timer_delete()</apiname></xref> </p> </entry> </row> <row><entry><p> <xref href="GUID-C77553E5-ABEA-3253-B119-2F71C6241EAA.dita"><apiname>timer_getoverrun()</apiname></xref> </p> </entry> </row> <row><entry><p> <xref href="GUID-F2DCFCBA-65B7-3184-B870-A63C6CF7EBA9.dita"><apiname>timer_gettime()</apiname></xref> </p> </entry> </row> <row><entry><p> <xref href="GUID-5FE65EC4-4F2A-30C1-BA89-A92B1F9B1B2E.dita"><apiname>timer_settime</apiname></xref> </p> </entry> </row> </tbody> </tgroup> </table> </section> <section><title>Using Librt</title> <p>The following tutorials describe some high-level usage scenarios of the Librt library functions: </p> <ul><li id="GUID-81EAC75C-5233-5440-95B9-E950AA7527BF"><p><xref href="GUID-8B37D53D-77E1-58C6-9A44-3376A450228B.dita">Shared Memory Tutorial</xref> </p> </li> <li id="GUID-BA00DA3A-FD9A-52CA-AA40-F1CB0CC571A5"><p><xref href="GUID-66402932-5C44-556B-A7AC-1C2D245C8B05.dita">Clocks and Timers Tutorial</xref> </p> </li> </ul> </section> </conbody></concept> |
14 <p>Support for the Librt library on the Symbian platform enables |
|
15 you to port Librt-based applications onto the Symbian platform quickly and |
|
16 easily. With knowledge of the Librt library you can also develop Librt-based |
|
17 applications on the Symbian platform with minimal coding effort and without |
|
18 much knowledge of the native Symbian Utility C++ APIs. </p> |
|
19 <section id="GUID-699E9C23-54DB-497E-A27A-260720FD18F6"><title>Librt library details</title> <p>The <filepath>librt.dll</filepath> provides |
|
20 the Librt functionality and your code must link to <filepath>librt.lib</filepath>. </p> <p> <b>Important:</b> Your |
|
21 application or library that uses the Librt library for the clock solutions |
|
22 must link to <filepath>librt.dll</filepath> prior to all other libraries in |
|
23 the link order. This is because both <filepath>libc.dll</filepath> and <filepath>librt.dll</filepath> provide |
|
24 similar clock interfaces but only the Librt library is modified to behave |
|
25 according to the LSB 3.1 specification. </p> </section> |
|
26 <section id="GUID-9E5D545A-0D4C-47A1-BC47-1B12162D0F49"><title>Architecture</title> <p>The following image illustrates how |
|
27 the Librt library interacts with the components of the P.I.P.S. environment |
|
28 and also with the Symbian platform: </p> <fig id="GUID-A29F100E-2726-501C-B141-BED577C50768"> |
|
29 <title> The Librt library interacting with P.I.P.S. and the Symbian |
|
30 platform </title> |
|
31 <image href="GUID-AE85751A-77CA-5C41-AF61-C9C9D776B066_d0e205779_href.png" placement="inline"/> |
|
32 </fig> </section> |
|
33 <section id="GUID-572AF6E2-9F24-4CEB-BCF8-CCE7BCFE4E77"><title>APIs</title> <p>The following table is a comprehensive list |
|
34 of Librt APIs as per the <xref href="http://refspecs.linux-foundation.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/librt.html" scope="external">LSB 3.1 specification</xref>: </p> <table id="GUID-843027AF-D604-5C35-9879-BE79121EE94D"> |
|
35 <tgroup cols="1"><colspec colname="col0"/> |
|
36 <thead> |
|
37 <row> |
|
38 <entry>API</entry> |
|
39 </row> |
|
40 </thead> |
|
41 <tbody> |
|
42 <row> |
|
43 <entry><p> <b>Shared Memory APIs</b> </p> </entry> |
|
44 </row> |
|
45 <row> |
|
46 <entry><p> <xref href="GUID-FF8FD54D-4CD3-3DC7-9A48-56043F26E5DD.dita"><apiname>shm_open()</apiname></xref> </p> </entry> |
|
47 </row> |
|
48 <row> |
|
49 <entry><p> <xref href="GUID-BF359599-0088-3F3E-BD80-B09C1F5DA380.dita"><apiname>shm_unlink()</apiname></xref> </p> </entry> |
|
50 </row> |
|
51 <row> |
|
52 <entry><p> <b>Clock APIs</b> </p> </entry> |
|
53 </row> |
|
54 <row> |
|
55 <entry><p> <xref href="GUID-D4D30F8D-82D9-3919-9711-DFEE78946DBE.dita"><apiname>clock_getcpuclockid()</apiname></xref> </p> </entry> |
|
56 </row> |
|
57 <row> |
|
58 <entry><p> <xref href="GUID-B27CD3ED-C472-3226-8B9F-C920E42FA918.dita"><apiname>clock_getres()</apiname></xref> </p> </entry> |
|
59 </row> |
|
60 <row> |
|
61 <entry><p> <xref href="GUID-2E94C94E-6D65-3B18-959D-60E6224E6C40.dita"><apiname>clock_gettime()</apiname></xref> </p> </entry> |
|
62 </row> |
|
63 <row> |
|
64 <entry><p> <xref href="GUID-24155E9E-530A-3D43-9B71-CF59153B33C9.dita"><apiname>clock_nanosleep()</apiname></xref> </p> </entry> |
|
65 </row> |
|
66 <row> |
|
67 <entry><p> <xref href="GUID-7FA65BF7-2F4F-3AA9-A52F-2CF655053AB7.dita"><apiname>clock_settime()</apiname></xref> </p> </entry> |
|
68 </row> |
|
69 <row> |
|
70 <entry><p> <b>Timer APIs</b> </p> </entry> |
|
71 </row> |
|
72 <row> |
|
73 <entry><p> <xref href="GUID-FD961A81-8D92-38D6-A2CE-F3215D5CCF38.dita"><apiname>timer_create()</apiname></xref> </p> </entry> |
|
74 </row> |
|
75 <row> |
|
76 <entry><p> <xref href="GUID-3C9E5145-5A20-3AE6-88C1-2D76BD68B2F0.dita"><apiname>timer_delete()</apiname></xref> </p> </entry> |
|
77 </row> |
|
78 <row> |
|
79 <entry><p> <xref href="GUID-C77553E5-ABEA-3253-B119-2F71C6241EAA.dita"><apiname>timer_getoverrun()</apiname></xref> </p> </entry> |
|
80 </row> |
|
81 <row> |
|
82 <entry><p> <xref href="GUID-F2DCFCBA-65B7-3184-B870-A63C6CF7EBA9.dita"><apiname>timer_gettime()</apiname></xref> </p> </entry> |
|
83 </row> |
|
84 <row> |
|
85 <entry><p> <xref href="GUID-5FE65EC4-4F2A-30C1-BA89-A92B1F9B1B2E.dita"><apiname>timer_settime</apiname></xref> </p> </entry> |
|
86 </row> |
|
87 </tbody> |
|
88 </tgroup> |
|
89 </table> </section> |
|
90 <section id="GUID-603A829A-AF5D-496D-9FFE-8EA3ADEAADBB"><title>Using Librt</title> <p>The following tutorials describe some |
|
91 high-level usage scenarios of the Librt library functions: </p> <ul> |
|
92 <li id="GUID-81EAC75C-5233-5440-95B9-E950AA7527BF"><p><xref href="GUID-8B37D53D-77E1-58C6-9A44-3376A450228B.dita">Shared |
|
93 Memory Tutorial</xref> </p> </li> |
|
94 <li id="GUID-BA00DA3A-FD9A-52CA-AA40-F1CB0CC571A5"><p><xref href="GUID-66402932-5C44-556B-A7AC-1C2D245C8B05.dita">Clocks |
|
95 and Timers Tutorial</xref> </p> </li> |
|
96 </ul> </section> |
|
97 </conbody></concept> |