<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.16"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>UbixOS: arch/armv6/fork.c File Reference</title> <link href="../../tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="../../jquery.js"></script> <script type="text/javascript" src="../../dynsections.js"></script> <link href="../../navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="../../resize.js"></script> <script type="text/javascript" src="../../navtreedata.js"></script> <script type="text/javascript" src="../../navtree.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(document).ready(initResizable); /* @license-end */</script> <link href="../../doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">UbixOS  <span id="projectnumber">2.0</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.16 --> <script type="text/javascript" src="../../menudata.js"></script> <script type="text/javascript" src="../../menu.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('../../',false,false,'search.php','Search'); }); /* @license-end */</script> <div id="main-nav"></div> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(document).ready(function(){initNavTree('d4/d43/armv6_2fork_8c.html','../../');}); /* @license-end */ </script> <div id="doc-content"> <div class="header"> <div class="summary"> <a href="#func-members">Functions</a> </div> <div class="headertitle"> <div class="title">fork.c File Reference</div> </div> </div><!--header--> <div class="contents"> <div class="textblock"><code>#include <<a class="el" href="../../d4/d7a/fork_8h_source.html">ubixos/fork.h</a>></code><br /> <code>#include <ubixos/types.h></code><br /> <code>#include <<a class="el" href="../../d7/d00/sched_8h_source.html">ubixos/sched.h</a>></code><br /> <code>#include <<a class="el" href="../../dd/d71/tty_8h_source.html">ubixos/tty.h</a>></code><br /> <code>#include <<a class="el" href="../../d2/d48/vitals_8h_source.html">ubixos/vitals.h</a>></code><br /> <code>#include <<a class="el" href="../../d1/d21/vmm_8h_source.html">vmm/vmm.h</a>></code><br /> <code>#include <<a class="el" href="../../da/d66/string_8h_source.html">string.h</a>></code><br /> <code>#include <<a class="el" href="../../dc/da7/assert_8h_source.html">assert.h</a>></code><br /> </div><div class="textblock"><div class="dynheader"> Include dependency graph for fork.c:</div> <div class="dyncontent"> <div class="center"><img src="../../df/de8/armv6_2fork_8c__incl.png" border="0" usemap="#arch_2armv6_2fork_8c" alt=""/></div> <map name="arch_2armv6_2fork_8c" id="arch_2armv6_2fork_8c"> <area shape="rect" title=" " alt="" coords="649,5,770,32"/> <area shape="rect" href="../../d4/d7a/fork_8h.html" title=" " alt="" coords="204,379,300,405"/> <area shape="rect" href="../../d7/d00/sched_8h.html" title=" " alt="" coords="130,453,241,480"/> <area shape="rect" href="../../dd/d71/tty_8h.html" title=" " alt="" coords="5,528,96,555"/> <area shape="rect" title=" " alt="" coords="2159,80,2265,107"/> <area shape="rect" href="../../d2/d48/vitals_8h.html" title=" " alt="" coords="851,80,955,107"/> <area shape="rect" href="../../d1/d21/vmm_8h.html" title=" " alt="" coords="303,304,393,331"/> <area shape="rect" href="../../da/d66/string_8h.html" title=" " alt="" coords="2098,677,2163,704"/> <area shape="rect" href="../../dc/da7/assert_8h.html" title=" " alt="" coords="2289,80,2359,107"/> <area shape="rect" href="../../d0/d27/include_2sys_2types_8h.html" title=" " alt="" coords="677,827,768,853"/> <area shape="rect" href="../../d0/d6f/__types_8h.html" title=" " alt="" coords="374,1051,471,1077"/> <area shape="rect" href="../../d9/dab/select_8h.html" title=" " alt="" coords="484,901,577,928"/> <area shape="rect" href="../../d6/d92/cdefs_8h.html" title=" " alt="" coords="613,976,702,1003"/> <area shape="rect" href="../../d6/d30/__timespec_8h.html" title=" " alt="" coords="165,976,283,1003"/> <area shape="rect" href="../../df/dc5/__timeval_8h.html" title=" " alt="" coords="307,976,413,1003"/> <area shape="rect" href="../../d6/da4/__sigset_8h.html" title=" " alt="" coords="437,976,537,1003"/> <area shape="rect" href="../../d6/db4/include_2vfs_2file_8h.html" title=" " alt="" coords="793,528,861,555"/> <area shape="rect" href="../../db/dd5/thread_8h.html" title=" " alt="" coords="538,603,633,629"/> <area shape="rect" href="../../de/d9a/tss_8h.html" title=" " alt="" coords="165,603,241,629"/> <area shape="rect" href="../../d1/de9/dirCache_8h.html" title=" " alt="" coords="1055,752,1177,779"/> <area shape="rect" href="../../d3/d73/inode_8h.html" title=" " alt="" coords="936,603,1019,629"/> <area shape="rect" href="../../df/d42/ufs_8h.html" title=" " alt="" coords="791,677,862,704"/> <area shape="rect" href="../../d2/d29/mount_8h.html" title=" " alt="" coords="1183,603,1271,629"/> <area shape="rect" href="../../d7/d0b/trap_8h.html" title=" " alt="" coords="468,677,548,704"/> <area shape="rect" href="../../df/d92/sys_2signal_8h.html" title=" " alt="" coords="623,677,715,704"/> <area shape="rect" href="../../d8/d01/resource_8h.html" title=" " alt="" coords="73,827,181,853"/> <area shape="rect" href="../../d6/d35/i386_2cpu_8h.html" title=" " alt="" coords="468,752,551,779"/> <area shape="rect" href="../../d1/df2/wait_8h.html" title=" " alt="" coords="1228,677,1327,704"/> <area shape="rect" href="../../d1/d7d/pipe__fs_8h.html" title=" " alt="" coords="1065,677,1153,704"/> <area shape="rect" href="../../d8/dff/msdos__fs_8h.html" title=" " alt="" coords="938,677,1041,704"/> <area shape="rect" href="../../d4/d7e/include_2sys_2device_8h.html" title=" " alt="" coords="794,752,889,779"/> <area shape="rect" href="../../df/d63/spinlock_8h.html" title=" " alt="" coords="433,229,556,256"/> <area shape="rect" href="../../db/da9/include_2vfs_2vfs_8h.html" title=" " alt="" coords="1087,155,1153,181"/> <area shape="rect" href="../../d3/d7e/sysproto__posix_8h.html" title=" " alt="" coords="639,453,785,480"/> <area shape="rect" href="../../d7/d97/net_8h.html" title=" " alt="" coords="1285,229,1358,256"/> <area shape="rect" href="../../d9/d69/netif_8h.html" title=" " alt="" coords="1463,304,1542,331"/> <area shape="rect" href="../../dc/dba/opt_8h.html" title=" " alt="" coords="1689,603,1762,629"/> <area shape="rect" href="../../d6/d40/err_8h.html" title=" " alt="" coords="1391,528,1462,555"/> <area shape="rect" href="../../de/df7/ip__addr_8h.html" title=" " alt="" coords="1594,379,1691,405"/> <area shape="rect" href="../../d4/da4/def_8h.html" title=" " alt="" coords="1571,528,1643,555"/> <area shape="rect" href="../../d0/d35/pbuf_8h.html" title=" " alt="" coords="1386,453,1465,480"/> <area shape="rect" href="../../d9/d9b/stats_8h.html" title=" " alt="" coords="1898,453,1982,480"/> <area shape="rect" href="../../d2/d78/lwipopts_8h.html" title=" " alt="" coords="1774,677,1877,704"/> <area shape="rect" href="../../db/d16/debug_8h.html" title=" " alt="" coords="1659,677,1749,704"/> <area shape="rect" href="../../d2/d2d/arch_8h.html" title=" " alt="" coords="1532,752,1612,779"/> <area shape="rect" href="../../d1/da8/ip4__addr_8h.html" title=" " alt="" coords="1591,453,1695,480"/> <area shape="rect" href="../../d3/d7d/ip6__addr_8h.html" title=" " alt="" coords="1719,453,1823,480"/> <area shape="rect" href="../../d9/d9a/mem_8h.html" title=" " alt="" coords="1898,528,1982,555"/> <area shape="rect" href="../../d4/df4/paging_8h.html" title=" " alt="" coords="469,379,571,405"/> <area shape="rect" href="../../d6/d90/strings_8h.html" title=" " alt="" coords="2095,752,2167,779"/> </map> </div> </div> <p><a href="../../d4/d43/armv6_2fork_8c_source.html">Go to the source code of this file.</a></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> Functions</h2></td></tr> <tr class="memitem:a86f90c245b03ff9e2f08ef0cd7943b54"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d43/armv6_2fork_8c.html#a86f90c245b03ff9e2f08ef0cd7943b54">asm</a> (".globl <a class="el" href="../../d4/d7a/fork_8h.html#ab9473dc5f399b5f40e8548b5c17f09ce">sysFork</a> \n" "sysFork: \n" " xor %eax,%eax \n" " call <a class="el" href="../../d7/d00/sched_8h.html#a92458df2063761371869cdfe0c9b4ee3">schedNewTask</a> \n" " testl %eax,%eax \n" " je fork_ret \n" " pushl %esi \n" " pushl %edi \n" " pushl %ebp \n" " pushl %eax \n" " call <a class="el" href="../../d9/d48/i386_2fork_8c.html#a193d99c9f4dbfbfaad8a1ef486582f2d">fork_copyProcess</a> \n" " movl %eax,(%ebx) \n" " addl $16,%esp \n" "fork_ret: \n" " ret \n")</td></tr> <tr class="separator:a86f90c245b03ff9e2f08ef0cd7943b54"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a193d99c9f4dbfbfaad8a1ef486582f2d"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d43/armv6_2fork_8c.html#a193d99c9f4dbfbfaad8a1ef486582f2d">fork_copyProcess</a> (struct <a class="el" href="../../d1/dff/structtaskStruct.html">taskStruct</a> *newProcess, long ebp, long edi, long esi, long none, long ebx, long ecx, long edx, long eip, long cs, long eflags, long esp, long ss)</td></tr> <tr class="separator:a193d99c9f4dbfbfaad8a1ef486582f2d"><td class="memSeparator" colspan="2"> </td></tr> </table> <h2 class="groupheader">Function Documentation</h2> <a id="a86f90c245b03ff9e2f08ef0cd7943b54"></a> <h2 class="memtitle"><span class="permalink"><a href="#a86f90c245b03ff9e2f08ef0cd7943b54">◆ </a></span>asm()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">asm </td> <td>(</td> <td class="paramtype">".globl <a class="el" href="../../d4/d7a/fork_8h.html#ab9473dc5f399b5f40e8548b5c17f09ce">sysFork</a> \n" "sysFork: \n" " xor % </td> <td class="paramname"><em>eax</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">%eax \n" " call <a class="el" href="../../d7/d00/sched_8h.html#a92458df2063761371869cdfe0c9b4ee3">schedNewTask</a> \n" " testl % </td> <td class="paramname"><em>eax</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">%eax \n" " je fork_ret \n" " pushl %esi \n" " pushl %edi \n" " pushl %ebp \n" " pushl %eax \n" " call <a class="el" href="../../d9/d48/i386_2fork_8c.html#a193d99c9f4dbfbfaad8a1ef486582f2d">fork_copyProcess</a> \n" " movl % </td> <td class="paramname"><em>eax</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">(%ebx) \n" " addl </td> <td class="paramname"><em>$16</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">%esp \n" "fork_ret:\n" " ret \n" </td> <td class="paramname"> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> </div> </div> <a id="a193d99c9f4dbfbfaad8a1ef486582f2d"></a> <h2 class="memtitle"><span class="permalink"><a href="#a193d99c9f4dbfbfaad8a1ef486582f2d">◆ </a></span>fork_copyProcess()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int fork_copyProcess </td> <td>(</td> <td class="paramtype">struct <a class="el" href="../../d1/dff/structtaskStruct.html">taskStruct</a> * </td> <td class="paramname"><em>newProcess</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">long </td> <td class="paramname"><em>ebp</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">long </td> <td class="paramname"><em>edi</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">long </td> <td class="paramname"><em>esi</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">long </td> <td class="paramname"><em>none</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">long </td> <td class="paramname"><em>ebx</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">long </td> <td class="paramname"><em>ecx</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">long </td> <td class="paramname"><em>edx</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">long </td> <td class="paramname"><em>eip</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">long </td> <td class="paramname"><em>cs</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">long </td> <td class="paramname"><em>eflags</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">long </td> <td class="paramname"><em>esp</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">long </td> <td class="paramname"><em>ss</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="../../d4/d43/armv6_2fork_8c_source.html#l00048">48</a> of file <a class="el" href="../../d4/d43/armv6_2fork_8c_source.html">fork.c</a>.</p> <p class="reference">References <a class="el" href="../../d3/d02/armv6_2sched_8c_source.html#l00050">_current</a>, <a class="el" href="../../dc/da7/assert_8h_source.html#l00064">assert</a>, <a class="el" href="../../de/d9a/tss_8h_source.html#l00035">tssStruct::back_link</a>, <a class="el" href="../../de/d9a/tss_8h_source.html#l00046">tssStruct::cr3</a>, <a class="el" href="../../de/d9a/tss_8h_source.html#l00056">tssStruct::cs</a>, <a class="el" href="../../d7/d00/sched_8h_source.html#l00058">osInfo::cwd</a>, <a class="el" href="../../de/d9a/tss_8h_source.html#l00060">tssStruct::ds</a>, <a class="el" href="../../de/d9a/tss_8h_source.html#l00049">tssStruct::eax</a>, <a class="el" href="../../de/d9a/tss_8h_source.html#l00051">tssStruct::ebp</a>, <a class="el" href="../../de/d9a/tss_8h_source.html#l00049">tssStruct::ebx</a>, <a class="el" href="../../de/d9a/tss_8h_source.html#l00049">tssStruct::ecx</a>, <a class="el" href="../../de/d9a/tss_8h_source.html#l00053">tssStruct::edi</a>, <a class="el" href="../../de/d9a/tss_8h_source.html#l00049">tssStruct::edx</a>, <a class="el" href="../../de/d9a/tss_8h_source.html#l00048">tssStruct::eflags</a>, <a class="el" href="../../de/d9a/tss_8h_source.html#l00047">tssStruct::eip</a>, <a class="el" href="../../de/d9a/tss_8h_source.html#l00054">tssStruct::es</a>, <a class="el" href="../../de/d9a/tss_8h_source.html#l00052">tssStruct::esi</a>, <a class="el" href="../../de/d9a/tss_8h_source.html#l00050">tssStruct::esp</a>, <a class="el" href="../../de/d9a/tss_8h_source.html#l00037">tssStruct::esp0</a>, <a class="el" href="../../de/d9a/tss_8h_source.html#l00040">tssStruct::esp1</a>, <a class="el" href="../../de/d9a/tss_8h_source.html#l00043">tssStruct::esp2</a>, <a class="el" href="../../d7/d00/sched_8h_source.html#l00047">FORK</a>, <a class="el" href="../../de/d9a/tss_8h_source.html#l00062">tssStruct::fs</a>, <a class="el" href="../../d7/d00/sched_8h_source.html#l00073">taskStruct::gid</a>, <a class="el" href="../../de/d9a/tss_8h_source.html#l00064">tssStruct::gs</a>, <a class="el" href="../../d7/d00/sched_8h_source.html#l00063">taskStruct::id</a>, <a class="el" href="../../de/d9a/tss_8h_source.html#l00069">tssStruct::io_map</a>, <a class="el" href="../../de/d9a/tss_8h_source.html#l00066">tssStruct::ldt</a>, <a class="el" href="../../da/d66/string_8h.html#ae33b18edb618c656b9b795b9fce2316c">memcpy()</a>, <a class="el" href="../../d7/d00/sched_8h_source.html#l00069">taskStruct::oInfo</a>, <a class="el" href="../../dd/d71/tty_8h_source.html#l00042">tty_termNode::owner</a>, <a class="el" href="../../d3/d02/armv6_2sched_8c_source.html#l00244">sched_yield()</a>, <a class="el" href="../../de/d9a/tss_8h_source.html#l00058">tssStruct::ss</a>, <a class="el" href="../../de/d9a/tss_8h_source.html#l00038">tssStruct::ss0</a>, <a class="el" href="../../de/d9a/tss_8h_source.html#l00041">tssStruct::ss1</a>, <a class="el" href="../../de/d9a/tss_8h_source.html#l00044">tssStruct::ss2</a>, <a class="el" href="../../d7/d00/sched_8h_source.html#l00072">taskStruct::state</a>, <a class="el" href="../../d7/d00/sched_8h_source.html#l00077">taskStruct::term</a>, <a class="el" href="../../de/d9a/tss_8h_source.html#l00068">tssStruct::trace_bitmap</a>, <a class="el" href="../../d7/d00/sched_8h_source.html#l00067">taskStruct::tss</a>, <a class="el" href="../../d7/d00/sched_8h_source.html#l00073">taskStruct::uid</a>, and <a class="el" href="../../d7/d00/sched_8h_source.html#l00054">osInfo::vmStart</a>.</p> <div class="dynheader"> Here is the call graph for this function:</div> <div class="dyncontent"> <div class="center"><img src="../../d4/d43/armv6_2fork_8c_a193d99c9f4dbfbfaad8a1ef486582f2d_cgraph.png" border="0" usemap="#d4/d43/armv6_2fork_8c_a193d99c9f4dbfbfaad8a1ef486582f2d_cgraph" alt=""/></div> <map name="d4/d43/armv6_2fork_8c_a193d99c9f4dbfbfaad8a1ef486582f2d_cgraph" id="d4/d43/armv6_2fork_8c_a193d99c9f4dbfbfaad8a1ef486582f2d_cgraph"> <area shape="rect" title=" " alt="" coords="5,31,132,57"/> <area shape="rect" href="../../da/d66/string_8h.html#ae33b18edb618c656b9b795b9fce2316c" title=" " alt="" coords="189,5,261,32"/> <area shape="rect" href="../../d3/d02/armv6_2sched_8c.html#a08933fe6d593a1c78b9080359f15a0b7" title=" " alt="" coords="180,56,271,83"/> </map> </div> </div> </div> </div><!-- contents --> </div><!-- doc-content --> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> <li class="navelem"><a class="el" href="../../dir_ea9599923402ca8ab47fc3e495999dea.html">arch</a></li><li class="navelem"><a class="el" href="../../dir_1a0345ad50f8290df9a6e9406901343e.html">armv6</a></li><li class="navelem"><a class="el" href="../../d4/d43/armv6_2fork_8c.html">fork.c</a></li> <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.16 </li> </ul> </div> </body> </html>