<?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="gen__calls_8c" kind="file">
    <compoundname>gen_calls.c</compoundname>
    <includes refid="types_8h" local="no">ubixos/types.h</includes>
    <includes refid="thread_8h" local="no">sys/thread.h</includes>
    <includes refid="gen__calls_8h" local="no">sys/gen_calls.h</includes>
    <includes refid="kern__descrip_8h" local="no">sys/kern_descrip.h</includes>
    <includes refid="sched_8h" local="no">ubixos/sched.h</includes>
    <includes refid="kprintf_8h" local="no">lib/kprintf.h</includes>
    <includes refid="kmalloc_8h" local="no">lib/kmalloc.h</includes>
    <includes refid="string_8h" local="no">string.h</includes>
    <includes refid="assert_8h" local="no">assert.h</includes>
    <incdepgraph>
      <node id="5291">
        <label>sys/thread.h</label>
        <link refid="thread_8h"/>
        <childnode refid="5289" relation="include">
        </childnode>
      </node>
      <node id="5299">
        <label>ubixos/sched.h</label>
        <link refid="sched_8h"/>
        <childnode refid="5289" relation="include">
        </childnode>
        <childnode refid="5300" relation="include">
        </childnode>
        <childnode refid="5296" relation="include">
        </childnode>
        <childnode refid="5301" relation="include">
        </childnode>
        <childnode refid="5291" relation="include">
        </childnode>
      </node>
      <node id="5289">
        <label>ubixos/types.h</label>
        <link refid="types_8h"/>
        <childnode refid="5290" relation="include">
        </childnode>
      </node>
      <node id="5290">
        <label>sys/_types.h</label>
        <link refid="__types_8h"/>
      </node>
      <node id="5304">
        <label>string.h</label>
        <link refid="string_8h"/>
        <childnode refid="5289" relation="include">
        </childnode>
      </node>
      <node id="5296">
        <label>vfs/file.h</label>
        <link refid="file_8h"/>
        <childnode refid="5289" relation="include">
        </childnode>
        <childnode refid="5297" relation="include">
        </childnode>
        <childnode refid="5298" relation="include">
        </childnode>
      </node>
      <node id="5301">
        <label>sys/tss.h</label>
        <link refid="tss_8h"/>
        <childnode refid="5289" relation="include">
        </childnode>
      </node>
      <node id="5303">
        <label>lib/kmalloc.h</label>
        <link refid="kmalloc_8h"/>
        <childnode refid="5289" relation="include">
        </childnode>
      </node>
      <node id="5292">
        <label>sys/gen_calls.h</label>
        <link refid="gen__calls_8h"/>
        <childnode refid="5291" relation="include">
        </childnode>
        <childnode refid="5293" relation="include">
        </childnode>
      </node>
      <node id="5298">
        <label>vfs/mount.h</label>
        <link refid="mount_8h"/>
        <childnode refid="5289" relation="include">
        </childnode>
      </node>
      <node id="5302">
        <label>lib/kprintf.h</label>
        <link refid="kprintf_8h"/>
        <childnode refid="5289" relation="include">
        </childnode>
      </node>
      <node id="5295">
        <label>sys/kern_descrip.h</label>
        <link refid="kern__descrip_8h"/>
        <childnode refid="5291" relation="include">
        </childnode>
        <childnode refid="5293" relation="include">
        </childnode>
        <childnode refid="5296" relation="include">
        </childnode>
      </node>
      <node id="5305">
        <label>assert.h</label>
        <link refid="assert_8h"/>
      </node>
      <node id="5297">
        <label>ubixfs/dirCache.h</label>
        <link refid="dirCache_8h"/>
        <childnode refid="5289" relation="include">
        </childnode>
      </node>
      <node id="5293">
        <label>sys/sysproto.h</label>
        <link refid="sysproto_8h"/>
        <childnode refid="5294" relation="include">
        </childnode>
        <childnode refid="5291" relation="include">
        </childnode>
      </node>
      <node id="5294">
        <label>sys/signal.h</label>
        <link refid="signal_8h"/>
        <childnode refid="5289" relation="include">
        </childnode>
      </node>
      <node id="5300">
        <label>ubixos/tty.h</label>
        <link refid="tty_8h"/>
        <childnode refid="5289" relation="include">
        </childnode>
      </node>
      <node id="5288">
        <label>src/sys/kernel/gen_calls.c</label>
        <link refid="gen_calls.c"/>
        <childnode refid="5289" relation="include">
        </childnode>
        <childnode refid="5291" relation="include">
        </childnode>
        <childnode refid="5292" relation="include">
        </childnode>
        <childnode refid="5295" relation="include">
        </childnode>
        <childnode refid="5299" relation="include">
        </childnode>
        <childnode refid="5302" relation="include">
        </childnode>
        <childnode refid="5303" relation="include">
        </childnode>
        <childnode refid="5304" relation="include">
        </childnode>
        <childnode refid="5305" relation="include">
        </childnode>
      </node>
    </incdepgraph>
      <sectiondef kind="func">
      <memberdef kind="function" id="gen__calls_8c_12cbc84ec9b68d4c49474049bd74d1bb3" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int getgid</definition>
        <argsstring>(struct thread *td, struct getgid_args *uap)</argsstring>
        <name>getgid</name>
        <param>
          <type>struct <ref refid="structthread" kindref="compound">thread</ref> *</type>
          <declname>td</declname>
        </param>
        <param>
          <type>struct <ref refid="structgetgid__args" kindref="compound">getgid_args</ref> *</type>
          <declname>uap</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/kernel/gen_calls.c" line="59" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/kernel/gen_calls.c" bodystart="59" bodyend="65"/>
        <references refid="sched_8h_154397bfe18d5da4d50ff03b15f540858" compoundref="sched_8c" startline="51">_current</references>
        <references refid="structtaskStruct_13cf9920106f9b0d96dff475faf7aa0d6" compoundref="sched_8h" startline="63">taskStruct::gid</references>
        <references refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" compoundref="kprintf_8c" startline="38" endline="49">kprintf</references>
        <references refid="structtaskStruct_1481c2e7084fec272e616d3fb984036e2" compoundref="sched_8h" startline="67">taskStruct::td</references>
        <references refid="structthread_1f3ec0788a84e5cb640a1646d1347998a" compoundref="thread_8h" startline="38">thread::td_retval</references>
      </memberdef>
      <memberdef kind="function" id="gen__calls_8c_14f4fe0a75329898241b9c7acc0580561" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int getpid</definition>
        <argsstring>(struct thread *td, struct getpid_args *uap)</argsstring>
        <name>getpid</name>
        <param>
          <type>struct <ref refid="structthread" kindref="compound">thread</ref> *</type>
          <declname>td</declname>
        </param>
        <param>
          <type>struct <ref refid="structgetpid__args" kindref="compound">getpid_args</ref> *</type>
          <declname>uap</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/kernel/gen_calls.c" line="41" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/kernel/gen_calls.c" bodystart="41" bodyend="47"/>
        <references refid="sched_8h_154397bfe18d5da4d50ff03b15f540858" compoundref="sched_8c" startline="51">_current</references>
        <references refid="structtaskStruct_130966587a60db6b40c8be6c387e11d81" compoundref="sched_8h" startline="55">taskStruct::id</references>
        <references refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" compoundref="kprintf_8c" startline="38" endline="49">kprintf</references>
        <references refid="structtaskStruct_1481c2e7084fec272e616d3fb984036e2" compoundref="sched_8h" startline="67">taskStruct::td</references>
        <references refid="structthread_1f3ec0788a84e5cb640a1646d1347998a" compoundref="thread_8h" startline="38">thread::td_retval</references>
      </memberdef>
      <memberdef kind="function" id="gen__calls_8c_1ff04064695f5ad2e284b51a24f351dc9" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int gettimeofday_new</definition>
        <argsstring>(struct thread *td, struct gettimeofday_args *uap)</argsstring>
        <name>gettimeofday_new</name>
        <param>
          <type>struct <ref refid="structthread" kindref="compound">thread</ref> *</type>
          <declname>td</declname>
        </param>
        <param>
          <type>struct <ref refid="structgettimeofday__args" kindref="compound">gettimeofday_args</ref> *</type>
          <declname>uap</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/kernel/gen_calls.c" line="118" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/kernel/gen_calls.c" bodystart="118" bodyend="123"/>
        <references refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" compoundref="kprintf_8c" startline="38" endline="49">kprintf</references>
      </memberdef>
      <memberdef kind="function" id="gen__calls_8c_15c560fabc59fcbcc62ce4827d10b222a" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int getuid</definition>
        <argsstring>(struct thread *td, struct getuid_args *uap)</argsstring>
        <name>getuid</name>
        <param>
          <type>struct <ref refid="structthread" kindref="compound">thread</ref> *</type>
          <declname>td</declname>
        </param>
        <param>
          <type>struct <ref refid="structgetuid__args" kindref="compound">getuid_args</ref> *</type>
          <declname>uap</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/kernel/gen_calls.c" line="50" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/kernel/gen_calls.c" bodystart="50" bodyend="56"/>
        <references refid="sched_8h_154397bfe18d5da4d50ff03b15f540858" compoundref="sched_8c" startline="51">_current</references>
        <references refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" compoundref="kprintf_8c" startline="38" endline="49">kprintf</references>
        <references refid="structtaskStruct_1481c2e7084fec272e616d3fb984036e2" compoundref="sched_8h" startline="67">taskStruct::td</references>
        <references refid="structthread_1f3ec0788a84e5cb640a1646d1347998a" compoundref="thread_8h" startline="38">thread::td_retval</references>
        <references refid="structtaskStruct_11f9e02ebf24ff1cd76fab75e4c6b0fe1" compoundref="sched_8h" startline="64">taskStruct::uid</references>
      </memberdef>
      <memberdef kind="function" id="gen__calls_8c_1f33cddd66090ca898f9cfd38ea82d284" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int issetugid</definition>
        <argsstring>(register struct thread *td, struct issetugid_args *uap)</argsstring>
        <name>issetugid</name>
        <param>
          <type>register struct <ref refid="structthread" kindref="compound">thread</ref> *</type>
          <declname>td</declname>
        </param>
        <param>
          <type>struct <ref refid="structissetugid__args" kindref="compound">issetugid_args</ref> *</type>
          <declname>uap</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/kernel/gen_calls.c" line="100" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/kernel/gen_calls.c" bodystart="100" bodyend="106"/>
        <references refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" compoundref="kprintf_8c" startline="38" endline="49">kprintf</references>
      </memberdef>
      <memberdef kind="function" id="gen__calls_8c_15eff3a25d417fafce7c4f211db219ca2" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int read</definition>
        <argsstring>(struct thread *td, struct read_args *uap)</argsstring>
        <name>read</name>
        <param>
          <type>struct <ref refid="structthread" kindref="compound">thread</ref> *</type>
          <declname>td</declname>
        </param>
        <param>
          <type>struct <ref refid="structread__args" kindref="compound">read_args</ref> *</type>
          <declname>uap</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/kernel/gen_calls.c" line="125" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/kernel/gen_calls.c" bodystart="125" bodyend="144"/>
        <references refid="structread__args_16ac2e2c0ce3199b14d0c8f0483b93298" compoundref="sysproto_8h" startline="162">read_args::buf</references>
        <references refid="structread__args_1250aa43131c8339cb6af695aa172e3d1" compoundref="sysproto_8h" startline="161">read_args::fd</references>
        <references refid="structfile_15a1b356e191a81d71a02560074aacd2a" compoundref="kern__descrip_8h" startline="96">file::fd</references>
        <references refid="file_8h_13b06878a03209e88c008c77234b89359" compoundref="file_8c" startline="178" endline="198">fread</references>
        <references refid="kern__descrip_8h_114e228d6e5391a882d3b20ff2466b2ac" compoundref="kern__descrip_8c" startline="141" endline="154">getfd</references>
        <references refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" compoundref="kprintf_8c" startline="38" endline="49">kprintf</references>
        <references refid="structread__args_12043b1fbe1d15b40105590c9cb7a192c" compoundref="sysproto_8h" startline="163">read_args::nbyte</references>
        <references refid="structthread_1f3ec0788a84e5cb640a1646d1347998a" compoundref="thread_8h" startline="38">thread::td_retval</references>
        <references refid="ap-boot_8S_11a3ac2137e21f6f0d400f1996914dd19" compoundref="ap-boot_8S" startline="6">x1</references>
      </memberdef>
      <memberdef kind="function" id="gen__calls_8c_1111a32074b3f5f68a4fa5585fe8ab3a4" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int readlink</definition>
        <argsstring>(struct thread *td, struct readlink_args *uap)</argsstring>
        <name>readlink</name>
        <param>
          <type>struct <ref refid="structthread" kindref="compound">thread</ref> *</type>
          <declname>td</declname>
        </param>
        <param>
          <type>struct <ref refid="structreadlink__args" kindref="compound">readlink_args</ref> *</type>
          <declname>uap</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/kernel/gen_calls.c" line="108" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/kernel/gen_calls.c" bodystart="108" bodyend="116"/>
        <references refid="structreadlink__args_11c122ab73c591775ed283f58ac5c3019" compoundref="sysproto_8h" startline="98">readlink_args::count</references>
        <references refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" compoundref="kprintf_8c" startline="38" endline="49">kprintf</references>
        <references refid="structreadlink__args_14c97e5cd326ea78adb5c072e6de3c2a4" compoundref="sysproto_8h" startline="96">readlink_args::path</references>
        <references refid="structtaskStruct_1481c2e7084fec272e616d3fb984036e2" compoundref="sched_8h" startline="67">taskStruct::td</references>
        <references refid="structthread_1f3ec0788a84e5cb640a1646d1347998a" compoundref="thread_8h" startline="38">thread::td_retval</references>
      </memberdef>
      <memberdef kind="function" id="gen__calls_8c_1b913b237bff6f29fa58c01d2d0fc7088" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int setitimer</definition>
        <argsstring>(struct thread *td, struct setitimer_args *uap)</argsstring>
        <name>setitimer</name>
        <param>
          <type>struct <ref refid="structthread" kindref="compound">thread</ref> *</type>
          <declname>td</declname>
        </param>
        <param>
          <type>struct <ref refid="structsetitimer__args" kindref="compound">setitimer_args</ref> *</type>
          <declname>uap</declname>
        </param>
        <briefdescription>
