<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.16">
  <compounddef id="timeouts_8c" kind="file" language="C++">
    <compoundname>timeouts.c</compoundname>
    <includes refid="opt_8h" local="yes">net/opt.h</includes>
    <includes refid="timeouts_8h" local="yes">net/timeouts.h</includes>
    <includes refid="tcp__priv_8h" local="yes">net/priv/tcp_priv.h</includes>
    <includes refid="def_8h" local="yes">net/def.h</includes>
    <includes refid="memp_8h" local="yes">net/memp.h</includes>
    <includes refid="tcpip__priv_8h" local="yes">net/priv/tcpip_priv.h</includes>
    <includes refid="ip4__frag_8h" local="yes">net/ip4_frag.h</includes>
    <includes refid="etharp_8h" local="yes">net/etharp.h</includes>
    <includes refid="dhcp_8h" local="yes">net/dhcp.h</includes>
    <includes refid="autoip_8h" local="yes">net/autoip.h</includes>
    <includes refid="igmp_8h" local="yes">net/igmp.h</includes>
    <includes refid="dns_8h" local="yes">net/dns.h</includes>
    <includes refid="nd6_8h" local="yes">net/nd6.h</includes>
    <includes refid="ip6__frag_8h" local="yes">net/ip6_frag.h</includes>
    <includes refid="mld6_8h" local="yes">net/mld6.h</includes>
    <includes refid="sys_8h" local="yes">net/sys.h</includes>
    <includes refid="pbuf_8h" local="yes">net/pbuf.h</includes>
    <incdepgraph>
      <node id="36">
        <label>ufs/ufs.h</label>
        <link refid="ufs_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="37" relation="include">
        </childnode>
      </node>
      <node id="65">
        <label>net/igmp.h</label>
        <link refid="igmp_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="53" relation="include">
        </childnode>
        <childnode refid="52" relation="include">
        </childnode>
        <childnode refid="56" relation="include">
        </childnode>
      </node>
      <node id="17">
        <label>stdarg.h</label>
        <link refid="stdarg_8h"/>
      </node>
      <node id="18">
        <label>ubixos/kpanic.h</label>
        <link refid="kpanic_8h"/>
      </node>
      <node id="41">
        <label>ubixos/sem.h</label>
        <link refid="sem_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="42" relation="include">
        </childnode>
        <childnode refid="23" relation="include">
        </childnode>
      </node>
      <node id="63">
        <label>net/dhcp.h</label>
        <link refid="dhcp_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="40">
        <label>sys/tss.h</label>
        <link refid="tss_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
      </node>
      <node id="67">
        <label>net/nd6.h</label>
        <link refid="nd6_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="15">
        <label>sys/io.h</label>
        <link refid="io_8h"/>
      </node>
      <node id="56">
        <label>net/pbuf.h</label>
        <link refid="pbuf_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="20" relation="include">
        </childnode>
      </node>
      <node id="42">
        <label>ubixos/errno.h</label>
        <link refid="ubixos_2errno_8h"/>
      </node>
      <node id="39">
        <label>ubixos/tty.h</label>
        <link refid="tty_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
      </node>
      <node id="59">
        <label>net/ip4.h</label>
        <link refid="ip4_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="47">
        <label>net/priv/memp_priv.h</label>
        <link refid="memp__priv_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="48" relation="include">
        </childnode>
      </node>
      <node id="29">
        <label>i386/cpu.h</label>
        <link refid="i386_2cpu_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
      </node>
      <node id="8">
        <label>sys/select.h</label>
        <link refid="select_8h"/>
        <childnode refid="9" relation="include">
        </childnode>
        <childnode refid="7" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
        <childnode refid="11" relation="include">
        </childnode>
        <childnode refid="12" relation="include">
        </childnode>
      </node>
      <node id="66">
        <label>net/dns.h</label>
        <link refid="dns_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="32">
        <label>vfs/inode.h</label>
        <link refid="inode_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="33" relation="include">
        </childnode>
        <childnode refid="34" relation="include">
        </childnode>
        <childnode refid="35" relation="include">
        </childnode>
        <childnode refid="36" relation="include">
        </childnode>
      </node>
      <node id="43">
        <label>net/priv/tcp_priv.h</label>
        <link refid="tcp__priv_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="21">
        <label>net/sys.h</label>
        <link refid="sys_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="22" relation="include">
        </childnode>
        <childnode refid="20" relation="include">
        </childnode>
      </node>
      <node id="19">
        <label>net/timeouts.h</label>
        <link refid="timeouts_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="20" relation="include">
        </childnode>
        <childnode refid="21" relation="include">
        </childnode>
      </node>
      <node id="23">
        <label>ubixos/ubthread.h</label>
        <link refid="ubthread_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="24" relation="include">
        </childnode>
        <childnode refid="14" relation="include">
        </childnode>
      </node>
      <node id="64">
        <label>net/autoip.h</label>
        <link refid="autoip_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="13">
        <label>net/arch/cc.h</label>
        <link refid="cc_8h"/>
        <childnode refid="14" relation="include">
        </childnode>
      </node>
      <node id="12">
        <label>sys/_sigset.h</label>
        <link refid="__sigset_8h"/>
        <childnode refid="7" relation="include">
        </childnode>
      </node>
      <node id="50">
        <label>net/priv/tcpip_priv.h</label>
        <link refid="tcpip__priv_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="51" relation="include">
        </childnode>
        <childnode refid="21" relation="include">
        </childnode>
        <childnode refid="19" relation="include">
        </childnode>
      </node>
      <node id="49">
        <label>net/stats.h</label>
        <link refid="stats_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="48" relation="include">
        </childnode>
        <childnode refid="45" relation="include">
        </childnode>
      </node>
      <node id="48">
        <label>net/mem.h</label>
        <link refid="mem_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="3">
        <label>net/lwipopts.h</label>
        <link refid="lwipopts_8h"/>
      </node>
      <node id="22">
        <label>net/arch/sys_arch.h</label>
        <link refid="sys__arch_8h"/>
        <childnode refid="23" relation="include">
        </childnode>
        <childnode refid="41" relation="include">
        </childnode>
      </node>
      <node id="62">
        <label>net/etharp.h</label>
        <link refid="etharp_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="38">
        <label>vfs/mount.h</label>
        <link refid="mount_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
      </node>
      <node id="31">
        <label>sys/resource.h</label>
        <link refid="resource_8h"/>
        <childnode refid="7" relation="include">
        </childnode>
      </node>
      <node id="28">
        <label>sys/trap.h</label>
        <link refid="trap_8h"/>
        <childnode refid="29" relation="include">
        </childnode>
      </node>
      <node id="6">
        <label>sys/types.h</label>
        <link refid="include_2sys_2types_8h"/>
        <childnode refid="7" relation="include">
        </childnode>
        <childnode refid="8" relation="include">
        </childnode>
      </node>
      <node id="51">
        <label>net/tcpip.h</label>
        <link refid="tcpip_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="20" relation="include">
        </childnode>
        <childnode refid="19" relation="include">
        </childnode>
        <childnode refid="52" relation="include">
        </childnode>
      </node>
      <node id="25">
        <label>vfs/file.h</label>
        <link refid="include_2vfs_2file_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="26" relation="include">
        </childnode>
        <childnode refid="27" relation="include">
        </childnode>
        <childnode refid="32" relation="include">
        </childnode>
        <childnode refid="38" relation="include">
        </childnode>
        <childnode refid="36" relation="include">
        </childnode>
      </node>
      <node id="44">
        <label>net/def.h</label>
        <link refid="def_8h"/>
        <childnode refid="5" relation="include">
        </childnode>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="52">
        <label>net/netif.h</label>
        <link refid="netif_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="20" relation="include">
        </childnode>
        <childnode refid="53" relation="include">
        </childnode>
        <childnode refid="44" relation="include">
        </childnode>
        <childnode refid="56" relation="include">
        </childnode>
        <childnode refid="49" relation="include">
        </childnode>
      </node>
      <node id="68">
        <label>net/ip6_frag.h</label>
        <link refid="ip6__frag_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="56" relation="include">
        </childnode>
        <childnode refid="55" relation="include">
        </childnode>
        <childnode refid="60" relation="include">
        </childnode>
        <childnode refid="52" relation="include">
        </childnode>
      </node>
      <node id="5">
        <label>net/arch.h</label>
        <link refid="arch_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="13" relation="include">
        </childnode>
        <childnode refid="16" relation="include">
        </childnode>
        <childnode refid="18" relation="include">
        </childnode>
      </node>
      <node id="35">
        <label>fs/msdos_fs.h</label>
        <link refid="msdos__fs_8h"/>
      </node>
      <node id="30">
        <label>sys/signal.h</label>
        <link refid="sys_2signal_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
      </node>
      <node id="60">
        <label>net/ip6.h</label>
        <link refid="ip6_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="57">
        <label>net/ip4_frag.h</label>
        <link refid="ip4__frag_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="20" relation="include">
        </childnode>
        <childnode refid="56" relation="include">
        </childnode>
        <childnode refid="52" relation="include">
        </childnode>
        <childnode refid="53" relation="include">
        </childnode>
        <childnode refid="58" relation="include">
        </childnode>
      </node>
      <node id="34">
        <label>fs/pipe_fs.h</label>
        <link refid="pipe__fs_8h"/>
      </node>
      <node id="33">
        <label>ubixos/wait.h</label>
        <link refid="wait_8h"/>
      </node>
      <node id="55">
        <label>net/ip6_addr.h</label>
        <link refid="ip6__addr_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="44" relation="include">
        </childnode>
      </node>
      <node id="2">
        <label>net/opt.h</label>
        <link refid="opt_8h"/>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
      </node>
      <node id="16">
        <label>lib/kprintf.h</label>
        <link refid="kprintf_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="17" relation="include">
        </childnode>
      </node>
      <node id="1">
        <label>C:/Dev/git/UbixOS/sys/net/core/timeouts.c</label>
        <link refid="timeouts_8c"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="19" relation="include">
        </childnode>
        <childnode refid="43" relation="include">
        </childnode>
        <childnode refid="44" relation="include">
        </childnode>
        <childnode refid="45" relation="include">
        </childnode>
        <childnode refid="50" relation="include">
        </childnode>
        <childnode refid="57" relation="include">
        </childnode>
        <childnode refid="62" relation="include">
        </childnode>
        <childnode refid="63" relation="include">
        </childnode>
        <childnode refid="64" relation="include">
        </childnode>
        <childnode refid="65" relation="include">
        </childnode>
        <childnode refid="66" relation="include">
        </childnode>
        <childnode refid="67" relation="include">
        </childnode>
        <childnode refid="68" relation="include">
        </childnode>
        <childnode refid="69" relation="include">
        </childnode>
        <childnode refid="21" relation="include">
        </childnode>
        <childnode refid="56" relation="include">
        </childnode>
      </node>
      <node id="58">
        <label>net/ip.h</label>
        <link refid="ip_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="44" relation="include">
        </childnode>
        <childnode refid="56" relation="include">
        </childnode>
        <childnode refid="53" relation="include">
        </childnode>
        <childnode refid="20" relation="include">
        </childnode>
        <childnode refid="52" relation="include">
        </childnode>
        <childnode refid="59" relation="include">
        </childnode>
        <childnode refid="60" relation="include">
        </childnode>
        <childnode refid="61" relation="include">
        </childnode>
      </node>
      <node id="4">
        <label>net/debug.h</label>
        <link refid="debug_8h"/>
        <childnode refid="5" relation="include">
        </childnode>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="54">
        <label>net/ip4_addr.h</label>
        <link refid="ip4__addr_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="44" relation="include">
        </childnode>
      </node>
      <node id="53">
        <label>net/ip_addr.h</label>
        <link refid="ip__addr_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="44" relation="include">
        </childnode>
        <childnode refid="54" relation="include">
        </childnode>
        <childnode refid="55" relation="include">
        </childnode>
      </node>
      <node id="27">
        <label>sys/thread.h</label>
        <link refid="thread_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="28" relation="include">
        </childnode>
        <childnode refid="30" relation="include">
        </childnode>
        <childnode refid="31" relation="include">
        </childnode>
      </node>
      <node id="46">
        <label>net/priv/memp_std.h</label>
        <link refid="memp__std_8h"/>
      </node>
      <node id="9">
        <label>sys/cdefs.h</label>
        <link refid="cdefs_8h"/>
      </node>
      <node id="14">
        <label>ubixos/time.h</label>
        <link refid="time_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
        <childnode refid="15" relation="include">
        </childnode>
      </node>
      <node id="24">
        <label>ubixos/sched.h</label>
        <link refid="sched_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="25" relation="include">
        </childnode>
        <childnode refid="39" relation="include">
        </childnode>
        <childnode refid="40" relation="include">
        </childnode>
        <childnode refid="27" relation="include">
        </childnode>
      </node>
      <node id="7">
        <label>sys/_types.h</label>
        <link refid="__types_8h"/>
      </node>
      <node id="61">
        <label>net/prot/ip.h</label>
        <link refid="prot_2ip_8h"/>
        <childnode refid="5" relation="include">
        </childnode>
      </node>
      <node id="20">
        <label>net/err.h</label>
        <link refid="err_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="5" relation="include">
        </childnode>
      </node>
      <node id="10">
        <label>sys/_timespec.h</label>
        <link refid="__timespec_8h"/>
        <childnode refid="7" relation="include">
        </childnode>
      </node>
      <node id="37">
        <label>sys/device.h</label>
        <link refid="include_2sys_2device_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
      </node>
      <node id="26">
        <label>ubixfs/dirCache.h</label>
        <link refid="dirCache_8h"/>
        <childnode refid="6" relation="include">
        </childnode>
      </node>
      <node id="11">
        <label>sys/_timeval.h</label>
        <link refid="__timeval_8h"/>
        <childnode refid="7" relation="include">
        </childnode>
      </node>
      <node id="69">
        <label>net/mld6.h</label>
        <link refid="mld6_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
      </node>
      <node id="45">
        <label>net/memp.h</label>
        <link refid="memp_8h"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="46" relation="include">
        </childnode>
        <childnode refid="47" relation="include">
        </childnode>
        <childnode refid="49" relation="include">
        </childnode>
      </node>
    </incdepgraph>
      <sectiondef kind="define">
      <memberdef kind="define" id="timeouts_8c_1a9f8226a5ad45684da350fe29edb1ba7b" prot="public" static="no">
        <name>HANDLER</name>
        <param><defname>x</defname></param>
        <initializer>x</initializer>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/net/core/timeouts.c" line="66" column="9" bodyfile="C:/Dev/git/UbixOS/sys/net/core/timeouts.c" bodystart="66" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="var">
      <memberdef kind="variable" id="timeouts_8c_1addc06ab816f051a0fe6f280972eed142" prot="public" static="no" mutable="no">
        <type><ref refid="cdefs_8h_1a2c212835823e3c54a8ab6d95c652660e" kindref="member">const</ref> struct <ref refid="structlwip__cyclic__timer" kindref="compound">lwip_cyclic_timer</ref></type>
        <definition>const struct lwip_cyclic_timer lwip_cyclic_timers[]</definition>
        <argsstring>[]</argsstring>
        <name>lwip_cyclic_timers</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
