
Added initial support Xilinx Embedded Software. Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
139 lines
6.9 KiB
HTML
Executable file
139 lines
6.9 KiB
HTML
Executable file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
|
<title>2014.1_doc: mem.c File Reference</title>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
|
</head><body>
|
|
<!-- Generated by Doxygen 1.4.5 -->
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
|
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
|
<li><a href="dirs.html"><span>Directories</span></a></li>
|
|
</ul></div>
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="files.html"><span>File List</span></a></li>
|
|
<li><a href="globals.html"><span>Globals</span></a></li>
|
|
</ul></div>
|
|
<div class="nav">
|
|
<a class="el" href="dir_U_3A_2Fdoxygen_5Fpublish_2Fsources_2Fbsp_2Fxilkernel_5Fv6_5F0_2Fsrc_2Fsrc_2F.html">src</a> » <a class="el" href="dir_U_3A_2Fdoxygen_5Fpublish_2Fsources_2Fbsp_2Fxilkernel_5Fv6_5F0_2Fsrc_2Fsrc_2Fsys_2F.html">sys</a></div>
|
|
<h1>mem.c File Reference</h1><code>#include <stdio.h></code><br>
|
|
<code>#include <<a class="el" href="os__config_8h.html">os_config.h</a>></code><br>
|
|
<code>#include <<a class="el" href="config__cparam_8h.html">config/config_cparam.h</a>></code><br>
|
|
<code>#include <<a class="el" href="config__param_8h.html">config/config_param.h</a>></code><br>
|
|
<code>#include <sys/arch.h></code><br>
|
|
<code>#include <<a class="el" href="process_8h.html">sys/process.h</a>></code><br>
|
|
<code>#include <<a class="el" href="mem_8h.html">sys/mem.h</a>></code><br>
|
|
<code>#include <<a class="el" href="init_8h.html">sys/init.h</a>></code><br>
|
|
<code>#include <<a class="el" href="shm_8h.html">sys/shm.h</a>></code><br>
|
|
<code>#include <<a class="el" href="kmsg_8h.html">sys/kmsg.h</a>></code><br>
|
|
<code>#include <<a class="el" href="kpthread_8h.html">sys/kpthread.h</a>></code><br>
|
|
<code>#include <<a class="el" href="ksched_8h.html">sys/ksched.h</a>></code><br>
|
|
<code>#include <<a class="el" href="decls_8h.html">sys/decls.h</a>></code><br>
|
|
<code>#include <<a class="el" href="bufmalloc_8h.html">sys/bufmalloc.h</a>></code><br>
|
|
<code>#include <errno.h></code><br>
|
|
<table border="0" cellpadding="0" cellspacing="0">
|
|
<tr><td></td></tr>
|
|
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="mem_8c.html#2474f08da78e9873ce0a65210c5bd2b6">alloc_pidq_mem</a> (queuep queue, unsigned int qtype, unsigned int qno)</td></tr>
|
|
|
|
<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">pid_t </td><td class="memItemRight" valign="bottom"><a class="el" href="mem_8c.html#e20be355b36c911871b9d489b30b93be">pid_queue_mem</a> [PID_QUEUE_MSIZE]</td></tr>
|
|
|
|
</table>
|
|
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
|
This contains the Memory allocation routines.<ul>
|
|
<li>All the memory initialization routines for various system modules is defined here. The memory for all the modules are allocated statically, the size of which can be configured by the user. This can be specified in structures defined in sys/init.c. Based on this the total memory requirements for each module is calculated.</li><li>This also contains routines that allocate thread context and buffer management. </li></ul>
|
|
<hr><h2>Function Documentation</h2>
|
|
<a class="anchor" name="2474f08da78e9873ce0a65210c5bd2b6"></a><!-- doxytag: member="mem.c::alloc_pidq_mem" ref="2474f08da78e9873ce0a65210c5bd2b6" args="(queuep queue, unsigned int qtype, unsigned int qno)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">void alloc_pidq_mem </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top">queuep </td>
|
|
<td class="mdname" nowrap> <em>queue</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>unsigned int </td>
|
|
<td class="mdname" nowrap> <em>qtype</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>unsigned int </td>
|
|
<td class="mdname" nowrap> <em>qno</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md"></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
Allocate memory to the process ID queue's.<ul>
|
|
<li>This includes the Ready_Q and Semaphore_Q. Initial memory is allocated for Ready queue, followed by the semaphore queue. <dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>queue</em> </td><td>is the queue of PIDs</td></tr>
|
|
</table>
|
|
</dl>
|
|
</li></ul>
|
|
<p>
|
|
qtype is the queue type. Can be READY_Q or SEMA_Q<ul>
|
|
<li>qno is the Queue number. (eg) There are N_PRIO number of Ready Queue. The qno denotes this number. Memory for queues is allocated sequentially. <dl compact><dt><b>Returns:</b></dt><dd><ul>
|
|
<li>None </li></ul>
|
|
</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd><ul>
|
|
<li>SEMA_Q is valid only if CONFIG_SEMA is defined. </li></ul>
|
|
</dd></dl>
|
|
</li></ul>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<hr><h2>Variable Documentation</h2>
|
|
<a class="anchor" name="e20be355b36c911871b9d489b30b93be"></a><!-- doxytag: member="mem.c::pid_queue_mem" ref="e20be355b36c911871b9d489b30b93be" args="[PID_QUEUE_MSIZE]" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">pid_t <a class="el" href="mem_8c.html#e20be355b36c911871b9d489b30b93be">pid_queue_mem</a>[PID_QUEUE_MSIZE] </td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
Memory allocated for storing Process IDs. This memory is used for Ready Queue and Semaphore Queue. The memory is split as follows:<ol type=1>
|
|
<li>Memory for Ready Queue's.</li><li>Memory for Semaphore Queue's. </li></ol>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<hr size="1"><address style="align: right;"><small>Generated on Thu Feb 13 14:46:24 2014 for 2014.1_doc by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.5 </small></address>
|
|
</body>
|
|
</html>
|