<para>place holder for now functionality to be added later </para>        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/kernel/gen_calls.c" line="149" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/kernel/gen_calls.c" bodystart="149" bodyend="153"/>
      </memberdef>
      <memberdef kind="function" id="gen__calls_8c_114173c973cb6d92a0e2ff34ee072f4d3" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int sys_write</definition>
        <argsstring>(struct thread *td, struct write_args *uap)</argsstring>
        <name>sys_write</name>
        <param>
          <type>struct <ref refid="structthread" kindref="compound">thread</ref> *</type>
          <declname>td</declname>
        </param>
        <param>
          <type>struct <ref refid="structwrite__args" kindref="compound">write_args</ref> *</type>
          <declname>uap</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/usr/home/reddawg/source/ubix2/src/sys/kernel/gen_calls.c" line="67" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/kernel/gen_calls.c" bodystart="67" bodyend="98"/>
        <references refid="structwrite__args_1719b7bf5c1f0c153d44f60930af3d545" compoundref="sysproto_8h" startline="52">write_args::buf</references>
        <references refid="structwrite__args_1ca575e653f10af383a927384c410322d" compoundref="sysproto_8h" startline="51">write_args::fd</references>
        <references refid="kmalloc_8h_1aa9ed6886459604cf73ccdbf6410e487" compoundref="kmalloc_8c" startline="351" endline="391">kfree</references>
        <references refid="kmalloc_8h_1150eab2ac4ce4553e21ca10e7f441762" compoundref="kmalloc_8c" startline="247" endline="339">kmalloc</references>
        <references refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" compoundref="kprintf_8c" startline="38" endline="49">kprintf</references>
        <references refid="lib_2string_8h_1e33b18edb618c656b9b795b9fce2316c">memcpy</references>
        <references refid="structwrite__args_158b5b8bcea410fee76395f7d266bd462" compoundref="sysproto_8h" startline="53">write_args::nbyte</references>
        <references refid="structtaskStruct_1481c2e7084fec272e616d3fb984036e2" compoundref="sched_8h" startline="67">taskStruct::td</references>
        <references refid="structthread_1f3ec0788a84e5cb640a1646d1347998a" compoundref="thread_8h" startline="38">thread::td_retval</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: gen__calls_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="types_8h" kindref="compound">ubixos/types.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="thread_8h" kindref="compound">sys/thread.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="32"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="gen__calls_8h" kindref="compound">sys/gen_calls.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="33"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="kern__descrip_8h" kindref="compound">sys/kern_descrip.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="34"><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="35"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="kprintf_8h" kindref="compound">lib/kprintf.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="36"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="kmalloc_8h" kindref="compound">lib/kmalloc.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="37"><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="38"><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="39"><highlight class="normal"></highlight></codeline>