<para>This array contains all stack-internal cyclic timers. To get the number of timers, use <ref refid="def_8h_1a4abb61f4c9339d8a0a0c63b4fbfe6a37" kindref="member">LWIP_ARRAYSIZE()</ref> </para>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/net/core/timeouts.c" line="93" column="1" bodyfile="C:/Dev/git/UbixOS/sys/net/core/timeouts.c" bodystart="71" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="func">
      <memberdef kind="function" id="timeouts_8c_1a8181bc316fdf61b85f787c5cadfcd249" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>void</type>
        <definition>void tcp_timer_needed</definition>
        <argsstring>(void)</argsstring>
        <name>tcp_timer_needed</name>
        <param>
          <type>void</type>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Dev/git/UbixOS/sys/net/core/timeouts.c" line="430" column="1" bodyfile="C:/Dev/git/UbixOS/sys/net/core/timeouts.c" bodystart="430" bodyend="432"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
<para>Stack-internal timers implementation. This file includes timer callbacks for stack-internal timers as well as functions to set up or stop timers and check for expired timers. </para>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"></codeline>
<codeline lineno="9"><highlight class="comment">/*</highlight></codeline>
<codeline lineno="10"><highlight class="comment"><sp/>*<sp/>Copyright<sp/>(c)<sp/>2001-2004<sp/>Swedish<sp/>Institute<sp/>of<sp/>Computer<sp/>Science.</highlight></codeline>
<codeline lineno="11"><highlight class="comment"><sp/>*<sp/>All<sp/>rights<sp/>reserved.</highlight></codeline>
<codeline lineno="12"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="13"><highlight class="comment"><sp/>*<sp/>Redistribution<sp/>and<sp/>use<sp/>in<sp/>source<sp/>and<sp/>binary<sp/>forms,<sp/>with<sp/>or<sp/>without<sp/>modification,</highlight></codeline>
<codeline lineno="14"><highlight class="comment"><sp/>*<sp/>are<sp/>permitted<sp/>provided<sp/>that<sp/>the<sp/>following<sp/>conditions<sp/>are<sp/>met:</highlight></codeline>
<codeline lineno="15"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="16"><highlight class="comment"><sp/>*<sp/>1.<sp/>Redistributions<sp/>of<sp/>source<sp/>code<sp/>must<sp/>retain<sp/>the<sp/>above<sp/>copyright<sp/>notice,</highlight></codeline>
<codeline lineno="17"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>this<sp/>list<sp/>of<sp/>conditions<sp/>and<sp/>the<sp/>following<sp/>disclaimer.</highlight></codeline>
<codeline lineno="18"><highlight class="comment"><sp/>*<sp/>2.<sp/>Redistributions<sp/>in<sp/>binary<sp/>form<sp/>must<sp/>reproduce<sp/>the<sp/>above<sp/>copyright<sp/>notice,</highlight></codeline>
<codeline lineno="19"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>this<sp/>list<sp/>of<sp/>conditions<sp/>and<sp/>the<sp/>following<sp/>disclaimer<sp/>in<sp/>the<sp/>documentation</highlight></codeline>
<codeline lineno="20"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>and/or<sp/>other<sp/>materials<sp/>provided<sp/>with<sp/>the<sp/>distribution.</highlight></codeline>
<codeline lineno="21"><highlight class="comment"><sp/>*<sp/>3.<sp/>The<sp/>name<sp/>of<sp/>the<sp/>author<sp/>may<sp/>not<sp/>be<sp/>used<sp/>to<sp/>endorse<sp/>or<sp/>promote<sp/>products</highlight></codeline>
<codeline lineno="22"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/>derived<sp/>from<sp/>this<sp/>software<sp/>without<sp/>specific<sp/>prior<sp/>written<sp/>permission.</highlight></codeline>
<codeline lineno="23"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="24"><highlight class="comment"><sp/>*<sp/>THIS<sp/>SOFTWARE<sp/>IS<sp/>PROVIDED<sp/>BY<sp/>THE<sp/>AUTHOR<sp/>``AS<sp/>IS&apos;&apos;<sp/>AND<sp/>ANY<sp/>EXPRESS<sp/>OR<sp/>IMPLIED</highlight></codeline>
<codeline lineno="25"><highlight class="comment"><sp/>*<sp/>WARRANTIES,<sp/>INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>THE<sp/>IMPLIED<sp/>WARRANTIES<sp/>OF</highlight></codeline>
<codeline lineno="26"><highlight class="comment"><sp/>*<sp/>MERCHANTABILITY<sp/>AND<sp/>FITNESS<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE<sp/>ARE<sp/>DISCLAIMED.<sp/>IN<sp/>NO<sp/>EVENT</highlight></codeline>
<codeline lineno="27"><highlight class="comment"><sp/>*<sp/>SHALL<sp/>THE<sp/>AUTHOR<sp/>BE<sp/>LIABLE<sp/>FOR<sp/>ANY<sp/>DIRECT,<sp/>INDIRECT,<sp/>INCIDENTAL,<sp/>SPECIAL,</highlight></codeline>
<codeline lineno="28"><highlight class="comment"><sp/>*<sp/>EXEMPLARY,<sp/>OR<sp/>CONSEQUENTIAL<sp/>DAMAGES<sp/>(INCLUDING,<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO,<sp/>PROCUREMENT</highlight></codeline>
<codeline lineno="29"><highlight class="comment"><sp/>*<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</highlight></codeline>
<codeline lineno="30"><highlight class="comment"><sp/>*<sp/>INTERRUPTION)<sp/>HOWEVER<sp/>CAUSED<sp/>AND<sp/>ON<sp/>ANY<sp/>THEORY<sp/>OF<sp/>LIABILITY,<sp/>WHETHER<sp/>IN</highlight></codeline>
<codeline lineno="31"><highlight class="comment"><sp/>*<sp/>CONTRACT,<sp/>STRICT<sp/>LIABILITY,<sp/>OR<sp/>TORT<sp/>(INCLUDING<sp/>NEGLIGENCE<sp/>OR<sp/>OTHERWISE)<sp/>ARISING</highlight></codeline>
<codeline lineno="32"><highlight class="comment"><sp/>*<sp/>IN<sp/>ANY<sp/>WAY<sp/>OUT<sp/>OF<sp/>THE<sp/>USE<sp/>OF<sp/>THIS<sp/>SOFTWARE,<sp/>EVEN<sp/>IF<sp/>ADVISED<sp/>OF<sp/>THE<sp/>POSSIBILITY</highlight></codeline>
<codeline lineno="33"><highlight class="comment"><sp/>*<sp/>OF<sp/>SUCH<sp/>DAMAGE.</highlight></codeline>
<codeline lineno="34"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="35"><highlight class="comment"><sp/>*<sp/>This<sp/>file<sp/>is<sp/>part<sp/>of<sp/>the<sp/>lwIP<sp/>TCP/IP<sp/>stack.</highlight></codeline>
<codeline lineno="36"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="37"><highlight class="comment"><sp/>*<sp/>Author:<sp/>Adam<sp/>Dunkels<sp/>&lt;adam@sics.se&gt;</highlight></codeline>
<codeline lineno="38"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Simon<sp/>Goldschmidt</highlight></codeline>
<codeline lineno="39"><highlight class="comment"><sp/>*</highlight></codeline>
<codeline lineno="40"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="41"><highlight class="normal"></highlight></codeline>
<codeline lineno="42"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="opt_8h" kindref="compound">net/opt.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="43"><highlight class="normal"></highlight></codeline>
<codeline lineno="44"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="timeouts_8h" kindref="compound">net/timeouts.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="45"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="tcp__priv_8h" kindref="compound">net/priv/tcp_priv.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="46"><highlight class="normal"></highlight></codeline>
<codeline lineno="47"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="def_8h" kindref="compound">net/def.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="48"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="memp_8h" kindref="compound">net/memp.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="49"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="tcpip__priv_8h" kindref="compound">net/priv/tcpip_priv.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="50"><highlight class="normal"></highlight></codeline>
<codeline lineno="51"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="ip4__frag_8h" kindref="compound">net/ip4_frag.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="52"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="etharp_8h" kindref="compound">net/etharp.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="53"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="dhcp_8h" kindref="compound">net/dhcp.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="54"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="autoip_8h" kindref="compound">net/autoip.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="55"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="igmp_8h" kindref="compound">net/igmp.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="56"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="dns_8h" kindref="compound">net/dns.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="57"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="nd6_8h" kindref="compound">net/nd6.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="58"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="ip6__frag_8h" kindref="compound">net/ip6_frag.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="59"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="mld6_8h" kindref="compound">net/mld6.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="60"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="sys_8h" kindref="compound">net/sys.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="61"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;<ref refid="pbuf_8h" kindref="compound">net/pbuf.h</ref>&quot;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="62"><highlight class="normal"></highlight></codeline>
<codeline lineno="63"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_DEBUG_TIMERNAMES</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="64"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>HANDLER(x)<sp/>x,<sp/>#x</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="65"><highlight class="normal"></highlight><highlight class="preprocessor">#else<sp/></highlight><highlight class="comment">/*<sp/>LWIP_DEBUG_TIMERNAMES<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="66" refid="timeouts_8c_1a9f8226a5ad45684da350fe29edb1ba7b" refkind="member"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>HANDLER(x)<sp/>x</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="67"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_DEBUG_TIMERNAMES<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="68"><highlight class="normal"></highlight></codeline>
<codeline lineno="71" refid="timeouts_8c_1addc06ab816f051a0fe6f280972eed142" refkind="member"><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structlwip__cyclic__timer" kindref="compound">lwip_cyclic_timer</ref><sp/><ref refid="timeouts_8c_1addc06ab816f051a0fe6f280972eed142" kindref="member">lwip_cyclic_timers</ref>[]<sp/>=<sp/>{</highlight></codeline>
<codeline lineno="72"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_TCP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>The<sp/>TCP<sp/>timer<sp/>is<sp/>a<sp/>special<sp/>case:<sp/>it<sp/>does<sp/>not<sp/>have<sp/>to<sp/>run<sp/>always<sp/>and</highlight></codeline>
<codeline lineno="74"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>is<sp/>triggered<sp/>to<sp/>start<sp/>from<sp/>TCP<sp/>using<sp/>tcp_timer_needed()<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/>{TCP_TMR_INTERVAL,<sp/><ref refid="timeouts_8c_1a9f8226a5ad45684da350fe29edb1ba7b" kindref="member">HANDLER</ref>(tcp_tmr)},</highlight></codeline>
<codeline lineno="76"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_TCP<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="77"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_IPV4</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="78"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>IP_REASSEMBLY</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/>{IP_TMR_INTERVAL,<sp/><ref refid="timeouts_8c_1a9f8226a5ad45684da350fe29edb1ba7b" kindref="member">HANDLER</ref>(ip_reass_tmr)},</highlight></codeline>
<codeline lineno="80"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>IP_REASSEMBLY<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="81"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_ARP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/>{ARP_TMR_INTERVAL,<sp/><ref refid="timeouts_8c_1a9f8226a5ad45684da350fe29edb1ba7b" kindref="member">HANDLER</ref>(etharp_tmr)},</highlight></codeline>
<codeline lineno="83"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_ARP<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="84"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_DHCP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/>{DHCP_COARSE_TIMER_MSECS,<sp/><ref refid="timeouts_8c_1a9f8226a5ad45684da350fe29edb1ba7b" kindref="member">HANDLER</ref>(dhcp_coarse_tmr)},</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/>{DHCP_FINE_TIMER_MSECS,<sp/><ref refid="timeouts_8c_1a9f8226a5ad45684da350fe29edb1ba7b" kindref="member">HANDLER</ref>(dhcp_fine_tmr)},</highlight></codeline>
<codeline lineno="87"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_DHCP<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="88"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_AUTOIP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/>{AUTOIP_TMR_INTERVAL,<sp/><ref refid="timeouts_8c_1a9f8226a5ad45684da350fe29edb1ba7b" kindref="member">HANDLER</ref>(autoip_tmr)},</highlight></codeline>
<codeline lineno="90"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_AUTOIP<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="91"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_IGMP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/><sp/>{IGMP_TMR_INTERVAL,<sp/><ref refid="timeouts_8c_1a9f8226a5ad45684da350fe29edb1ba7b" kindref="member">HANDLER</ref>(igmp_tmr)},</highlight></codeline>
<codeline lineno="93"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_IGMP<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="94"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_IPV4<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="95"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_DNS</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/>{DNS_TMR_INTERVAL,<sp/><ref refid="timeouts_8c_1a9f8226a5ad45684da350fe29edb1ba7b" kindref="member">HANDLER</ref>(dns_tmr)},</highlight></codeline>
<codeline lineno="97"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_DNS<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="98"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_IPV6</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/>{ND6_TMR_INTERVAL,<sp/><ref refid="timeouts_8c_1a9f8226a5ad45684da350fe29edb1ba7b" kindref="member">HANDLER</ref>(nd6_tmr)},</highlight></codeline>
<codeline lineno="100"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_IPV6_REASS</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="101"><highlight class="normal"><sp/><sp/>{IP6_REASS_TMR_INTERVAL,<sp/><ref refid="timeouts_8c_1a9f8226a5ad45684da350fe29edb1ba7b" kindref="member">HANDLER</ref>(ip6_reass_tmr)},</highlight></codeline>
<codeline lineno="102"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_IPV6_REASS<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="103"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_IPV6_MLD</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="104"><highlight class="normal"><sp/><sp/>{MLD6_TMR_INTERVAL,<sp/><ref refid="timeouts_8c_1a9f8226a5ad45684da350fe29edb1ba7b" kindref="member">HANDLER</ref>(mld6_tmr)},</highlight></codeline>
<codeline lineno="105"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_IPV6_MLD<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="106"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_IPV6<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="107"><highlight class="normal">};</highlight></codeline>
<codeline lineno="108"><highlight class="normal"></highlight></codeline>
<codeline lineno="109"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_TIMERS<sp/>&amp;&amp;<sp/>!LWIP_TIMERS_CUSTOM</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="110"><highlight class="normal"></highlight></codeline>
<codeline lineno="112"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">sys_timeo<sp/>*next_timeout;</highlight></codeline>
<codeline lineno="113"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"><sp/><ref refid="group__compiler__abstraction_1ga4c14294869aceba3ef9d4c0c302d0f33" kindref="member">u32_t</ref><sp/>timeouts_last_time;</highlight></codeline>
<codeline lineno="114"><highlight class="normal"></highlight></codeline>
<codeline lineno="115"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_TCP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="116"><highlight class="normal"></highlight></codeline>
<codeline lineno="117"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>tcpip_tcp_timer_active;</highlight></codeline>
<codeline lineno="118"><highlight class="normal"></highlight></codeline>
<codeline lineno="124"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="125"><highlight class="normal">tcpip_tcp_timer(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*arg)</highlight></codeline>
<codeline lineno="126"><highlight class="normal">{</highlight></codeline>
<codeline lineno="127"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga70624a5deb8b9199406372a7f3603ecf" kindref="member">LWIP_UNUSED_ARG</ref>(arg);</highlight></codeline>
<codeline lineno="128"><highlight class="normal"></highlight></codeline>
<codeline lineno="129"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>call<sp/>TCP<sp/>timer<sp/>handler<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="130"><highlight class="normal"><sp/><sp/>tcp_tmr();</highlight></codeline>
<codeline lineno="131"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>timer<sp/>still<sp/>needed?<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="132"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tcp_active_pcbs<sp/>||<sp/>tcp_tw_pcbs)<sp/>{</highlight></codeline>
<codeline lineno="133"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>restart<sp/>timer<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="134"><highlight class="normal"><sp/><sp/><sp/><sp/>sys_timeout(TCP_TMR_INTERVAL,<sp/>tcpip_tcp_timer,<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline>
<codeline lineno="135"><highlight class="normal"><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="136"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>disable<sp/>timer<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="137"><highlight class="normal"><sp/><sp/><sp/><sp/>tcpip_tcp_timer_active<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="138"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="139"><highlight class="normal">}</highlight></codeline>
<codeline lineno="140"><highlight class="normal"></highlight></codeline>
<codeline lineno="146"><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="147"><highlight class="normal"><ref refid="timeouts_8c_1a8181bc316fdf61b85f787c5cadfcd249" kindref="member">tcp_timer_needed</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="148"><highlight class="normal">{</highlight></codeline>
<codeline lineno="149"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>timer<sp/>is<sp/>off<sp/>but<sp/>needed<sp/>again?<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="150"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!tcpip_tcp_timer_active<sp/>&amp;&amp;<sp/>(tcp_active_pcbs<sp/>||<sp/>tcp_tw_pcbs))<sp/>{</highlight></codeline>
<codeline lineno="151"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>enable<sp/>and<sp/>start<sp/>timer<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="152"><highlight class="normal"><sp/><sp/><sp/><sp/>tcpip_tcp_timer_active<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="153"><highlight class="normal"><sp/><sp/><sp/><sp/>sys_timeout(TCP_TMR_INTERVAL,<sp/>tcpip_tcp_timer,<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline>
<codeline lineno="154"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="155"><highlight class="normal">}</highlight></codeline>
<codeline lineno="156"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_TCP<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="157"><highlight class="normal"></highlight></codeline>
<codeline lineno="163"><highlight class="keyword">static</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="164"><highlight class="normal">cyclic_timer(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*arg)</highlight></codeline>
<codeline lineno="165"><highlight class="normal">{</highlight></codeline>
<codeline lineno="166"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structlwip__cyclic__timer" kindref="compound">lwip_cyclic_timer</ref>*<sp/>cyclic<sp/>=<sp/>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="structlwip__cyclic__timer" kindref="compound">lwip_cyclic_timer</ref>*)arg;</highlight></codeline>
<codeline lineno="167"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_DEBUG_TIMERNAMES</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="168"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1a24a6644ba9cc82665a7bf209b3870c15" kindref="member">TIMERS_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;tcpip:<sp/>%s()\n&quot;</highlight><highlight class="normal">,<sp/>cyclic-&gt;handler_name));</highlight></codeline>
<codeline lineno="169"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="170"><highlight class="normal"><sp/><sp/>cyclic-&gt;<ref refid="structlwip__cyclic__timer_1a4fada87ea068f44bbb92c63b4d65ac1d" kindref="member">handler</ref>();</highlight></codeline>
<codeline lineno="171"><highlight class="normal"><sp/><sp/>sys_timeout(cyclic-&gt;<ref refid="structlwip__cyclic__timer_1addbc7ac275287e62a81cdd16b3dd56f9" kindref="member">interval_ms</ref>,<sp/>cyclic_timer,<sp/>arg);</highlight></codeline>
<codeline lineno="172"><highlight class="normal">}</highlight></codeline>
<codeline lineno="173"><highlight class="normal"></highlight></codeline>
<codeline lineno="175"><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>sys_timeouts_init(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="176"><highlight class="normal">{</highlight></codeline>
<codeline lineno="177"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"><sp/>i;</highlight></codeline>
<codeline lineno="178"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>tcp_tmr()<sp/>at<sp/>index<sp/>0<sp/>is<sp/>started<sp/>on<sp/>demand<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="179"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i<sp/>=<sp/>(<ref refid="lwipopts_8h_1aa4ed98deb97b77c633cb8870f34c71e9" kindref="member">LWIP_TCP</ref><sp/>?<sp/>1<sp/>:<sp/>0);<sp/>i<sp/>&lt;<sp/><ref refid="def_8h_1a4abb61f4c9339d8a0a0c63b4fbfe6a37" kindref="member">LWIP_ARRAYSIZE</ref>(<ref refid="timeouts_8c_1addc06ab816f051a0fe6f280972eed142" kindref="member">lwip_cyclic_timers</ref>);<sp/>i++)<sp/>{</highlight></codeline>
<codeline lineno="180"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>we<sp/>have<sp/>to<sp/>cast<sp/>via<sp/>size_t<sp/>to<sp/>get<sp/>rid<sp/>of<sp/>const<sp/>warning</highlight></codeline>
<codeline lineno="181"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/>(this<sp/>is<sp/>OK<sp/>as<sp/>cyclic_timer()<sp/>casts<sp/>back<sp/>to<sp/>const*<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/>sys_timeout(<ref refid="timeouts_8c_1addc06ab816f051a0fe6f280972eed142" kindref="member">lwip_cyclic_timers</ref>[i].<ref refid="structlwip__cyclic__timer_1addbc7ac275287e62a81cdd16b3dd56f9" kindref="member">interval_ms</ref>,<sp/>cyclic_timer,<sp/><ref refid="group__compiler__abstraction_1gaa0dd3f76dd9a837feaac61fedc0dbe72" kindref="member">LWIP_CONST_CAST</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">*,<sp/>&amp;<ref refid="timeouts_8c_1addc06ab816f051a0fe6f280972eed142" kindref="member">lwip_cyclic_timers</ref>[i]));</highlight></codeline>
<codeline lineno="183"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="184"><highlight class="normal"></highlight></codeline>
<codeline lineno="185"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*<sp/>Initialise<sp/>timestamp<sp/>for<sp/>sys_check_timeouts<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="186"><highlight class="normal"><sp/><sp/>timeouts_last_time<sp/>=<sp/><ref refid="group__sys__time_1ga11316ac1e77418c6fa4ab8869e3fa199" kindref="member">sys_now</ref>();</highlight></codeline>
<codeline lineno="187"><highlight class="normal">}</highlight></codeline>
<codeline lineno="188"><highlight class="normal"></highlight></codeline>
<codeline lineno="199"><highlight class="preprocessor">#if<sp/>LWIP_DEBUG_TIMERNAMES</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="200"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="201"><highlight class="normal">sys_timeout_debug(<ref refid="group__compiler__abstraction_1ga4c14294869aceba3ef9d4c0c302d0f33" kindref="member">u32_t</ref><sp/>msecs,<sp/>sys_timeout_handler<sp/><ref refid="structlwip__cyclic__timer_1a4fada87ea068f44bbb92c63b4d65ac1d" kindref="member">handler</ref>,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*arg,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">char</highlight><highlight class="normal">*<sp/>handler_name)</highlight></codeline>
<codeline lineno="202"><highlight class="normal"></highlight><highlight class="preprocessor">#else<sp/></highlight><highlight class="comment">/*<sp/>LWIP_DEBUG_TIMERNAMES<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="203"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="204"><highlight class="normal">sys_timeout(<ref refid="group__compiler__abstraction_1ga4c14294869aceba3ef9d4c0c302d0f33" kindref="member">u32_t</ref><sp/>msecs,<sp/>sys_timeout_handler<sp/><ref refid="structlwip__cyclic__timer_1a4fada87ea068f44bbb92c63b4d65ac1d" kindref="member">handler</ref>,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*arg)</highlight></codeline>
<codeline lineno="205"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_DEBUG_TIMERNAMES<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="206"><highlight class="normal">{</highlight></codeline>
<codeline lineno="207"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">sys_timeo<sp/>*timeout,<sp/>*t;</highlight></codeline>
<codeline lineno="208"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4c14294869aceba3ef9d4c0c302d0f33" kindref="member">u32_t</ref><sp/>now,<sp/>diff;</highlight></codeline>
<codeline lineno="209"><highlight class="normal"></highlight></codeline>
<codeline lineno="210"><highlight class="normal"><sp/><sp/>timeout<sp/>=<sp/>(</highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">sys_timeo<sp/>*)<ref refid="memp_8h_1a2b00593d086313c267b54a976bf67aa5" kindref="member">memp_malloc</ref>(MEMP_SYS_TIMEOUT);</highlight></codeline>
<codeline lineno="211"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(timeout<sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="212"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a94ad086267808462beae2b38f91996ed" kindref="member">LWIP_ASSERT</ref>(</highlight><highlight class="stringliteral">&quot;sys_timeout:<sp/>timeout<sp/>!=<sp/>NULL,<sp/>pool<sp/>MEMP_SYS_TIMEOUT<sp/>is<sp/>empty&quot;</highlight><highlight class="normal">,<sp/>timeout<sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>);</highlight></codeline>
<codeline lineno="213"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="214"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="215"><highlight class="normal"></highlight></codeline>
<codeline lineno="216"><highlight class="normal"><sp/><sp/>now<sp/>=<sp/><ref refid="group__sys__time_1ga11316ac1e77418c6fa4ab8869e3fa199" kindref="member">sys_now</ref>();</highlight></codeline>
<codeline lineno="217"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(next_timeout<sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="218"><highlight class="normal"><sp/><sp/><sp/><sp/>diff<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="219"><highlight class="normal"><sp/><sp/><sp/><sp/>timeouts_last_time<sp/>=<sp/>now;</highlight></codeline>
<codeline lineno="220"><highlight class="normal"><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="221"><highlight class="normal"><sp/><sp/><sp/><sp/>diff<sp/>=<sp/>now<sp/>-<sp/>timeouts_last_time;</highlight></codeline>
<codeline lineno="222"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="223"><highlight class="normal"></highlight></codeline>
<codeline lineno="224"><highlight class="normal"><sp/><sp/>timeout-&gt;next<sp/>=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;</highlight></codeline>
<codeline lineno="225"><highlight class="normal"><sp/><sp/>timeout-&gt;h<sp/>=<sp/>handler;</highlight></codeline>
<codeline lineno="226"><highlight class="normal"><sp/><sp/>timeout-&gt;arg<sp/>=<sp/>arg;</highlight></codeline>
<codeline lineno="227"><highlight class="normal"><sp/><sp/>timeout-&gt;time<sp/>=<sp/>msecs<sp/>+<sp/>diff;</highlight></codeline>
<codeline lineno="228"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_DEBUG_TIMERNAMES</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="229"><highlight class="normal"><sp/><sp/>timeout-&gt;handler_name<sp/>=<sp/>handler_name;</highlight></codeline>
<codeline lineno="230"><highlight class="normal"><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1a24a6644ba9cc82665a7bf209b3870c15" kindref="member">TIMERS_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;sys_timeout:<sp/>%p<sp/>msecs=%&quot;</highlight><highlight class="normal"><ref refid="group__compiler__abstraction_1gad8b0a364e95b07cb0c47709fdc6037d6" kindref="member">U32_F</ref></highlight><highlight class="stringliteral">&quot;<sp/>handler=%s<sp/>arg=%p\n&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="231"><highlight class="normal"><sp/><sp/><sp/><sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)timeout,<sp/>msecs,<sp/>handler_name,<sp/>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*)arg));</highlight></codeline>
<codeline lineno="232"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_DEBUG_TIMERNAMES<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="233"><highlight class="normal"></highlight></codeline>
<codeline lineno="234"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(next_timeout<sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="235"><highlight class="normal"><sp/><sp/><sp/><sp/>next_timeout<sp/>=<sp/>timeout;</highlight></codeline>
<codeline lineno="236"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="237"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="238"><highlight class="normal"></highlight></codeline>
<codeline lineno="239"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(next_timeout-&gt;time<sp/>&gt;<sp/>msecs)<sp/>{</highlight></codeline>
<codeline lineno="240"><highlight class="normal"><sp/><sp/><sp/><sp/>next_timeout-&gt;time<sp/>-=<sp/>msecs;</highlight></codeline>
<codeline lineno="241"><highlight class="normal"><sp/><sp/><sp/><sp/>timeout-&gt;next<sp/>=<sp/>next_timeout;</highlight></codeline>
<codeline lineno="242"><highlight class="normal"><sp/><sp/><sp/><sp/>next_timeout<sp/>=<sp/>timeout;</highlight></codeline>
<codeline lineno="243"><highlight class="normal"><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="244"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(t<sp/>=<sp/>next_timeout;<sp/>t<sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;<sp/>t<sp/>=<sp/>t-&gt;next)<sp/>{</highlight></codeline>
<codeline lineno="245"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>timeout-&gt;time<sp/>-=<sp/>t-&gt;time;</highlight></codeline>
<codeline lineno="246"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t-&gt;next<sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref><sp/>||<sp/>t-&gt;next-&gt;time<sp/>&gt;<sp/>timeout-&gt;time)<sp/>{</highlight></codeline>
<codeline lineno="247"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t-&gt;next<sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="248"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>t-&gt;next-&gt;time<sp/>-=<sp/>timeout-&gt;time;</highlight></codeline>
<codeline lineno="249"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(timeout-&gt;time<sp/>&gt;<sp/>msecs)<sp/>{</highlight></codeline>
<codeline lineno="250"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>If<sp/>this<sp/>is<sp/>the<sp/>case,<sp/>&apos;timeouts_last_time&apos;<sp/>and<sp/>&apos;now&apos;<sp/>differs<sp/>too<sp/>much.</highlight></codeline>
<codeline lineno="251"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>This<sp/>can<sp/>be<sp/>due<sp/>to<sp/>sys_check_timeouts()<sp/>not<sp/>being<sp/>called<sp/>at<sp/>the<sp/>right</highlight></codeline>
<codeline lineno="252"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>times,<sp/>but<sp/>also<sp/>when<sp/>stopping<sp/>in<sp/>a<sp/>breakpoint.<sp/>Anyway,<sp/>let&apos;s<sp/>assume</highlight></codeline>
<codeline lineno="253"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>this<sp/>is<sp/>not<sp/>wanted,<sp/>so<sp/>add<sp/>the<sp/>first<sp/>timer&apos;s<sp/>time<sp/>instead<sp/>of<sp/>&apos;diff&apos;<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="254"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>timeout-&gt;time<sp/>=<sp/>msecs<sp/>+<sp/>next_timeout-&gt;time;</highlight></codeline>
<codeline lineno="255"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="256"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>timeout-&gt;next<sp/>=<sp/>t-&gt;next;</highlight></codeline>
<codeline lineno="257"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>t-&gt;next<sp/>=<sp/>timeout;</highlight></codeline>
<codeline lineno="258"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="259"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="260"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="261"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="262"><highlight class="normal">}</highlight></codeline>
<codeline lineno="263"><highlight class="normal"></highlight></codeline>
<codeline lineno="272"><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="273"><highlight class="normal">sys_untimeout(sys_timeout_handler<sp/>handler,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*arg)</highlight></codeline>
<codeline lineno="274"><highlight class="normal">{</highlight></codeline>
<codeline lineno="275"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">sys_timeo<sp/>*prev_t,<sp/>*t;</highlight></codeline>
<codeline lineno="276"><highlight class="normal"></highlight></codeline>
<codeline lineno="277"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(next_timeout<sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="278"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="279"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="280"><highlight class="normal"></highlight></codeline>
<codeline lineno="281"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(t<sp/>=<sp/>next_timeout,<sp/>prev_t<sp/>=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;<sp/>t<sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>;<sp/>prev_t<sp/>=<sp/>t,<sp/>t<sp/>=<sp/>t-&gt;next)<sp/>{</highlight></codeline>
<codeline lineno="282"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((t-&gt;h<sp/>==<sp/>handler)<sp/>&amp;&amp;<sp/>(t-&gt;arg<sp/>==<sp/>arg))<sp/>{</highlight></codeline>
<codeline lineno="283"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>We<sp/>have<sp/>a<sp/>match<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="284"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>Unlink<sp/>from<sp/>previous<sp/>in<sp/>list<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="285"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(prev_t<sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="286"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>next_timeout<sp/>=<sp/>t-&gt;next;</highlight></codeline>
<codeline lineno="287"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="288"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>prev_t-&gt;next<sp/>=<sp/>t-&gt;next;</highlight></codeline>
<codeline lineno="289"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="290"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>If<sp/>not<sp/>the<sp/>last<sp/>one,<sp/>add<sp/>time<sp/>of<sp/>this<sp/>one<sp/>back<sp/>to<sp/>next<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="291"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(t-&gt;next<sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="292"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>t-&gt;next-&gt;time<sp/>+=<sp/>t-&gt;time;</highlight></codeline>
<codeline lineno="293"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="294"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="memp_8h_1aecd94926b7c2a0e23ae195f4ae97581f" kindref="member">memp_free</ref>(MEMP_SYS_TIMEOUT,<sp/>t);</highlight></codeline>
<codeline lineno="295"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="296"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="297"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="298"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="299"><highlight class="normal">}</highlight></codeline>
<codeline lineno="300"><highlight class="normal"></highlight></codeline>
<codeline lineno="309"><highlight class="preprocessor">#if<sp/>!NO_SYS<sp/>&amp;&amp;<sp/>!defined<sp/>__DOXYGEN__</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="310"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="311"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>!NO_SYS<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="312"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="313"><highlight class="normal">sys_check_timeouts(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="314"><highlight class="normal">{</highlight></codeline>
<codeline lineno="315"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(next_timeout)<sp/>{</highlight></codeline>
<codeline lineno="316"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">sys_timeo<sp/>*tmptimeout;</highlight></codeline>
<codeline lineno="317"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="group__compiler__abstraction_1ga4c14294869aceba3ef9d4c0c302d0f33" kindref="member">u32_t</ref><sp/>diff;</highlight></codeline>
<codeline lineno="318"><highlight class="normal"><sp/><sp/><sp/><sp/>sys_timeout_handler<sp/>handler;</highlight></codeline>
<codeline lineno="319"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>*arg;</highlight></codeline>
<codeline lineno="320"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="group__compiler__abstraction_1ga4caecabca98b43919dd11be1c0d4cd8e" kindref="member">u8_t</ref><sp/>had_one;</highlight></codeline>
<codeline lineno="321"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="group__compiler__abstraction_1ga4c14294869aceba3ef9d4c0c302d0f33" kindref="member">u32_t</ref><sp/>now;</highlight></codeline>
<codeline lineno="322"><highlight class="normal"></highlight></codeline>
<codeline lineno="323"><highlight class="normal"><sp/><sp/><sp/><sp/>now<sp/>=<sp/><ref refid="group__sys__time_1ga11316ac1e77418c6fa4ab8869e3fa199" kindref="member">sys_now</ref>();</highlight></codeline>
<codeline lineno="324"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>this<sp/>cares<sp/>for<sp/>wraparounds<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="325"><highlight class="normal"><sp/><sp/><sp/><sp/>diff<sp/>=<sp/>now<sp/>-<sp/>timeouts_last_time;</highlight></codeline>
<codeline lineno="326"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">do</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="327"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="pbuf_8h_1a1f31e5e7b39e90b9b52654f543bb8fc5" kindref="member">PBUF_CHECK_FREE_OOSEQ</ref>();</highlight></codeline>
<codeline lineno="328"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>had_one<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="329"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>tmptimeout<sp/>=<sp/>next_timeout;</highlight></codeline>
<codeline lineno="330"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmptimeout<sp/>&amp;&amp;<sp/>(tmptimeout-&gt;time<sp/>&lt;=<sp/>diff))<sp/>{</highlight></codeline>
<codeline lineno="331"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>timeout<sp/>has<sp/>expired<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="332"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>had_one<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="333"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>timeouts_last_time<sp/>+=<sp/>tmptimeout-&gt;time;</highlight></codeline>
<codeline lineno="334"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>diff<sp/>-=<sp/>tmptimeout-&gt;time;</highlight></codeline>
<codeline lineno="335"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>next_timeout<sp/>=<sp/>tmptimeout-&gt;next;</highlight></codeline>
<codeline lineno="336"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>handler<sp/>=<sp/>tmptimeout-&gt;h;</highlight></codeline>
<codeline lineno="337"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>arg<sp/>=<sp/>tmptimeout-&gt;arg;</highlight></codeline>
<codeline lineno="338"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>LWIP_DEBUG_TIMERNAMES</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="339"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(handler<sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="340"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="debug_8h_1a63a04edf7ff63c951bd8706711956cdb" kindref="member">LWIP_DEBUGF</ref>(<ref refid="lwipopts_8h_1a24a6644ba9cc82665a7bf209b3870c15" kindref="member">TIMERS_DEBUG</ref>,<sp/>(</highlight><highlight class="stringliteral">&quot;sct<sp/>calling<sp/>h=%s<sp/>arg=%p\n&quot;</highlight><highlight class="normal">,</highlight></codeline>
<codeline lineno="341"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmptimeout-&gt;handler_name,<sp/>arg));</highlight></codeline>
<codeline lineno="342"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="343"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_DEBUG_TIMERNAMES<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="344"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="memp_8h_1aecd94926b7c2a0e23ae195f4ae97581f" kindref="member">memp_free</ref>(MEMP_SYS_TIMEOUT,<sp/>tmptimeout);</highlight></codeline>
<codeline lineno="345"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(handler<sp/>!=<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="346"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>!NO_SYS</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="347"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>For<sp/>LWIP_TCPIP_CORE_LOCKING,<sp/>lock<sp/>the<sp/>core<sp/>before<sp/>calling<sp/>the</highlight></codeline>
<codeline lineno="348"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>timeout<sp/>handler<sp/>function.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="349"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="tcpip_8h_1a4700525e737fc025fea4887b172e0c95" kindref="member">LOCK_TCPIP_CORE</ref>();</highlight></codeline>
<codeline lineno="350"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>!NO_SYS<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="351"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>handler(arg);</highlight></codeline>
<codeline lineno="352"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>!NO_SYS</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="353"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="tcpip_8h_1a915effea029b9c4891e1ec635eb1826d" kindref="member">UNLOCK_TCPIP_CORE</ref>();</highlight></codeline>
<codeline lineno="354"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>!NO_SYS<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="355"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="356"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="lwipopts_8h_1a8b99d75d9e0a0868567d10c8522915bb" kindref="member">LWIP_TCPIP_THREAD_ALIVE</ref>();</highlight></codeline>
<codeline lineno="357"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="358"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>repeat<sp/>until<sp/>all<sp/>expired<sp/>timers<sp/>have<sp/>been<sp/>called<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="359"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(had_one);</highlight></codeline>
<codeline lineno="360"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="361"><highlight class="normal">}</highlight></codeline>
<codeline lineno="362"><highlight class="normal"></highlight></codeline>
<codeline lineno="368"><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="369"><highlight class="normal">sys_restart_timeouts(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="370"><highlight class="normal">{</highlight></codeline>
<codeline lineno="371"><highlight class="normal"><sp/><sp/>timeouts_last_time<sp/>=<sp/><ref refid="group__sys__time_1ga11316ac1e77418c6fa4ab8869e3fa199" kindref="member">sys_now</ref>();</highlight></codeline>
<codeline lineno="372"><highlight class="normal">}</highlight></codeline>
<codeline lineno="373"><highlight class="normal"></highlight></codeline>
<codeline lineno="377"><highlight class="preprocessor">#if<sp/>!NO_SYS</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="378"><highlight class="normal"></highlight><highlight class="keyword">static</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="379"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>!NO_SYS<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="380"><highlight class="normal"><ref refid="group__compiler__abstraction_1ga4c14294869aceba3ef9d4c0c302d0f33" kindref="member">u32_t</ref></highlight></codeline>
<codeline lineno="381"><highlight class="normal">sys_timeouts_sleeptime(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="382"><highlight class="normal">{</highlight></codeline>
<codeline lineno="383"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4c14294869aceba3ef9d4c0c302d0f33" kindref="member">u32_t</ref><sp/>diff;</highlight></codeline>
<codeline lineno="384"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(next_timeout<sp/>==<sp/><ref refid="fat__string_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4" kindref="member">NULL</ref>)<sp/>{</highlight></codeline>
<codeline lineno="385"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0xffffffff;</highlight></codeline>
<codeline lineno="386"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="387"><highlight class="normal"><sp/><sp/>diff<sp/>=<sp/><ref refid="group__sys__time_1ga11316ac1e77418c6fa4ab8869e3fa199" kindref="member">sys_now</ref>()<sp/>-<sp/>timeouts_last_time;</highlight></codeline>
<codeline lineno="388"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(diff<sp/>&gt;<sp/>next_timeout-&gt;time)<sp/>{</highlight></codeline>
<codeline lineno="389"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>0;</highlight></codeline>
<codeline lineno="390"><highlight class="normal"><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
<codeline lineno="391"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>next_timeout-&gt;time<sp/>-<sp/>diff;</highlight></codeline>
<codeline lineno="392"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="393"><highlight class="normal">}</highlight></codeline>
<codeline lineno="394"><highlight class="normal"></highlight></codeline>
<codeline lineno="395"><highlight class="normal"></highlight><highlight class="preprocessor">#if<sp/>!NO_SYS</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="396"><highlight class="normal"></highlight></codeline>
<codeline lineno="404"><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="405"><highlight class="normal">sys_timeouts_mbox_fetch(<ref refid="structsys__mbox" kindref="compound">sys_mbox_t</ref><sp/>*mbox,<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>**msg)</highlight></codeline>
<codeline lineno="406"><highlight class="normal">{</highlight></codeline>
<codeline lineno="407"><highlight class="normal"><sp/><sp/><ref refid="group__compiler__abstraction_1ga4c14294869aceba3ef9d4c0c302d0f33" kindref="member">u32_t</ref><sp/>sleeptime;</highlight></codeline>
<codeline lineno="408"><highlight class="normal"></highlight></codeline>
<codeline lineno="409"><highlight class="normal">again:</highlight></codeline>
<codeline lineno="410"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!next_timeout)<sp/>{</highlight></codeline>
<codeline lineno="411"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="group__sys__mbox_1gacc53b5c30f131abc40f0885d39d32f87" kindref="member">sys_arch_mbox_fetch</ref>(mbox,<sp/>msg,<sp/>0);</highlight></codeline>
<codeline lineno="412"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="413"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="414"><highlight class="normal"></highlight></codeline>
<codeline lineno="415"><highlight class="normal"><sp/><sp/>sleeptime<sp/>=<sp/>sys_timeouts_sleeptime();</highlight></codeline>
<codeline lineno="416"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sleeptime<sp/>==<sp/>0<sp/>||<sp/><ref refid="group__sys__mbox_1gacc53b5c30f131abc40f0885d39d32f87" kindref="member">sys_arch_mbox_fetch</ref>(mbox,<sp/>msg,<sp/>sleeptime)<sp/>==<sp/><ref refid="sys_8h_1ac1495030a8ab5e1f3c89e42ced527c5b" kindref="member">SYS_ARCH_TIMEOUT</ref>)<sp/>{</highlight></codeline>
<codeline lineno="417"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>If<sp/>a<sp/>SYS_ARCH_TIMEOUT<sp/>value<sp/>is<sp/>returned,<sp/>a<sp/>timeout<sp/>occurred</highlight></codeline>
<codeline lineno="418"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>before<sp/>a<sp/>message<sp/>could<sp/>be<sp/>fetched.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="419"><highlight class="normal"><sp/><sp/><sp/><sp/>sys_check_timeouts();</highlight></codeline>
<codeline lineno="420"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*<sp/>We<sp/>try<sp/>again<sp/>to<sp/>fetch<sp/>a<sp/>message<sp/>from<sp/>the<sp/>mbox.<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="421"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>again;</highlight></codeline>
<codeline lineno="422"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="423"><highlight class="normal">}</highlight></codeline>
<codeline lineno="424"><highlight class="normal"></highlight></codeline>
<codeline lineno="425"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>NO_SYS<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="426"><highlight class="normal"></highlight></codeline>
<codeline lineno="427"><highlight class="normal"></highlight><highlight class="preprocessor">#else<sp/></highlight><highlight class="comment">/*<sp/>LWIP_TIMERS<sp/>&amp;&amp;<sp/>!LWIP_TIMERS_CUSTOM<sp/>*/</highlight><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="428"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Satisfy<sp/>the<sp/>TCP<sp/>code<sp/>which<sp/>calls<sp/>this<sp/>function<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="429"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="430" refid="timeouts_8c_1a8181bc316fdf61b85f787c5cadfcd249" refkind="member"><highlight class="normal"><ref refid="timeouts_8c_1a8181bc316fdf61b85f787c5cadfcd249" kindref="member">tcp_timer_needed</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="431"><highlight class="normal">{</highlight></codeline>
<codeline lineno="432"><highlight class="normal">}</highlight></codeline>
<codeline lineno="433"><highlight class="normal"></highlight><highlight class="preprocessor">#endif<sp/></highlight><highlight class="comment">/*<sp/>LWIP_TIMERS<sp/>&amp;&amp;<sp/>!LWIP_TIMERS_CUSTOM<sp/>*/</highlight><highlight class="preprocessor"></highlight></codeline>
    </programlisting>
    <location file="C:/Dev/git/UbixOS/sys/net/core/timeouts.c"/>
  </compounddef>
</doxygen>
