Newer
Older
ubix2 / doc / xml / gen__calls_8c.xml
@reddawg reddawg on 5 Dec 2006 41 KB More syscalls implimented
<?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="include_2ubixos_2types_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="sched_8h" local="no">ubixos/sched.h</includes>
    <includes refid="kprintf_8h" local="no">lib/kprintf.h</includes>
    <includes refid="assert_8h" local="no">assert.h</includes>
    <incdepgraph>
      <node id="3311">
        <label>sys/thread.h</label>
        <link refid="thread_8h"/>
        <childnode refid="3309" relation="include">
        </childnode>
      </node>
      <node id="3315">
        <label>ubixos/sched.h</label>
        <link refid="sched_8h"/>
        <childnode refid="3309" relation="include">
        </childnode>
        <childnode refid="3316" relation="include">
        </childnode>
        <childnode refid="3317" relation="include">
        </childnode>
        <childnode refid="3318" relation="include">
        </childnode>
        <childnode refid="3322" relation="include">
        </childnode>
        <childnode refid="3311" relation="include">
        </childnode>
      </node>
      <node id="3309">
        <label>ubixos/types.h</label>
        <link refid="include_2ubixos_2types_8h"/>
        <childnode refid="3310" relation="include">
        </childnode>
      </node>
      <node id="3310">
        <label>sys/_types.h</label>
        <link refid="__types_8h"/>
      </node>
      <node id="3318">
        <label>vfs/file.h</label>
        <link refid="include_2vfs_2file_8h"/>
        <childnode refid="3309" relation="include">
        </childnode>
        <childnode refid="3319" relation="include">
        </childnode>
        <childnode refid="3320" relation="include">
        </childnode>
      </node>
      <node id="3322">
        <label>sys/tss.h</label>
        <link refid="tss_8h"/>
        <childnode refid="3309" relation="include">
        </childnode>
      </node>
      <node id="3312">
        <label>sys/gen_calls.h</label>
        <link refid="gen__calls_8h"/>
        <childnode refid="3311" relation="include">
        </childnode>
        <childnode refid="3313" relation="include">
        </childnode>
      </node>
      <node id="3321">
        <label>vfs/vfs.h</label>
        <link refid="include_2vfs_2vfs_8h"/>
        <childnode refid="3309" relation="include">
        </childnode>
        <childnode refid="3318" relation="include">
        </childnode>
        <childnode refid="3320" relation="include">
        </childnode>
        <childnode refid="3313" relation="include">
        </childnode>
        <childnode refid="3311" relation="include">
        </childnode>
      </node>
      <node id="3320">
        <label>vfs/mount.h</label>
        <link refid="mount_8h"/>
        <childnode refid="3309" relation="include">
        </childnode>
        <childnode refid="3321" relation="include">
        </childnode>
      </node>
      <node id="3323">
        <label>lib/kprintf.h</label>
        <link refid="kprintf_8h"/>
        <childnode refid="3309" relation="include">
        </childnode>
      </node>
      <node id="3324">
        <label>assert.h</label>
        <link refid="assert_8h"/>
      </node>
      <node id="3319">
        <label>ubixfs/dirCache.h</label>
        <link refid="dirCache_8h"/>
        <childnode refid="3309" relation="include">
        </childnode>
      </node>
      <node id="3313">
        <label>sys/sysproto.h</label>
        <link refid="sysproto_8h"/>
        <childnode refid="3314" relation="include">
        </childnode>
      </node>
      <node id="3316">
        <label>ubixos/elf.h</label>
        <link refid="elf_8h"/>
        <childnode refid="3309" relation="include">
        </childnode>
      </node>
      <node id="3314">
        <label>sys/signal.h</label>
        <link refid="signal_8h"/>
        <childnode refid="3309" relation="include">
        </childnode>
      </node>
      <node id="3317">
        <label>ubixos/tty.h</label>
        <link refid="tty_8h"/>
        <childnode refid="3309" relation="include">
        </childnode>
      </node>
      <node id="3308">
        <label>src/sys/kernel/gen_calls.c</label>
        <link refid="gen_calls.c"/>
        <childnode refid="3309" relation="include">
        </childnode>
        <childnode refid="3311" relation="include">
        </childnode>
        <childnode refid="3312" relation="include">
        </childnode>
        <childnode refid="3315" relation="include">
        </childnode>
        <childnode refid="3323" relation="include">
        </childnode>
        <childnode refid="3324" 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="50" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/kernel/gen_calls.c" bodystart="50" bodyend="53"/>
        <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="structtaskStruct_1481c2e7084fec272e616d3fb984036e2" compoundref="sched_8h" startline="67">taskStruct::td</references>
        <references refid="structthread_1f3ec0788a84e5cb640a1646d1347998a" compoundref="thread_8h" startline="36">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="38" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/kernel/gen_calls.c" bodystart="38" bodyend="41"/>
        <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="structtaskStruct_1481c2e7084fec272e616d3fb984036e2" compoundref="sched_8h" startline="67">taskStruct::td</references>
        <references refid="structthread_1f3ec0788a84e5cb640a1646d1347998a" compoundref="thread_8h" startline="36">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="88" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/kernel/gen_calls.c" bodystart="88" bodyend="90"/>
      </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="44" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/kernel/gen_calls.c" bodystart="44" bodyend="47"/>
        <references refid="sched_8h_154397bfe18d5da4d50ff03b15f540858" compoundref="sched_8c" startline="51">_current</references>
        <references refid="structtaskStruct_1481c2e7084fec272e616d3fb984036e2" compoundref="sched_8h" startline="67">taskStruct::td</references>
        <references refid="structthread_1f3ec0788a84e5cb640a1646d1347998a" compoundref="thread_8h" startline="36">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="76" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/kernel/gen_calls.c" bodystart="76" bodyend="79"/>
      </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="92" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/kernel/gen_calls.c" bodystart="92" bodyend="102"/>
        <references refid="structread__args_16ac2e2c0ce3199b14d0c8f0483b93298" compoundref="sysproto_8h" startline="151">read_args::buf</references>
        <references refid="structtaskStruct_1481c2e7084fec272e616d3fb984036e2" compoundref="sched_8h" startline="67">taskStruct::td</references>
        <references refid="structthread_1f3ec0788a84e5cb640a1646d1347998a" compoundref="thread_8h" startline="36">thread::td_retval</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="81" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/kernel/gen_calls.c" bodystart="81" bodyend="86"/>
        <references refid="structreadlink__args_11c122ab73c591775ed283f58ac5c3019" compoundref="sysproto_8h" startline="83">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="81">readlink_args::path</references>
        <references refid="structtaskStruct_1481c2e7084fec272e616d3fb984036e2" compoundref="sched_8h" startline="67">taskStruct::td</references>
        <references refid="structthread_1f3ec0788a84e5cb640a1646d1347998a" compoundref="thread_8h" startline="36">thread::td_retval</references>
      </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="55" bodyfile="/usr/home/reddawg/source/ubix2/src/sys/kernel/gen_calls.c" bodystart="55" bodyend="74"/>
        <references refid="structwrite__args_1719b7bf5c1f0c153d44f60930af3d545" compoundref="sysproto_8h" startline="51">write_args::buf</references>
        <references refid="shell_8c_1ff2566f4c366b48d73479bef43ee4d2e" compoundref="shell_8c" startline="47">buffer</references>
        <references refid="structwrite__args_1ca575e653f10af383a927384c410322d" compoundref="sysproto_8h" startline="50">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="52">write_args::nbyte</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$</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="include_2ubixos_2types_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="sched_8h" kindref="compound">ubixos/sched.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="34"><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="35"><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="36"><highlight class="normal"></highlight></codeline>
