<?xml version='1.0' encoding='iso-8859-1' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.4.7">
  <compounddef id="fork_8c" kind="file">
    <compoundname>fork.c</compoundname>
    <includes refid="fork_8h" local="no">ubixos/fork.h</includes>
    <includes refid="types_8h" local="no">ubixos/types.h</includes>
    <includes refid="sched_8h" local="no">ubixos/sched.h</includes>
    <includes refid="tty_8h" local="no">ubixos/tty.h</includes>
    <includes refid="vitals_8h" local="no">ubixos/vitals.h</includes>
    <includes refid="vmm_8h" local="no">vmm/vmm.h</includes>
    <includes refid="string_8h" local="no">string.h</includes>
    <includes refid="assert_8h" local="no">assert.h</includes>
    <incdepgraph>
      <node id="5275">
        <label>sys/thread.h</label>
        <link refid="thread_8h"/>
        <childnode refid="5267" relation="include">
        </childnode>
      </node>
      <node id="5269">
        <label>ubixos/sched.h</label>
        <link refid="sched_8h"/>
        <childnode refid="5267" relation="include">
        </childnode>
        <childnode refid="5270" relation="include">
        </childnode>
        <childnode refid="5271" relation="include">
        </childnode>
        <childnode refid="5274" relation="include">
        </childnode>
        <childnode refid="5275" relation="include">
        </childnode>
      </node>
      <node id="5276">
        <label>ubixos/vitals.h</label>
        <link refid="vitals_8h"/>
        <childnode refid="5277" relation="include">
        </childnode>
        <childnode refid="5280" relation="include">
        </childnode>
      </node>
      <node id="5267">
        <label>ubixos/types.h</label>
        <link refid="types_8h"/>
        <childnode refid="5268" relation="include">
        </childnode>
      </node>
      <node id="5268">
        <label>sys/_types.h</label>
        <link refid="__types_8h"/>
      </node>
      <node id="5284">
        <label>vmm/paging.h</label>
        <link refid="paging_8h"/>
        <childnode refid="5267" relation="include">
        </childnode>
        <childnode refid="5281" relation="include">
        </childnode>
        <childnode refid="5275" relation="include">
        </childnode>
      </node>
      <node id="5285">
        <label>string.h</label>
        <link refid="string_8h"/>
        <childnode refid="5267" relation="include">
        </childnode>
      </node>
      <node id="5278">
        <label>ubixos/time.h</label>
        <link refid="time_8h"/>
        <childnode refid="5267" relation="include">
        </childnode>
        <childnode refid="5279" relation="include">
        </childnode>
      </node>
      <node id="5271">
        <label>vfs/file.h</label>
        <link refid="file_8h"/>
        <childnode refid="5267" relation="include">
        </childnode>
        <childnode refid="5272" relation="include">
        </childnode>
        <childnode refid="5273" relation="include">
        </childnode>
      </node>
      <node id="5265">
        <label>src/sys/kernel/fork.c</label>
        <link refid="fork.c"/>
        <childnode refid="5266" relation="include">
        </childnode>
        <childnode refid="5267" relation="include">
        </childnode>
        <childnode refid="5269" relation="include">
        </childnode>
        <childnode refid="5270" relation="include">
        </childnode>
        <childnode refid="5276" relation="include">
        </childnode>
        <childnode refid="5283" relation="include">
        </childnode>
        <childnode refid="5285" relation="include">
        </childnode>
        <childnode refid="5286" relation="include">
        </childnode>
      </node>
      <node id="5274">
        <label>sys/tss.h</label>
        <link refid="tss_8h"/>
        <childnode refid="5267" relation="include">
        </childnode>
      </node>
      <node id="5283">
        <label>vmm/vmm.h</label>
        <link refid="vmm_8h"/>
        <childnode refid="5284" relation="include">
        </childnode>
        <childnode refid="5267" relation="include">
        </childnode>
      </node>
      <node id="5266">
        <label>ubixos/fork.h</label>
        <link refid="fork_8h"/>
        <childnode refid="5267" relation="include">
        </childnode>
        <childnode refid="5269" relation="include">
        </childnode>
      </node>
      <node id="5280">
        <label>vfs/vfs.h</label>
        <link refid="vfs_8h"/>
        <childnode refid="5267" relation="include">
        </childnode>
        <childnode refid="5271" relation="include">
        </childnode>
        <childnode refid="5273" relation="include">
        </childnode>
        <childnode refid="5281" relation="include">
        </childnode>
        <childnode refid="5275" relation="include">
        </childnode>
      </node>
      <node id="5273">
        <label>vfs/mount.h</label>
        <link refid="mount_8h"/>
        <childnode refid="5267" relation="include">
        </childnode>
      </node>
      <node id="5286">
        <label>assert.h</label>
        <link refid="assert_8h"/>
      </node>
      <node id="5277">
        <label>ubixos/ubthread.h</label>
        <link refid="ubthread_8h"/>
        <childnode refid="5267" relation="include">
        </childnode>
        <childnode refid="5269" relation="include">
        </childnode>
        <childnode refid="5278" relation="include">
        </childnode>
      </node>
      <node id="5272">
        <label>ubixfs/dirCache.h</label>
        <link refid="dirCache_8h"/>
        <childnode refid="5267" relation="include">
        </childnode>
      </node>
      <node id="5281">
        <label>sys/sysproto.h</label>
        <link refid="sysproto_8h"/>
        <childnode refid="5282" relation="include">
        </childnode>
        <childnode refid="5275" relation="include">
        </childnode>
      </node>
      <node id="5282">
        <label>sys/signal.h</label>
        <link refid="signal_8h"/>
        <childnode refid="5267" relation="include">
        </childnode>
      </node>
      <node id="5270">
        <label>ubixos/tty.h</label>
        <link refid="tty_8h"/>
        <childnode refid="5267" relation="include">
        </childnode>
      </node>
      <node id="5279">
        <label>sys/io.h</label>
        <link refid="io_8h"/>
      </node>
    </incdepgraph>
      <sectiondef kind="func">
      <memberdef kind="function" id="fork_8c_1ce2d1e8711020f85a4f969f236938c9a" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type></type>
        <definition>asm</definition>
        <argsstring>(&quot;.globl sysFork           \n&quot;&quot;sysFork:                 \n&quot;&quot;  xor   %eax,%eax        \n&quot;&quot;  call  schedNewTask     \n&quot;&quot;  testl %eax,%eax        \n&quot;&quot;  je fork_ret            \n&quot;&quot;  pushl %esi             \n&quot;&quot;  pushl %edi             \n&quot;&quot;  pushl %ebp             \n&quot;&quot;  pushl %eax             \n&quot;&quot;  call  fork_copyProcess \n&quot;&quot;  movl  %eax,(%ebx)      \n&quot;&quot;  addl  $16,%esp         \n&quot;&quot;fork_ret:                \n&quot;&quot;  ret                    \n&quot;)</argsstring>
        <name>asm</name>
        <param>
          <type>&quot;.globl sysFork \n&quot;&quot;sysFork: \n&quot;&quot; xor %</type>
          <declname>eax</declname>
        </param>
        <param>
          <type>%<ref refid="strlen_8S_10d9c430c9a9cb6a66e192946a5554e3b" kindref="member">eax</ref>\n&quot;&quot;call schedNewTask\n&quot;&quot;testl%</type>
          <declname>eax</declname>
        </param>
        <param>
          <type>%<ref refid="strlen_8S_10d9c430c9a9cb6a66e192946a5554e3b" kindref="member">eax</ref>\n&quot;&quot;je fork_ret\n&quot;&quot;pushl%esi\n&quot;&quot;pushl%<ref refid="start_8S_1f701de0cc799320aaf54092dda7b54d2" kindref="member">edi</ref>\n&quot;&quot;pushl%ebp\n&quot;&quot;pushl%<ref refid="strlen_8S_10d9c430c9a9cb6a66e192946a5554e3b" kindref="member">eax</ref>\n&quot;&quot;call fork_copyProcess\n&quot;&quot;movl%</type>
          <declname>eax</declname>
        </param>
        <param>
          <type>(%<ref refid="ap-boot_8S_11c50f544178eb7e0af39bd078c5a986f" kindref="member">ebx</ref>)\n&quot;&quot;<ref refid="strcpy_8S_1428eb946c210f4154699290a0cd9fb70" kindref="member">addl</ref> $</type>
          <declname>16</declname>
        </param>
        <param>
          <type>%<ref refid="start_8S_1fba1069006eb01caca2f78a33f379594" kindref="member">esp</ref>\n&quot;&quot;fork_ret:\n&quot;&quot;ret\n&quot;</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/kernel/fork.c" line="128"/>
      </memberdef>
      <memberdef kind="function" id="fork_8c_1193d99c9f4dbfbfaad8a1ef486582f2d" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int fork_copyProcess</definition>
        <argsstring>(struct taskStruct *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)</argsstring>
        <name>fork_copyProcess</name>
        <param>
          <type>struct <ref refid="structtaskStruct" kindref="compound">taskStruct</ref> *</type>
          <declname>newProcess</declname>
        </param>
        <param>
          <type>long</type>
          <declname>ebp</declname>
        </param>
        <param>
          <type>long</type>
          <declname>edi</declname>
        </param>
        <param>
          <type>long</type>
          <declname>esi</declname>
        </param>
        <param>
          <type>long</type>
          <declname>none</declname>
        </param>
        <param>
          <type>long</type>
          <declname>ebx</declname>
        </param>
        <param>
          <type>long</type>
          <declname>ecx</declname>
        </param>
        <param>
          <type>long</type>
          <declname>edx</declname>
        </param>
        <param>
          <type>long</type>
          <declname>eip</declname>
        </param>
        <param>
          <type>long</type>
          <declname>cs</declname>
        </param>
        <param>
          <type>long</type>
          <declname>eflags</declname>
        </param>
        <param>
          <type>long</type>
          <declname>esp</declname>
        </param>
        <param>
          <type>long</type>
          <declname>ss</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/kernel/fork.c" line="50" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/kernel/fork.c" bodystart="50" bodyend="98"/>
        <references refid="sched_8h_154397bfe18d5da4d50ff03b15f540858" compoundref="sched_8c" startline="51">_current</references>
        <references refid="assert_8h_1d6d5aaa966ca7424f7cb9bd01f2c838b" compoundref="assert_8h" startline="64">assert</references>
        <references refid="structtssStruct_1fecbe8ea2cfebfb4d1a0aa7b6ebcac2c" compoundref="tss_8h" startline="36">tssStruct::back_link</references>
        <references refid="structtssStruct_18d312ed3dd0ea7a0f801c08a8cc4afd0" compoundref="tss_8h" startline="47">tssStruct::cr3</references>
        <references refid="structtssStruct_16d9085ec5af0fa1fe1de7015ad99c9e3" compoundref="tss_8h" startline="57">tssStruct::cs</references>
        <references refid="structosInfo_1e9411eaa7df66cd0148237248848bbdf" compoundref="sched_8h" startline="51">osInfo::cwd</references>
        <references refid="structtssStruct_101ee01c7f45c9b9ee2ad8338c21e6d33" compoundref="tss_8h" startline="61">tssStruct::ds</references>
        <references refid="structtssStruct_16f6c9fdd54cd0da7f2331dc35f7d8fc7" compoundref="tss_8h" startline="50">tssStruct::eax</references>
        <references refid="structtssStruct_1c2d32620149e07c40ee87696ef2509c2" compoundref="tss_8h" startline="52">tssStruct::ebp</references>
        <references refid="structtssStruct_1d0df6b4fe61e708d94656809727747cb" compoundref="tss_8h" startline="50">tssStruct::ebx</references>
        <references refid="structtssStruct_17ba37dceca6d9363ea799091138d4601" compoundref="tss_8h" startline="50">tssStruct::ecx</references>
        <references refid="structtssStruct_1a52b515706cd37e166c8eba348d5e68b" compoundref="tss_8h" startline="54">tssStruct::edi</references>
        <references refid="structtssStruct_175825d1693047c99df1911b3af4d613f" compoundref="tss_8h" startline="50">tssStruct::edx</references>
        <references refid="structtssStruct_1a85f1fbaf622e0c6a39963da27de0194" compoundref="tss_8h" startline="49">tssStruct::eflags</references>
        <references refid="structtssStruct_13e758f2138799d63fc803f7e4db4f5b4" compoundref="tss_8h" startline="48">tssStruct::eip</references>
        <references refid="structtssStruct_1cd97dd6f6eabd83c0b819b6058b7041d" compoundref="tss_8h" startline="55">tssStruct::es</references>
        <references refid="structtssStruct_18beab5808aad776957d4544f6b139d4e" compoundref="tss_8h" startline="53">tssStruct::esi</references>
        <references refid="structtssStruct_185412a87dbdb8eda612c77bce8055a2c" compoundref="tss_8h" startline="51">tssStruct::esp</references>
        <references refid="structtssStruct_11017372aed82d7305586c330fa222b3b" compoundref="tss_8h" startline="38">tssStruct::esp0</references>
        <references refid="structtssStruct_1d5ef8867200562fd8262f70312beff4d" compoundref="tss_8h" startline="41">tssStruct::esp1</references>
        <references refid="structtssStruct_160c88f3cd3f2110cb24be62444f42cfb" compoundref="tss_8h" startline="44">tssStruct::esp2</references>
        <references refid="sched_8h_13fb333b67375561d327e9b5a8ffa03b9eb5838b12f5849b4544c2d9d10dc6548">FORK</references>
        <references refid="structtssStruct_18114a585123181ec835f8db3e029d390" compoundref="tss_8h" startline="63">tssStruct::fs</references>
        <references refid="structtaskStruct_13cf9920106f9b0d96dff475faf7aa0d6" compoundref="sched_8h" startline="63">taskStruct::gid</references>
        <references refid="structtssStruct_18dfa44423504293405785371d0e7b076" compoundref="tss_8h" startline="65">tssStruct::gs</references>
        <references refid="structtaskStruct_130966587a60db6b40c8be6c387e11d81" compoundref="sched_8h" startline="55">taskStruct::id</references>
        <references refid="structtssStruct_1611a0a044f99f092ace469ce2381bb33" compoundref="tss_8h" startline="70">tssStruct::io_map</references>
        <references refid="structtssStruct_1d7b6a367e1c2a38e1ee6c8e5dad955f7" compoundref="tss_8h" startline="67">tssStruct::ldt</references>
        <references refid="lib_2string_8h_1e33b18edb618c656b9b795b9fce2316c">memcpy</references>
        <references refid="structtaskStruct_10933c70230d4ac8bc9953640c979f8d7" compoundref="sched_8h" startline="60">taskStruct::oInfo</references>
        <references refid="structtty__termNode_1f8e2ad49f523044768d8e768bfe531e4" compoundref="tty_8h" startline="43">tty_termNode::owner</references>
        <references refid="sched_8h_108933fe6d593a1c78b9080359f15a0b7" compoundref="sched_8c" startline="259" endline="261">sched_yield</references>
        <references refid="structtssStruct_1340a29782d3306ba84176c543725d70a" compoundref="tss_8h" startline="59">tssStruct::ss</references>
        <references refid="structtssStruct_126d03018de8c122451661bfe9d030541" compoundref="tss_8h" startline="39">tssStruct::ss0</references>
        <references refid="structtssStruct_16abf05d9a8f6356860a5606ffbadc989" compoundref="tss_8h" startline="42">tssStruct::ss1</references>
        <references refid="structtssStruct_15a79ace5652b01cc25fc5ba7ff45bfa8" compoundref="tss_8h" startline="45">tssStruct::ss2</references>
        <references refid="structtaskStruct_1b085a40e09975d9ebf55b393f9549710" compoundref="sched_8h" startline="62">taskStruct::state</references>
        <references refid="structtaskStruct_14563a310626d4f4ea885f4532356abb3" compoundref="sched_8h" startline="66">taskStruct::term</references>
        <references refid="structtssStruct_152ac0b54c6b2c71450c62d7fc911f2e2" compoundref="tss_8h" startline="69">tssStruct::trace_bitmap</references>
        <references refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" compoundref="sched_8h" startline="58">taskStruct::tss</references>
        <references refid="structtaskStruct_11f9e02ebf24ff1cd76fab75e4c6b0fe1" compoundref="sched_8h" startline="64">taskStruct::uid</references>
        <references refid="paging_8h_141985de19bd46cbe3b702cee74168dec" compoundref="copyvirtualspace_8c" startline="53" endline="206">vmmCopyVirtualSpace</references>
        <references refid="structosInfo_12833c1fa4a221941b5d1141dfa5beefd" compoundref="sched_8h" startline="47">osInfo::vmStart</references>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="comment">/*****************************************************************************************</highlight></codeline>
<codeline lineno="2"><highlight class="comment"><sp/>Copyright<sp/>(c)<sp/>2002-2004<sp/>The<sp/>UbixOS<sp/>Project</highlight></codeline>
<codeline lineno="3"><highlight class="comment"><sp/>All<sp/>rights<sp/>reserved.</highlight></codeline>
<codeline lineno="4"><highlight class="comment"></highlight></codeline>
<codeline lineno="5"><highlight class="comment"><sp/>Redistribution<sp/>and<sp/>use<sp/>in<sp/>source<sp/>and<sp/>binary<sp/>forms,<sp/>with<sp/>or<sp/>without<sp/>modification,<sp/>are</highlight></codeline>
<codeline lineno="6"><highlight class="comment"><sp/>permitted<sp/>provided<sp/>that<sp/>the<sp/>following<sp/>conditions<sp/>are<sp/>met:</highlight></codeline>
<codeline lineno="7"><highlight class="comment"></highlight></codeline>
<codeline lineno="8"><highlight class="comment"><sp/>Redistributions<sp/>of<sp/>source<sp/>code<sp/>must<sp/>retain<sp/>the<sp/>above<sp/>copyright<sp/>notice,<sp/>this<sp/>list<sp/>of</highlight></codeline>
<codeline lineno="9"><highlight class="comment"><sp/>conditions,<sp/>the<sp/>following<sp/>disclaimer<sp/>and<sp/>the<sp/>list<sp/>of<sp/>authors.<sp/><sp/>Redistributions<sp/>in<sp/>binary</highlight></codeline>
<codeline lineno="10"><highlight class="comment"><sp/>form<sp/>must<sp/>reproduce<sp/>the<sp/>above<sp/>copyright<sp/>notice,<sp/>this<sp/>list<sp/>of<sp/>conditions,<sp/>the<sp/>following</highlight></codeline>
<codeline lineno="11"><highlight class="comment"><sp/>disclaimer<sp/>and<sp/>the<sp/>list<sp/>of<sp/>authors<sp/>in<sp/>the<sp/>documentation<sp/>and/or<sp/>other<sp/>materials<sp/>provided</highlight></codeline>
<codeline lineno="12"><highlight class="comment"><sp/>with<sp/>the<sp/>distribution.<sp/>Neither<sp/>the<sp/>name<sp/>of<sp/>the<sp/>UbixOS<sp/>Project<sp/>nor<sp/>the<sp/>names<sp/>of<sp/>its</highlight></codeline>
<codeline lineno="13"><highlight class="comment"><sp/>contributors<sp/>may<sp/>be<sp/>used<sp/>to<sp/>endorse<sp/>or<sp/>promote<sp/>products<sp/>derived<sp/>from<sp/>this<sp/>software</highlight></codeline>
<codeline lineno="14"><highlight class="comment"><sp/>without<sp/>specific<sp/>prior<sp/>written<sp/>permission.</highlight></codeline>
<codeline lineno="15"><highlight class="comment"></highlight></codeline>
<codeline lineno="16"><highlight class="comment"><sp/>THIS<sp/>SOFTWARE<sp/>IS<sp/>PROVIDED<sp/>BY<sp/>THE<sp/>COPYRIGHT<sp/>HOLDERS<sp/>AND<sp/>CONTRIBUTORS<sp/>&quot;AS<sp/>IS&quot;<sp/>AND<sp/>ANY</highlight></codeline>
<codeline lineno="17"><highlight class="comment"><sp/>EXPRESS<sp/>OR<sp/>IMPLIED<sp/>WARRANTIES,<sp/>INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>THE<sp/>IMPLIED<sp/>WARRANTIES<sp/>OF</highlight></codeline>
<codeline lineno="18"><highlight class="comment"><sp/>MERCHANTABILITY<sp/>AND<sp/>FITNESS<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE<sp/>ARE<sp/>DISCLAIMED.<sp/>IN<sp/>NO<sp/>EVENT<sp/>SHALL</highlight></codeline>
<codeline lineno="19"><highlight class="comment"><sp/>THE<sp/>COPYRIGHT<sp/>OWNER<sp/>OR<sp/>CONTRIBUTORS<sp/>BE<sp/>LIABLE<sp/>FOR<sp/>ANY<sp/>DIRECT,<sp/>INDIRECT,<sp/>INCIDENTAL,</highlight></codeline>
<codeline lineno="20"><highlight class="comment"><sp/>SPECIAL,<sp/>EXEMPLARY,<sp/>OR<sp/>CONSEQUENTIAL<sp/>DAMAGES<sp/>(INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>PROCUREMENT</highlight></codeline>
<codeline lineno="21"><highlight class="comment"><sp/>OF<sp/>SUBSTITUTE<sp/>GOODS<sp/>OR<sp/>SERVICES;<sp/>LOSS<sp/>OF<sp/>USE,<sp/>DATA,<sp/>OR<sp/>PROFITS;<sp/>OR<sp/>BUSINESS<sp/>INTERRUPTION)</highlight></codeline>
<codeline lineno="22"><highlight class="comment"><sp/>HOWEVER<sp/>CAUSED<sp/>AND<sp/>ON<sp/>ANY<sp/>THEORY<sp/>OF<sp/>LIABILITY,<sp/>WHETHER<sp/>IN<sp/>CONTRACT,<sp/>STRICT<sp/>LIABILITY,<sp/>OR</highlight></codeline>
<codeline lineno="23"><highlight class="comment"><sp/>TORT<sp/>(INCLUDING<sp/>NEGLIGENCE<sp/>OR<sp/>OTHERWISE)<sp/>ARISING<sp/>IN<sp/>ANY<sp/>WAY<sp/>OUT<sp/>OF<sp/>THE<sp/>USE<sp/>OF<sp/>THIS</highlight></codeline>
<codeline lineno="24"><highlight class="comment"><sp/>SOFTWARE,<sp/>EVEN<sp/>IF<sp/>ADVISED<sp/>OF<sp/>THE<sp/>POSSIBILITY<sp/>OF<sp/>SUCH<sp/>DAMAGE.</highlight></codeline>
<codeline lineno="25"><highlight class="comment"></highlight></codeline>
<codeline lineno="26"><highlight class="comment"><sp/>$Id: fork_8c.xml 88 2016-01-12 00:11:29Z reddawg $</highlight></codeline>
<codeline lineno="27"><highlight class="comment"></highlight></codeline>
<codeline lineno="28"><highlight class="comment">*****************************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="29"><highlight class="normal"></highlight></codeline>
<codeline lineno="30"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="fork_8h" kindref="compound">ubixos/fork.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="types_8h" kindref="compound">ubixos/types.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="32"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="sched_8h" kindref="compound">ubixos/sched.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="33"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="tty_8h" kindref="compound">ubixos/tty.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="34"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="vitals_8h" kindref="compound">ubixos/vitals.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="35"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="vmm_8h" kindref="compound">vmm/vmm.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="36"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="string_8h" kindref="compound">string.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="37"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="assert_8h" kindref="compound">assert.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><highlight class="normal"></highlight></codeline>
<codeline lineno="39"><highlight class="normal"></highlight><highlight class="comment">/*****************************************************************************************</highlight></codeline>
<codeline lineno="40"><highlight class="comment"><sp/>Functoin:<sp/>static<sp/>int<sp/>fork_copyProcess(struct<sp/>taskStruct<sp/>*newProcess,long<sp/>ebp,long<sp/>edi,</highlight></codeline>
<codeline lineno="41"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>long<sp/>esi,<sp/>long<sp/>none,long<sp/>ebx,long<sp/>ecx,long<sp/>edx,long<sp/>eip,long<sp/>cs,long<sp/>eflags,</highlight></codeline>
<codeline lineno="42"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>long<sp/>esp,long<sp/>ss)</highlight></codeline>
<codeline lineno="43"><highlight class="comment"><sp/></highlight></codeline>
<codeline lineno="44"><highlight class="comment"><sp/>Desc:<sp/>This<sp/>function<sp/>will<sp/>copy<sp/>a<sp/>process</highlight></codeline>
<codeline lineno="45"><highlight class="comment"></highlight></codeline>
<codeline lineno="46"><highlight class="comment"><sp/>Notes:</highlight></codeline>
<codeline lineno="47"><highlight class="comment"></highlight></codeline>
<codeline lineno="48"><highlight class="comment">*****************************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="49"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Had<sp/>to<sp/>remove<sp/>static<sp/>though<sp/>tihs<sp/>function<sp/>is<sp/>only<sp/>used<sp/>in<sp/>this<sp/>file<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="50" refid="fork_8c_1193d99c9f4dbfbfaad8a1ef486582f2d" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="fork_8c_1193d99c9f4dbfbfaad8a1ef486582f2d" kindref="member">fork_copyProcess</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structtaskStruct" kindref="compound">taskStruct</ref><sp/>*newProcess,</highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/><ref refid="structi386__frame_1dcf6812a951acee52fce378a3c935b1f" kindref="member">ebp</ref>,</highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/><ref refid="start_8S_1f701de0cc799320aaf54092dda7b54d2" kindref="member">edi</ref>,</highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/><ref refid="structi386__frame_14e207fc8d3fe3eb3024826fd73774b74" kindref="member">esi</ref>,</highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>none,</highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/><ref refid="ap-boot_8S_18771927de13b84dd7f9deec6024f83df" kindref="member">ebx</ref>,</highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/><ref refid="structi386__frame_19c070d809c0e3a61dae1e627e2175194" kindref="member">ecx</ref>,</highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/><ref refid="timer_8S_115bdf6d1016b28a29ed53c35bcc6113b" kindref="member">edx</ref>,</highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/><ref refid="structi386__frame_1ef87f1d1d6f1ad030c95773e7eedfa16" kindref="member">eip</ref>,</highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/><ref refid="structi386__frame_19f6fc16fdbb8b50c1bb918752f24b4bd" kindref="member">cs</ref>,</highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>eflags,</highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/><ref refid="start_8S_100530026cdfd3cedfaee7ac4ec46aa53" kindref="member">esp</ref>,</highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/><ref refid="structi386__frame_14f72b16e5f2ff034afa82de9229face6" kindref="member">ss</ref>)<sp/>{</highlight></codeline>
<codeline lineno="51"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">volatile</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structtaskStruct" kindref="compound">taskStruct</ref><sp/>*<sp/>tmpProcPtr<sp/>=<sp/>newProcess;</highlight></codeline>
<codeline lineno="52"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1d6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(newProcess);</highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/><ref refid="assert_8h_1d6d5aaa966ca7424f7cb9bd01f2c838b" kindref="member">assert</ref>(<ref refid="sched_8h_154397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>);</highlight></codeline>
<codeline lineno="54"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="55"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Set<sp/>Up<sp/>New<sp/>Tasks<sp/>Information<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="56"><highlight class="normal"><sp/><sp/><ref refid="lib_2string_8h_1e33b18edb618c656b9b795b9fce2316c" kindref="member">memcpy</ref>(newProcess-&gt;<ref refid="structtaskStruct_10933c70230d4ac8bc9953640c979f8d7" kindref="member">oInfo</ref>.<ref refid="structosInfo_1e9411eaa7df66cd0148237248848bbdf" kindref="member">cwd</ref>,<ref refid="sched_8h_154397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_10933c70230d4ac8bc9953640c979f8d7" kindref="member">oInfo</ref>.<ref refid="structosInfo_1e9411eaa7df66cd0148237248848bbdf" kindref="member">cwd</ref>,1024);</highlight></codeline>
<codeline lineno="57"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="58"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_13e758f2138799d63fc803f7e4db4f5b4" kindref="member">eip</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>eip;</highlight></codeline>
<codeline lineno="59"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_10933c70230d4ac8bc9953640c979f8d7" kindref="member">oInfo</ref>.<ref refid="structosInfo_12833c1fa4a221941b5d1141dfa5beefd" kindref="member">vmStart</ref><sp/><sp/><sp/><sp/>=<sp/><ref refid="sched_8h_154397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_10933c70230d4ac8bc9953640c979f8d7" kindref="member">oInfo</ref>.<ref refid="structosInfo_12833c1fa4a221941b5d1141dfa5beefd" kindref="member">vmStart</ref>;</highlight></codeline>
<codeline lineno="60"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14563a310626d4f4ea885f4532356abb3" kindref="member">term</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/><ref refid="sched_8h_154397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_14563a310626d4f4ea885f4532356abb3" kindref="member">term</ref>;</highlight></codeline>
<codeline lineno="61"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14563a310626d4f4ea885f4532356abb3" kindref="member">term</ref>-&gt;<ref refid="structtty__termNode_1f8e2ad49f523044768d8e768bfe531e4" kindref="member">owner</ref><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>newProcess-&gt;<ref refid="structtaskStruct_130966587a60db6b40c8be6c387e11d81" kindref="member">id</ref>;</highlight></codeline>
<codeline lineno="62"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_11f9e02ebf24ff1cd76fab75e4c6b0fe1" kindref="member">uid</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/><ref refid="sched_8h_154397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_11f9e02ebf24ff1cd76fab75e4c6b0fe1" kindref="member">uid</ref>;</highlight></codeline>
<codeline lineno="63"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_13cf9920106f9b0d96dff475faf7aa0d6" kindref="member">gid</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/><ref refid="sched_8h_154397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_13cf9920106f9b0d96dff475faf7aa0d6" kindref="member">gid</ref>;</highlight></codeline>
<codeline lineno="64"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_1fecbe8ea2cfebfb4d1a0aa7b6ebcac2c" kindref="member">back_link</ref><sp/><sp/><sp/><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="65"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_11017372aed82d7305586c330fa222b3b" kindref="member">esp0</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/><ref refid="sched_8h_154397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_11017372aed82d7305586c330fa222b3b" kindref="member">esp0</ref>;</highlight></codeline>
<codeline lineno="66"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_126d03018de8c122451661bfe9d030541" kindref="member">ss0</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>0x10;</highlight></codeline>
<codeline lineno="67"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_1d5ef8867200562fd8262f70312beff4d" kindref="member">esp1</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_16abf05d9a8f6356860a5606ffbadc989" kindref="member">ss1</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_160c88f3cd3f2110cb24be62444f42cfb" kindref="member">esp2</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_15a79ace5652b01cc25fc5ba7ff45bfa8" kindref="member">ss2</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_1a85f1fbaf622e0c6a39963da27de0194" kindref="member">eflags</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>eflags;</highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_16f6c9fdd54cd0da7f2331dc35f7d8fc7" kindref="member">eax</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_1d0df6b4fe61e708d94656809727747cb" kindref="member">ebx</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>ebx;</highlight></codeline>
<codeline lineno="74"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_17ba37dceca6d9363ea799091138d4601" kindref="member">ecx</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>ecx;</highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_175825d1693047c99df1911b3af4d613f" kindref="member">edx</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>edx;</highlight></codeline>
<codeline lineno="76"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_18beab5808aad776957d4544f6b139d4e" kindref="member">esi</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>esi;</highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_1a52b515706cd37e166c8eba348d5e68b" kindref="member">edi</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>edi;</highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_1c2d32620149e07c40ee87696ef2509c2" kindref="member">ebp</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>ebp;</highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_185412a87dbdb8eda612c77bce8055a2c" kindref="member">esp</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>esp;</highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_16d9085ec5af0fa1fe1de7015ad99c9e3" kindref="member">cs</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>cs<sp/>&amp;<sp/>0xFF;</highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_1340a29782d3306ba84176c543725d70a" kindref="member">ss</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>ss<sp/>&amp;<sp/>0xFF;</highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_101ee01c7f45c9b9ee2ad8338c21e6d33" kindref="member">ds</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/><ref refid="sched_8h_154397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_101ee01c7f45c9b9ee2ad8338c21e6d33" kindref="member">ds</ref><sp/>&amp;<sp/>0xFF;</highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_18114a585123181ec835f8db3e029d390" kindref="member">fs</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/><ref refid="sched_8h_154397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_18114a585123181ec835f8db3e029d390" kindref="member">fs</ref><sp/>&amp;<sp/>0xFF;</highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_18dfa44423504293405785371d0e7b076" kindref="member">gs</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/><ref refid="sched_8h_154397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_18dfa44423504293405785371d0e7b076" kindref="member">gs</ref><sp/>&amp;<sp/>0xFF;</highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_1cd97dd6f6eabd83c0b819b6058b7041d" kindref="member">es</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/><ref refid="sched_8h_154397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_1cd97dd6f6eabd83c0b819b6058b7041d" kindref="member">es</ref><sp/>&amp;<sp/>0xFF;</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_1d7b6a367e1c2a38e1ee6c8e5dad955f7" kindref="member">ldt</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>0x18;</highlight></codeline>
<codeline lineno="87"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_152ac0b54c6b2c71450c62d7fc911f2e2" kindref="member">trace_bitmap</ref><sp/>=<sp/>0x0000;</highlight></codeline>
<codeline lineno="88"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_1611a0a044f99f092ace469ce2381bb33" kindref="member">io_map</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>0x8000;</highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Create<sp/>A<sp/>Copy<sp/>Of<sp/>The<sp/>VM<sp/>Space<sp/>For<sp/>New<sp/>Task<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="90"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_14c8accd7c0d5bb5ce426dc982bfc8519" kindref="member">tss</ref>.<ref refid="structtssStruct_18d312ed3dd0ea7a0f801c08a8cc4afd0" kindref="member">cr3</ref><sp/>=<sp/>(<ref refid="types_8h_15847ea0262a5aa61eee48cbe95544a78" kindref="member">uInt32</ref>)<ref refid="paging_8h_141985de19bd46cbe3b702cee74168dec" kindref="member">vmmCopyVirtualSpace</ref>(newProcess-&gt;<ref refid="structtaskStruct_130966587a60db6b40c8be6c387e11d81" kindref="member">id</ref>);</highlight></codeline>
<codeline lineno="91"><highlight class="normal"><sp/><sp/>newProcess-&gt;<ref refid="structtaskStruct_1b085a40e09975d9ebf55b393f9549710" kindref="member">state</ref><sp/>=<sp/><ref refid="sched_8h_13fb333b67375561d327e9b5a8ffa03b9eb5838b12f5849b4544c2d9d10dc6548" kindref="member">FORK</ref>;</highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/></highlight></codeline>
<codeline lineno="93"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Fix<sp/>gcc<sp/>optimization<sp/>problems<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="94"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(tmpProcPtr-&gt;<ref refid="structtaskStruct_1b085a40e09975d9ebf55b393f9549710" kindref="member">state</ref><sp/>==<sp/><ref refid="sched_8h_13fb333b67375561d327e9b5a8ffa03b9eb5838b12f5849b4544c2d9d10dc6548" kindref="member">FORK</ref>)<sp/><ref refid="sched_8h_108933fe6d593a1c78b9080359f15a0b7" kindref="member">sched_yield</ref>();</highlight></codeline>
<codeline lineno="95"><highlight class="normal"></highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Return<sp/>Id<sp/>of<sp/>Proccess<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(newProcess-&gt;<ref refid="structtaskStruct_130966587a60db6b40c8be6c387e11d81" kindref="member">id</ref>);</highlight></codeline>
<codeline lineno="98"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/></highlight></codeline>
<codeline lineno="100"><highlight class="normal"></highlight><highlight class="comment">/*****************************************************************************************</highlight></codeline>
<codeline lineno="101"><highlight class="comment"><sp/>Functoin:<sp/>void<sp/>sysFork();</highlight></codeline>
<codeline lineno="102"><highlight class="comment"><sp/></highlight></codeline>
<codeline lineno="103"><highlight class="comment"><sp/>Desc:<sp/>This<sp/>function<sp/>will<sp/>fork<sp/>a<sp/>new<sp/>task</highlight></codeline>
<codeline lineno="104"><highlight class="comment"></highlight></codeline>
<codeline lineno="105"><highlight class="comment"><sp/>Notes:</highlight></codeline>
<codeline lineno="106"><highlight class="comment"><sp/></highlight></codeline>
<codeline lineno="107"><highlight class="comment"><sp/><sp/><sp/>08/01/02<sp/>-<sp/>This<sp/>Seems<sp/>To<sp/>Be<sp/>Working<sp/>Fine<sp/>However<sp/>I&apos;m<sp/>Not<sp/>Sure<sp/>If<sp/>I</highlight></codeline>
<codeline lineno="108"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Chose<sp/>The<sp/>Best<sp/>Path<sp/>To<sp/>Impliment<sp/>It<sp/>I<sp/>Guess<sp/>We<sp/>Will<sp/>See</highlight></codeline>
<codeline lineno="109"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>What<sp/>The<sp/>Future<sp/>May<sp/>Bring<sp/></highlight></codeline>
<codeline lineno="110"><highlight class="comment"></highlight></codeline>
<codeline lineno="111"><highlight class="comment">*****************************************************************************************/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="112"><highlight class="normal"></highlight><highlight class="keyword">asm</highlight><highlight class="normal">(</highlight></codeline>
<codeline lineno="113"><highlight class="normal"><sp/><sp/></highlight><highlight class="stringliteral">&quot;.globl<sp/>sysFork<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>\n&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="114"><highlight class="normal"><sp/><sp/></highlight><highlight class="stringliteral">&quot;sysFork:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>\n&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="115"><highlight class="normal"><sp/><sp/></highlight><highlight class="stringliteral">&quot;<sp/><sp/>xor<sp/><sp/><sp/>%eax,%eax<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>\n&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="116"><highlight class="normal"><sp/><sp/></highlight><highlight class="stringliteral">&quot;<sp/><sp/>call<sp/><sp/>schedNewTask<sp/><sp/><sp/><sp/><sp/>\n&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="117"><highlight class="normal"><sp/><sp/></highlight><highlight class="stringliteral">&quot;<sp/><sp/>testl<sp/>%eax,%eax<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>\n&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="118"><highlight class="normal"><sp/><sp/></highlight><highlight class="stringliteral">&quot;<sp/><sp/>je<sp/>fork_ret<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>\n&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="119"><highlight class="normal"><sp/><sp/></highlight><highlight class="stringliteral">&quot;<sp/><sp/>pushl<sp/>%esi<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>\n&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="120"><highlight class="normal"><sp/><sp/></highlight><highlight class="stringliteral">&quot;<sp/><sp/>pushl<sp/>%edi<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>\n&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="121"><highlight class="normal"><sp/><sp/></highlight><highlight class="stringliteral">&quot;<sp/><sp/>pushl<sp/>%ebp<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>\n&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="122"><highlight class="normal"><sp/><sp/></highlight><highlight class="stringliteral">&quot;<sp/><sp/>pushl<sp/>%eax<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>\n&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="123"><highlight class="normal"><sp/><sp/></highlight><highlight class="stringliteral">&quot;<sp/><sp/>call<sp/><sp/>fork_copyProcess<sp/>\n&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="124"><highlight class="normal"><sp/><sp/></highlight><highlight class="stringliteral">&quot;<sp/><sp/>movl<sp/><sp/>%eax,(%ebx)<sp/><sp/><sp/><sp/><sp/><sp/>\n&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="125"><highlight class="normal"><sp/><sp/></highlight><highlight class="stringliteral">&quot;<sp/><sp/>addl<sp/><sp/>$16,%esp<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>\n&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="126"><highlight class="normal"><sp/><sp/></highlight><highlight class="stringliteral">&quot;fork_ret:<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>\n&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="127"><highlight class="normal"><sp/><sp/></highlight><highlight class="stringliteral">&quot;<sp/><sp/>ret<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>\n&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="128"><highlight class="normal"><sp/><sp/>);</highlight></codeline>
<codeline lineno="129"><highlight class="normal"></highlight></codeline>
<codeline lineno="130"><highlight class="normal"></highlight><highlight class="comment">/***</highlight></codeline>
<codeline lineno="131"><highlight class="comment"><sp/>END</highlight></codeline>
<codeline lineno="132"><highlight class="comment"><sp/>***/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="133"><highlight class="normal"></highlight></codeline>
    </programlisting>
    <location file="/usr/home/reddawg/source/ubix2/src/sys/kernel/fork.c"/>
  </compounddef>
</doxygen>
