-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathlibinterfaceexpl.html
200 lines (195 loc) · 10.2 KB
/
libinterfaceexpl.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<!Doctype html>
<html lang="en">
<head>
<title>High Level Library Interface For expl</title>
<meta charset="UTF-8">
<!--<link rel="stylesheet" href="css/bootstrap.min.css">-->
<link rel="stylesheet" href="css/style_new.css">
<script src="js/jquery-1.12.1.min.js" charset="utf-8"></script>
<script src="js/bootstrap.min.js" charset="utf-8"></script>
<script src="js/sticky_sidebar.js" charset="utf-8"></script>
</head>
<div class="container">
<header id="navtop">
<a href="index.html" class="logo fleft"><img src="img/logo.png" alt=""></a>
<nav class="fright">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<!-- <li><a href="help.html">Help</a></li> -->
<li><a href="roadmap.html">Roadmap</a></li>
<li><a href="documentation.html" class="navactive">Documentation</a></li>
</ul>
</nav>
</header>
<div class="Services-page main grid-wrap">
<header class="grid col-full">
<hr/>
<!-- <p class="fleft">High Level Library Interface For eXpOS</p> -->
<!-- <br> -->
<br>
<!-- <a class="button" href="#">Download as PDF</a> -->
</header>
<aside class="grid col-one-quarter mq2-col-full sticky_sidebar">
</aside>
<section class="grid col-three-quarters mq2-col-full">
<div class="grid-wrap">
<article class="grid col-full" id="nav-intro">
<h2>High Level Library Interface For expl</h2>
<p>
The High Level Library Interface is a unified interface to access system call routines and dynamic memory management functions from application programs.
</p>
<p>
<table class="doctable">
<tr>
<th>Library Function / System Call</th>
<th>Function Code</th>
<th>Argument 1</th>
<th>Argument 2</th>
<th>Argument 3</th>
<th>Return Values</th>
</tr>
<tr>
<td rowspan="3">Read</td>
<td rowspan="3">"Read"</td>
<td rowspan="3">File Descriptor (int)</td>
<td rowspan="3">Buffer (int/str)<font color="red">*</font></td>
<td rowspan="3">-</td>
<td>0 - Success</tr>
<td>-1 - File Descriptor given is invalid</tr>
<td>-2 - File pointer has reached the end of file</tr>
</tr>
<tr>
<td rowspan="4">Write</td>
<td rowspan="4"> "Write"</td>
<td rowspan="4">File Descriptor (int)</td>
<td rowspan="4">Buffer (int/str)<font color="red">*</font></td>
<td rowspan="4">-</td>
<td>0 - Success</tr>
<td>-1 - File Descriptor given is invalid</tr>
<td>-2 - No disk space</tr>
<td>-3 - Permission denied</tr>
</tr>
<tr class = "active">
<td rowspan="2">Initialize</td>
<td rowspan="2">"Initialize"</td>
<td rowspan="2">-</td>
<td rowspan="2">-</td>
<td rowspan="2">-</td>
<td>0 - Success</tr>
<td>-1 - Failure</tr>
</tr>
<tr class = "active">
<td rowspan="2">Alloc</td>
<td rowspan="2">"Alloc"</td>
<td rowspan="2">Size (int)</td>
<td rowspan="2">-</td>
<td rowspan="2">-</td>
<td>Address in the heap allocated (int) </tr>
<td>-1 - No allocation</tr>
</tr>
<tr class = "active">
<td rowspan="2">Free</td>
<td rowspan="2">"Free"</td>
<td rowspan="2">Pointer (int)</td>
<td rowspan="2">-</td>
<td rowspan="2">-</td>
<td>0 - Success</tr>
<td>-1 - Failure</tr>
</tr>
</table>
<sup>
* foot note regarding buffer
</sup>
</p>
<p>
The description of the system calls can be seen here. The dynamic memory management routines are described below.
</p>
</article>
<article class="grid col-full" id="nav-data-types">
<h2>Dynamic Memory Routines</h2>
<h4>Initialize</h4>
<p>
<p>Arguments: None </p>
<p>Return Value:</p>
<table class="doctable">
<tr>
<td>0</td>
<td>Success</td>
</tr>
<tr>
<td>-1</td>
<td>Failure</td>
</tr>
</table>
<br>
<p>
Description: Intitalizes the heap data structures and sets up the heap area of the process.It is the applications responsibility to invoke Initialize() before the first use of Alloc(). The behaviour of Alloc() and Free() when invoked without an Intialize() operation is undefined. Any memory allocated before an Intialize() operation will be reclaimed for future allocation.
</p>
</p>
<h4>Alloc</h4>
<p>
<p>Arguments: Size (int) </p>
<p>Return Value:</p>
<table class="doctable">
<tr>
<td>integer</td>
<td>Address in the heap allocated</td>
</tr>
<tr>
<td>-1</td>
<td>No allocation</td>
</tr>
</table>
<br>
<p>
Description: The Alloc operation takes as input an integer, allocates contiguous words equal to the input specified and returns a pointer (i.e., an integer memory address) to the beginning of the allocated memory in the heap.
</p>
</p>
<h4>Free</h4>
<p>
<p>Arguments: Pointer (int)</p>
<p>Return Value:</p>
<table class="doctable">
<tr>
<td>0</td>
<td>Success</td>
</tr>
<tr>
<td>-1</td>
<td>Failure</td>
</tr>
</table>
<br>
<p>
Description: The Free operation takes a pointer (i.e., an integer memory address) of a previously allocated memory block and returns it to the heap memory pool. If the pointer does not correspond to a valid reference to the beginning of a previously allocated memory block, the behaviour of Free is not defined.
</p>
</p>
</article>
</div>
</section>
</div>
</div>
<footer class="center part clearfix">
<ul class="grid col-one-third social">
<li><a href="http://github.com/silcnitc">Github</a></li>
<li> <a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/">
<img alt="Creative Commons License" style="border-width:0" src="img/creativecommons.png" /></a></li>
</ul>
<div class="grid col-one-third" style="color:black;">
<p style="font-weight: bold;">Contributed By : <a href="https://www.linkedin.com/in/dattathallam">Thallam Sai Sree Datta</a>, <a href="https://www.linkedin.com/in/n-ruthviik-0a0539100">N Ruthvik</a>
</p>
</div>
<nav class="grid col-one-third ">
<ul >
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<!-- <li><a href="uc.html">Contact</a></li> -->
</ul>
</nav>
<br>
</footer>
<script>window.jQuery || document.write('<script src="js/jquery-1.7.2.min.js"><\/script>')</script>
<script src="js/scripts.js"></script>
<script src="js/inject.js"></script>
</html>