<codeline lineno="37"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>return<sp/>the<sp/>process<sp/>id<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="38" 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="39"><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="40"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0);</highlight></codeline>
<codeline lineno="41"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="42"><highlight class="normal"></highlight></codeline>
<codeline lineno="43"><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="44" 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="45"><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="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/>group<sp/>id<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="50" 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="51"><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="52"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0);</highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="54"><highlight class="normal"></highlight></codeline>
<codeline lineno="55" refid="gen__calls_8c_114173c973cb6d92a0e2ff34ee072f4d3" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><sp/><ref refid="gen__calls_8h_181d68497019f2d4ecce296deef5b19fe" 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="56"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*<ref refid="shell_8c_1ff2566f4c366b48d73479bef43ee4d2e" kindref="member">buffer</ref><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="57"><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="58"><highlight class="normal"></highlight></codeline>
<codeline lineno="59"><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="60"><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="61"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="62"><highlight class="normal"></highlight></codeline>
<codeline lineno="63"><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="64"><highlight class="normal"><sp/><sp/><sp/><sp/>in<sp/>=<sp/>uap-&gt;<ref refid="structwrite__args_1719b7bf5c1f0c153d44f60930af3d545" kindref="member">buf</ref>;</highlight></codeline>
<codeline lineno="65"><highlight class="normal"><sp/><sp/><sp/><sp/>buffer<sp/>=<sp/><ref refid="kmalloc_8h_1150eab2ac4ce4553e21ca10e7f441762" kindref="member">kmalloc</ref>(1024);</highlight></codeline>
<codeline lineno="66"><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="67"><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="68"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="kmalloc_8h_1aa9ed6886459604cf73ccdbf6410e487" kindref="member">kfree</ref>(buffer);</highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="71"><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="72"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(0x0);</highlight></codeline>
<codeline lineno="74"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="75"><highlight class="normal"></highlight></codeline>
<codeline lineno="76" 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="77"><highlight class="normal"><sp/><sp/>td-&gt;td_retval[0]<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(0);</highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="80"><highlight class="normal"></highlight></codeline>
<codeline lineno="81" 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="82"><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="83"><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="84"><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="85"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(0x0);</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="87"><highlight class="normal"></highlight></codeline>
<codeline lineno="88" 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="89"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(0x0);</highlight></codeline>
<codeline lineno="90"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="91"><highlight class="normal"></highlight></codeline>
<codeline lineno="92" 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="93"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>error<sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="94"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/><sp/><sp/><sp/><sp/>=<sp/>0x0;</highlight></codeline>
<codeline lineno="95"><highlight class="normal"></highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>0x0;i<sp/>&lt;<sp/>20;i++)<sp/>{</highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/>((</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*)uap-&gt;<ref refid="structread__args_16ac2e2c0ce3199b14d0c8f0483b93298" kindref="member">buf</ref>)[i]<sp/>=<sp/></highlight><highlight class="charliteral">&apos;a&apos;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="98"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/>((</highlight><highlight class="keywordtype">char</highlight><highlight class="normal"><sp/>*)uap-&gt;<ref refid="structread__args_16ac2e2c0ce3199b14d0c8f0483b93298" kindref="member">buf</ref>)[i]<sp/>=<sp/></highlight><highlight class="charliteral">&apos;\0&apos;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="100"><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/>20;</highlight></codeline>
<codeline lineno="101"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">(error);</highlight></codeline>
<codeline lineno="102"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="103"><highlight class="normal"></highlight></codeline>
<codeline lineno="104"><highlight class="normal"></highlight></codeline>
<codeline lineno="105"><highlight class="normal"></highlight><highlight class="comment">/***</highlight></codeline>
<codeline lineno="106"><highlight class="comment"><sp/>END</highlight></codeline>
<codeline lineno="107"><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>