<codeline lineno="40"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>return<sp/>the<sp/>process<sp/>id<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="41" refid="gen__calls_8c_14f4fe0a75329898241b9c7acc0580561" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="gen__calls_8h_1f4a62a3c5e091cdf096c576f79edece3" kindref="member">getpid</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structthread" kindref="compound">thread</ref><sp/>*<ref refid="structtaskStruct_1481c2e7084fec272e616d3fb984036e2" kindref="member">td</ref>,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structgetpid__args" kindref="compound">getpid_args</ref><sp/>*uap)<sp/>{</highlight></codeline>
<codeline lineno="42"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/>#ifdef<sp/>DEBUG</highlight></codeline>
<codeline lineno="43"><highlight class="preprocessor"></highlight><highlight class="normal"><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;[%s:%i]&quot;</highlight><highlight class="normal">,__FILE__,__LINE__);</highlight></codeline>
<codeline lineno="44"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/>#endif</highlight></codeline>
<codeline lineno="45"><highlight class="preprocessor"></highlight><highlight class="normal"><sp/><sp/><ref refid="structtaskStruct_1481c2e7084fec272e616d3fb984036e2" kindref="member">td</ref>-&gt;<ref refid="structthread_1f3ec0788a84e5cb640a1646d1347998a" kindref="member">td_retval</ref>[0]<sp/>=<sp/><ref refid="sched_8h_154397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_130966587a60db6b40c8be6c387e11d81" kindref="member">id</ref>;</highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0);</highlight></codeline>
<codeline lineno="47"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="48"><highlight class="normal"></highlight></codeline>
<codeline lineno="49"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>return<sp/>the<sp/>process<sp/>user<sp/>id<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="50" refid="gen__calls_8c_15c560fabc59fcbcc62ce4827d10b222a" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="gen__calls_8h_1b2bf044f6f20a60f7c4139b527c4bd6c" kindref="member">getuid</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structthread" kindref="compound">thread</ref><sp/>*<ref refid="structtaskStruct_1481c2e7084fec272e616d3fb984036e2" kindref="member">td</ref>,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structgetuid__args" kindref="compound">getuid_args</ref><sp/>*uap)<sp/>{</highlight></codeline>
<codeline lineno="51"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/>#ifdef<sp/>DEBUG</highlight></codeline>
<codeline lineno="52"><highlight class="preprocessor"></highlight><highlight class="normal"><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;[%s:%i]&quot;</highlight><highlight class="normal">,__FILE__,__LINE__);</highlight></codeline>
<codeline lineno="53"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/>#endif</highlight></codeline>
<codeline lineno="54"><highlight class="preprocessor"></highlight><highlight class="normal"><sp/><sp/><ref refid="structtaskStruct_1481c2e7084fec272e616d3fb984036e2" kindref="member">td</ref>-&gt;<ref refid="structthread_1f3ec0788a84e5cb640a1646d1347998a" kindref="member">td_retval</ref>[0]<sp/>=<sp/><ref refid="sched_8h_154397bfe18d5da4d50ff03b15f540858" kindref="member">_current</ref>-&gt;<ref refid="structtaskStruct_11f9e02ebf24ff1cd76fab75e4c6b0fe1" kindref="member">uid</ref>;</highlight></codeline>
<codeline lineno="55"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0);</highlight></codeline>
<codeline lineno="56"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="57"><highlight class="normal"></highlight></codeline>
<codeline lineno="58"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>return<sp/>the<sp/>process<sp/>group<sp/>id<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="59" refid="gen__calls_8c_12cbc84ec9b68d4c49474049bd74d1bb3" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="gen__calls_8h_1d78d6c02154727f556f78cca62020c83" kindref="member">getgid</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structthread" kindref="compound">thread</ref><sp/>*<ref refid="structtaskStruct_1481c2e7084fec272e616d3fb984036e2" kindref="member">td</ref>,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structgetgid__args" kindref="compound">getgid_args</ref><sp/>*uap)<sp/>{</highlight></codeline>
<codeline lineno="60"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/>#ifdef<sp/>DEBUG</highlight></codeline>
<codeline lineno="61"><highlight class="preprocessor"></highlight><highlight class="normal"><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;[%s:%i]&quot;</highlight><highlight class="normal">,__FILE__,__LINE__);</highlight></codeline>
<codeline lineno="62"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/>#endif</highlight></codeline>
<codeline lineno="63"><highlight class="preprocessor"></highlight><highlight class="normal"><sp/><sp/><ref refid="structtaskStruct_1481c2e7084fec272e616d3fb984036e2" kindref="member">td</ref>-&gt;<ref refid="structthread_1f3ec0788a84e5cb640a1646d1347998a" kindref="member">td_retval</ref>[0]<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/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0);</highlight></codeline>
<codeline lineno="65"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="66"><highlight class="normal"></highlight></codeline>
<codeline lineno="67" refid="gen__calls_8c_114173c973cb6d92a0e2ff34ee072f4d3" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><sp/><ref refid="sysproto_8h_114173c973cb6d92a0e2ff34ee072f4d3" kindref="member">sys_write</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structthread" kindref="compound">thread</ref><sp/>*<ref refid="structtaskStruct_1481c2e7084fec272e616d3fb984036e2" kindref="member">td</ref>,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structwrite__args" kindref="compound">write_args</ref><sp/>*uap)<sp/>{</highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*buffer<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*in<sp/><sp/><sp/><sp/><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="70"><highlight class="normal"></highlight></codeline>
<codeline lineno="71"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/>#ifdef<sp/>DEBUG</highlight></codeline>
<codeline lineno="72"><highlight class="preprocessor"></highlight><highlight class="normal"><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;[%s:%i]&quot;</highlight><highlight class="normal">,__FILE__,__LINE__);</highlight></codeline>
<codeline lineno="73"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/>#endif</highlight></codeline>
<codeline lineno="74"><highlight class="preprocessor"></highlight><highlight class="normal"><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;sw[%i]&quot;</highlight><highlight class="normal">,uap-&gt;<ref refid="structwrite__args_1ca575e653f10af383a927384c410322d" kindref="member">fd</ref>);</highlight></codeline>
<codeline lineno="75"><highlight class="normal"></highlight></codeline>
<codeline lineno="76"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(uap-&gt;<ref refid="structwrite__args_1ca575e653f10af383a927384c410322d" kindref="member">fd</ref><sp/>==<sp/>2)<sp/>{</highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;stderr:<sp/>%s&quot;</highlight><highlight class="normal">,uap-&gt;<ref refid="structwrite__args_1719b7bf5c1f0c153d44f60930af3d545" kindref="member">buf</ref>);</highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="79"><highlight class="normal"></highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(uap-&gt;<ref refid="structwrite__args_1ca575e653f10af383a927384c410322d" kindref="member">fd</ref><sp/>==<sp/>1)<sp/>{</highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/><sp/><sp/>in<sp/>=<sp/>(</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*)uap-&gt;<ref refid="structwrite__args_1719b7bf5c1f0c153d44f60930af3d545" kindref="member">buf</ref>;</highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/>buffer<sp/>=<sp/><ref refid="kmalloc_8h_1150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(1024);</highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="lib_2string_8h_1e33b18edb618c656b9b795b9fce2316c" kindref="member">memcpy</ref>(buffer,uap-&gt;<ref refid="structwrite__args_1719b7bf5c1f0c153d44f60930af3d545" kindref="member">buf</ref>,uap-&gt;<ref refid="structwrite__args_158b5b8bcea410fee76395f7d266bd462" kindref="member">nbyte</ref>);</highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;%s&quot;</highlight><highlight class="normal">,buffer);<sp/></highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kmalloc_8h_1aa9ed6886459604cf73ccdbf6410e487" kindref="member">kfree</ref>(buffer);</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="structtaskStruct_1481c2e7084fec272e616d3fb984036e2" kindref="member">td</ref>-&gt;<ref refid="structthread_1f3ec0788a84e5cb640a1646d1347998a" kindref="member">td_retval</ref>[0]<sp/>=<sp/>uap-&gt;<ref refid="structwrite__args_158b5b8bcea410fee76395f7d266bd462" kindref="member">nbyte</ref>;</highlight></codeline>
<codeline lineno="87"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="88"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;[%i]&quot;</highlight><highlight class="normal">,uap-&gt;<ref refid="structwrite__args_158b5b8bcea410fee76395f7d266bd462" kindref="member">nbyte</ref>);</highlight></codeline>
<codeline lineno="90"><highlight class="normal"><sp/><sp/><sp/><sp/>buffer<sp/>=<sp/><ref refid="kmalloc_8h_1150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(uap-&gt;<ref refid="structwrite__args_158b5b8bcea410fee76395f7d266bd462" kindref="member">nbyte</ref>);</highlight></codeline>
<codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="lib_2string_8h_1e33b18edb618c656b9b795b9fce2316c" kindref="member">memcpy</ref>(buffer,uap-&gt;<ref refid="structwrite__args_1719b7bf5c1f0c153d44f60930af3d545" kindref="member">buf</ref>,uap-&gt;<ref refid="structwrite__args_158b5b8bcea410fee76395f7d266bd462" kindref="member">nbyte</ref>);</highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//kprint(buffer);</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="93"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kmalloc_8h_1aa9ed6886459604cf73ccdbf6410e487" kindref="member">kfree</ref>(buffer);</highlight></codeline>
<codeline lineno="94"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;(%i)<sp/>%s&quot;</highlight><highlight class="normal">,uap-&gt;<ref refid="structwrite__args_1ca575e653f10af383a927384c410322d" kindref="member">fd</ref>,uap-&gt;<ref refid="structwrite__args_1719b7bf5c1f0c153d44f60930af3d545" kindref="member">buf</ref>);</highlight></codeline>
<codeline lineno="95"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="structtaskStruct_1481c2e7084fec272e616d3fb984036e2" kindref="member">td</ref>-&gt;<ref refid="structthread_1f3ec0788a84e5cb640a1646d1347998a" kindref="member">td_retval</ref>[0]<sp/>=<sp/>uap-&gt;<ref refid="structwrite__args_158b5b8bcea410fee76395f7d266bd462" kindref="member">nbyte</ref>;</highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(0x0);</highlight></codeline>
<codeline lineno="98"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="99"><highlight class="normal"></highlight></codeline>
<codeline lineno="100" refid="gen__calls_8c_1f33cddd66090ca898f9cfd38ea82d284" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="gen__calls_8h_133298b667b9476900aefff9cb3839f8f" kindref="member">issetugid</ref>(</highlight><highlight class="keyword">register</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structthread" kindref="compound">thread</ref><sp/>*<ref refid="structtaskStruct_1481c2e7084fec272e616d3fb984036e2" kindref="member">td</ref>,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structissetugid__args" kindref="compound">issetugid_args</ref><sp/>*uap)<sp/>{</highlight></codeline>
<codeline lineno="101"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/>#ifdef<sp/>DEBUG</highlight></codeline>
<codeline lineno="102"><highlight class="preprocessor"></highlight><highlight class="normal"><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;[%s:%i]&quot;</highlight><highlight class="normal">,__FILE__,__LINE__);</highlight></codeline>
<codeline lineno="103"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/>#endif</highlight></codeline>
<codeline lineno="104"><highlight class="preprocessor"></highlight><highlight class="normal"><sp/><sp/>td-&gt;td_retval[0]<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0);</highlight></codeline>
<codeline lineno="106"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="107"><highlight class="normal"></highlight></codeline>
<codeline lineno="108" refid="gen__calls_8c_1111a32074b3f5f68a4fa5585fe8ab3a4" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="gen__calls_8h_15e64f5ad3a110ebbbe9e46c6e93548b5" kindref="member">readlink</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structthread" kindref="compound">thread</ref><sp/>*<ref refid="structtaskStruct_1481c2e7084fec272e616d3fb984036e2" kindref="member">td</ref>,</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structreadlink__args" kindref="compound">readlink_args</ref><sp/>*uap)<sp/>{</highlight></codeline>
<codeline lineno="109"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/>#ifdef<sp/>DEBUG</highlight></codeline>
<codeline lineno="110"><highlight class="preprocessor"></highlight><highlight class="normal"><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;[%s:%i]&quot;</highlight><highlight class="normal">,__FILE__,__LINE__);</highlight></codeline>
<codeline lineno="111"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/>#endif</highlight></codeline>
<codeline lineno="112"><highlight class="preprocessor"></highlight><highlight class="normal"><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;readlink:<sp/>[%s:%i]\n&quot;</highlight><highlight class="normal">,uap-&gt;<ref refid="structreadlink__args_14c97e5cd326ea78adb5c072e6de3c2a4" kindref="member">path</ref>,uap-&gt;<ref refid="structreadlink__args_11c122ab73c591775ed283f58ac5c3019" kindref="member">count</ref>);</highlight></codeline>
<codeline lineno="113"><highlight class="normal"><sp/><sp/><ref refid="structtaskStruct_1481c2e7084fec272e616d3fb984036e2" kindref="member">td</ref>-&gt;<ref refid="structthread_1f3ec0788a84e5cb640a1646d1347998a" kindref="member">td_retval</ref>[0]<sp/>=<sp/>-1;</highlight></codeline>
<codeline lineno="114"><highlight class="normal"><sp/><sp/><ref refid="structtaskStruct_1481c2e7084fec272e616d3fb984036e2" kindref="member">td</ref>-&gt;<ref refid="structthread_1f3ec0788a84e5cb640a1646d1347998a" kindref="member">td_retval</ref>[1]<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="115"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(0x0);</highlight></codeline>
<codeline lineno="116"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="117"><highlight class="normal"></highlight></codeline>
<codeline lineno="118" refid="gen__calls_8c_1ff04064695f5ad2e284b51a24f351dc9" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="gen__calls_8h_1fb1d60b8d0e869ff21a9ca1a488a2392" kindref="member">gettimeofday_new</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structthread" kindref="compound">thread</ref><sp/>*<ref refid="structtaskStruct_1481c2e7084fec272e616d3fb984036e2" kindref="member">td</ref>,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structgettimeofday__args" kindref="compound">gettimeofday_args</ref><sp/>*uap)<sp/>{</highlight></codeline>
<codeline lineno="119"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/>#ifdef<sp/>DEBUG</highlight></codeline>
<codeline lineno="120"><highlight class="preprocessor"></highlight><highlight class="normal"><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;[%s:%i]&quot;</highlight><highlight class="normal">,__FILE__,__LINE__);</highlight></codeline>
<codeline lineno="121"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/>#endif</highlight></codeline>
<codeline lineno="122"><highlight class="preprocessor"></highlight><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(0x0);</highlight></codeline>
<codeline lineno="123"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="124"><highlight class="normal"></highlight></codeline>
<codeline lineno="125" refid="gen__calls_8c_15eff3a25d417fafce7c4f211db219ca2" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="gen__calls_8h_15eff3a25d417fafce7c4f211db219ca2" kindref="member">read</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structthread" kindref="compound">thread</ref><sp/>*<ref refid="structtaskStruct_1481c2e7084fec272e616d3fb984036e2" kindref="member">td</ref>,</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structread__args" kindref="compound">read_args</ref><sp/>*uap)<sp/>{</highlight></codeline>
<codeline lineno="126"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>error<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="127"><highlight class="normal"><sp/><sp/><ref refid="types_8h_17619b847aeded8a6d14cbfa212b2cdfb" kindref="member">size_t</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/>count<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="128"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structfile" kindref="compound">file</ref><sp/>*<ref refid="structfile_15a1b356e191a81d71a02560074aacd2a" kindref="member">fd</ref><sp/><sp/><sp/><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="129"><highlight class="normal"></highlight></codeline>
<codeline lineno="130"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/>#ifdef<sp/>DEBUG</highlight></codeline>
<codeline lineno="131"><highlight class="preprocessor"></highlight><highlight class="normal"><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;[%s:%i]&quot;</highlight><highlight class="normal">,__FILE__,__LINE__);</highlight></codeline>
<codeline lineno="132"><highlight class="normal"></highlight><highlight class="preprocessor"><sp/><sp/>#endif</highlight></codeline>
<codeline lineno="133"><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="134"><highlight class="normal"><sp/><sp/>error<sp/>=<sp/><ref refid="kern__descrip_8h_114e228d6e5391a882d3b20ff2466b2ac" kindref="member">getfd</ref>(td,&amp;<ref refid="structfile_15a1b356e191a81d71a02560074aacd2a" kindref="member">fd</ref>,uap-&gt;<ref refid="structread__args_1250aa43131c8339cb6af695aa172e3d1" kindref="member">fd</ref>);</highlight></codeline>
<codeline lineno="135"><highlight class="normal"></highlight></codeline>
<codeline lineno="136"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(error)</highlight></codeline>
<codeline lineno="137"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(error);</highlight></codeline>
<codeline lineno="138"><highlight class="normal"></highlight></codeline>
<codeline lineno="139"><highlight class="normal"><sp/><sp/>count<sp/>=<sp/><ref refid="file_8h_13b06878a03209e88c008c77234b89359" kindref="member">fread</ref>(uap-&gt;<ref refid="structread__args_16ac2e2c0ce3199b14d0c8f0483b93298" kindref="member">buf</ref>,uap-&gt;<ref refid="structread__args_12043b1fbe1d15b40105590c9cb7a192c" kindref="member">nbyte</ref>,0<ref refid="ap-boot_8S_11a3ac2137e21f6f0d400f1996914dd19" kindref="member">x1</ref>,<ref refid="structfile_15a1b356e191a81d71a02560074aacd2a" kindref="member">fd</ref>-&gt;fd);</highlight></codeline>
<codeline lineno="140"><highlight class="normal"><sp/><sp/><ref refid="kprint_8h_1b2761bdf0cca73ad0fb5880895210cd8" kindref="member">kprintf</ref>(</highlight><highlight class="stringliteral">&quot;count:<sp/>%i\n&quot;</highlight><highlight class="normal">,count);</highlight></codeline>
<codeline lineno="141"><highlight class="normal"><sp/><sp/>td-&gt;<ref refid="structthread_1f3ec0788a84e5cb640a1646d1347998a" kindref="member">td_retval</ref>[0]<sp/>=<sp/>count;</highlight></codeline>
<codeline lineno="142"><highlight class="normal"></highlight></codeline>
<codeline lineno="143"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(error);</highlight></codeline>
<codeline lineno="144"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="145"><highlight class="normal"></highlight></codeline>
<codeline lineno="149" refid="gen__calls_8c_1b913b237bff6f29fa58c01d2d0fc7088" refkind="member"><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="sysproto_8h_1b913b237bff6f29fa58c01d2d0fc7088" kindref="member">setitimer</ref>(</highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structthread" kindref="compound">thread</ref><sp/>*td,<sp/></highlight><highlight class="keyword">struct</highlight><highlight class="normal"><sp/><ref refid="structsetitimer__args" kindref="compound">setitimer_args</ref><sp/>*uap)<sp/>{</highlight></codeline>
<codeline lineno="150"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>error<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="151"><highlight class="normal"></highlight></codeline>
<codeline lineno="152"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(error);</highlight></codeline>
<codeline lineno="153"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="154"><highlight class="normal"></highlight></codeline>
<codeline lineno="155"><highlight class="normal"></highlight><highlight class="comment">/***</highlight></codeline>
<codeline lineno="156"><highlight class="comment"><sp/>END</highlight></codeline>
<codeline lineno="157"><highlight class="comment"><sp/>***/</highlight><highlight class="normal"></highlight></codeline>
    </programlisting>
    <location file="/usr/home/reddawg/source/ubix2/src/sys/kernel/gen_calls.c"/>
  </compounddef>
</doxygen>
