\hypertarget{dcons__os_8c_source}{}\doxysection{dcons\+\_\+os.\+c}
\label{dcons__os_8c_source}\index{dev/dcons/dcons\_os.c@{dev/dcons/dcons\_os.c}}
\mbox{\hyperlink{dcons__os_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/4-\/Clause}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (C) 2003,2004}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00005}00005 \textcolor{comment}{ *      Hidetoshi Shimokawa. All rights reserved.}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00012}00012 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00013}00013 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00014}00014 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00015}00015 \textcolor{comment}{ * 3. All advertising materials mentioning features or use of this software}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00016}00016 \textcolor{comment}{ *    must display the following acknowledgement:}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00017}00017 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00018}00018 \textcolor{comment}{ *      This product includes software developed by Hidetoshi Shimokawa.}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00019}00019 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00020}00020 \textcolor{comment}{ * 4. Neither the name of the author nor the names of its contributors}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00021}00021 \textcolor{comment}{ *    may be used to endorse or promote products derived from this software}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00022}00022 \textcolor{comment}{ *    without specific prior written permission.}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00023}00023 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00024}00024 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00025}00025 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00026}00026 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00027}00027 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00028}00028 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00029}00029 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00030}00030 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00031}00031 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00032}00032 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00033}00033 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00034}00034 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00035}00035 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00036}00036 \textcolor{comment}{ * \$FreeBSD\$}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00037}00037 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00038}00038 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/eventhandler.h>}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/kdb.h>}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <gdb/gdb.h>}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <sys/types.h>}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00047}00047 \textcolor{preprocessor}{\#include <sys/conf.h>}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <sys/cons.h>}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00049}00049 \textcolor{preprocessor}{\#include <sys/consio.h>}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00050}00050 \textcolor{preprocessor}{\#include <sys/tty.h>}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00051}00051 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00052}00052 \textcolor{preprocessor}{\#include <sys/priv.h>}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00053}00053 \textcolor{preprocessor}{\#include <sys/proc.h>}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00054}00054 \textcolor{preprocessor}{\#include <sys/ucred.h>}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00055}00055 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00056}00056 \textcolor{preprocessor}{\#include <machine/atomic.h>}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00057}00057 \textcolor{preprocessor}{\#include <machine/bus.h>}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00058}00058 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00059}00059 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{dcons_8h}{dev/dcons/dcons.h}}>}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00060}00060 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{dcons__os_8h}{dev/dcons/dcons\_os.h}}>}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00061}00061 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00062}00062 \textcolor{preprocessor}{\#include <ddb/ddb.h>}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00063}00063 \textcolor{preprocessor}{\#include <sys/reboot.h>}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00064}00064 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00065}00065 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00066}00066 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00067}00067 \textcolor{preprocessor}{\#include <vm/vm.h>}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00068}00068 \textcolor{preprocessor}{\#include <vm/vm\_param.h>}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00069}00069 \textcolor{preprocessor}{\#include <vm/pmap.h>}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00070}00070 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00071}00071 \textcolor{preprocessor}{\#include "{}opt\_dcons.h"{}}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00072}00072 \textcolor{preprocessor}{\#include "{}opt\_kdb.h"{}}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00073}00073 \textcolor{preprocessor}{\#include "{}opt\_gdb.h"{}}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00074}00074 \textcolor{preprocessor}{\#include "{}opt\_ddb.h"{}}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00075}00075 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00076}00076 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00077}00077 \textcolor{preprocessor}{\#ifndef DCONS\_POLL\_HZ}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00078}\mbox{\hyperlink{dcons__os_8c_ada557d505478b2c680bd5bb5ac575da2}{00078}} \textcolor{preprocessor}{\#define DCONS\_POLL\_HZ   25}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00079}00079 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00080}00080 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00081}00081 \textcolor{preprocessor}{\#ifndef DCONS\_POLL\_IDLE}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00082}\mbox{\hyperlink{dcons__os_8c_a0aaa09292dca8094a0242df24573144d}{00082}} \textcolor{preprocessor}{\#define DCONS\_POLL\_IDLE 256}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00083}00083 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00084}00084 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00085}00085 \textcolor{preprocessor}{\#ifndef DCONS\_BUF\_SIZE}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00086}\mbox{\hyperlink{dcons__os_8c_a95d1f28c048a7547d3f84b682f8614e7}{00086}} \textcolor{preprocessor}{\#define DCONS\_BUF\_SIZE (16*1024)}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00087}00087 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00088}00088 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00089}00089 \textcolor{preprocessor}{\#ifndef DCONS\_FORCE\_CONSOLE}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00090}\mbox{\hyperlink{dcons__os_8c_aa1b8ce62b380d12694000bcf250ea42e}{00090}} \textcolor{preprocessor}{\#define DCONS\_FORCE\_CONSOLE     0       }\textcolor{comment}{/* Mostly for FreeBSD-\/4/DragonFly */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00091}00091 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00092}00092 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00093}00093 \textcolor{preprocessor}{\#ifndef KLD\_MODULE}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00094}\mbox{\hyperlink{dcons__os_8c_a6cf87096608a28c1fefaa17a8f60a597}{00094}} \textcolor{keyword}{static} \textcolor{keywordtype}{char} \mbox{\hyperlink{dcons__os_8c_a6cf87096608a28c1fefaa17a8f60a597}{bssbuf}}[\mbox{\hyperlink{dcons__os_8c_a95d1f28c048a7547d3f84b682f8614e7}{DCONS\_BUF\_SIZE}}]; \textcolor{comment}{/* buf in bss */}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00095}00095 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00096}00096 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00097}00097 \textcolor{comment}{/* global data */}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00098}\mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{00098}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structdcons__global}{dcons\_global}} \mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}};}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00099}\mbox{\hyperlink{dcons__os_8c_a897a14cb0556aed8496ae213143a60a8}{00099}} \textcolor{keyword}{struct }\mbox{\hyperlink{structdcons__global}{dcons\_global}} *\mbox{\hyperlink{dcons__os_8c_a897a14cb0556aed8496ae213143a60a8}{dcons\_conf}};}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00100}\mbox{\hyperlink{dcons__os_8c_af4f5fb4f3d82c9f9c2de4f7cb5d23f97}{00100}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{dcons__os_8c_af4f5fb4f3d82c9f9c2de4f7cb5d23f97}{poll\_hz}} = \mbox{\hyperlink{dcons__os_8c_ada557d505478b2c680bd5bb5ac575da2}{DCONS\_POLL\_HZ}};}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00101}\mbox{\hyperlink{dcons__os_8c_aff6026ec3e4b2f6e78d8ced970cff39d}{00101}} \textcolor{keyword}{static} u\_int \mbox{\hyperlink{dcons__os_8c_aff6026ec3e4b2f6e78d8ced970cff39d}{poll\_idle}} = \mbox{\hyperlink{dcons__os_8c_ada557d505478b2c680bd5bb5ac575da2}{DCONS\_POLL\_HZ}} * \mbox{\hyperlink{dcons__os_8c_a0aaa09292dca8094a0242df24573144d}{DCONS\_POLL\_IDLE}};}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00102}00102 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00103}\mbox{\hyperlink{dcons__os_8c_a5a590b7fdaec64c0058dee6fe432c353}{00103}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structdcons__softc}{dcons\_softc}} \mbox{\hyperlink{dcons__os_8c_a5a590b7fdaec64c0058dee6fe432c353}{sc}}[\mbox{\hyperlink{dcons_8h_ae40d463ff573efc56d59e1e610c10b62}{DCONS\_NPORT}}];}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00104}00104 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00105}\mbox{\hyperlink{dcons__os_8c_a288a2a7c4c26bd87b45fc1b660eea21d}{00105}} \textcolor{keyword}{static} \mbox{\hyperlink{dcons__os_8c_a288a2a7c4c26bd87b45fc1b660eea21d}{SYSCTL\_NODE}}(\_kern, OID\_AUTO, dcons, CTLFLAG\_RD | CTLFLAG\_MPSAFE, 0,}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00106}00106     \textcolor{stringliteral}{"{}Dumb Console"{}});}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00107}\mbox{\hyperlink{dcons__os_8c_ac8d5a587fae22991b16c2b23dc01f09d}{00107}} \mbox{\hyperlink{dcons__os_8c_ac8d5a587fae22991b16c2b23dc01f09d}{SYSCTL\_INT}}(\_kern\_dcons, OID\_AUTO, \mbox{\hyperlink{dcons__os_8c_af4f5fb4f3d82c9f9c2de4f7cb5d23f97}{poll\_hz}}, CTLFLAG\_RW, \&\mbox{\hyperlink{dcons__os_8c_af4f5fb4f3d82c9f9c2de4f7cb5d23f97}{poll\_hz}}, 0,}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00108}00108                                 \textcolor{stringliteral}{"{}dcons polling rate"{}});}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00109}00109 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00110}\mbox{\hyperlink{dcons__os_8c_ad890015902edc99d46af31972a549e25}{00110}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{dcons__os_8c_ad890015902edc99d46af31972a549e25}{drv\_init}} = 0;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00111}\mbox{\hyperlink{dcons__os_8c_a3d01952e184de55b094f5e5bb9d76fea}{00111}} \textcolor{keyword}{static} \textcolor{keyword}{struct }callout \mbox{\hyperlink{dcons__os_8c_a3d01952e184de55b094f5e5bb9d76fea}{dcons\_callout}};}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00112}\mbox{\hyperlink{dcons__os_8c_a183ff1e36d2f8d07ef1eff4cc8fe9bd8}{00112}} \textcolor{keyword}{struct }\mbox{\hyperlink{structdcons__buf}{dcons\_buf}} *\mbox{\hyperlink{dcons__os_8c_a183ff1e36d2f8d07ef1eff4cc8fe9bd8}{dcons\_buf}};          \textcolor{comment}{/* for local dconschat */}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00113}00113 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00114}00114 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{dcons__os_8c_a0e6db888f379b881dbdcd5da3dedfbad}{dcons\_timeout}}(\textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00115}00115 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{dcons__os_8c_a40998869934cedc6837c0253f41750d8}{dcons\_drv\_init}}(\textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00116}00116 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00117}\mbox{\hyperlink{dcons__os_8c_aca1d0d214e15fbeec56867aa5482b8db}{00117}} \textcolor{keyword}{static} cn\_probe\_t       \mbox{\hyperlink{dcons__os_8c_aca1d0d214e15fbeec56867aa5482b8db}{dcons\_cnprobe}};}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00118}\mbox{\hyperlink{dcons__os_8c_af5f48e938fe22dd13b8cacdabbb4021c}{00118}} \textcolor{keyword}{static} cn\_init\_t        \mbox{\hyperlink{dcons__os_8c_af5f48e938fe22dd13b8cacdabbb4021c}{dcons\_cninit}};}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00119}\mbox{\hyperlink{dcons__os_8c_a45de56cfa9414551382fd822b2c6d4ad}{00119}} \textcolor{keyword}{static} cn\_term\_t        \mbox{\hyperlink{dcons__os_8c_a45de56cfa9414551382fd822b2c6d4ad}{dcons\_cnterm}};}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00120}\mbox{\hyperlink{dcons__os_8c_a9460e4183de7254f3b5e8a22600c4c8b}{00120}} \textcolor{keyword}{static} cn\_getc\_t        \mbox{\hyperlink{dcons__os_8c_a9460e4183de7254f3b5e8a22600c4c8b}{dcons\_cngetc}};}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00121}\mbox{\hyperlink{dcons__os_8c_a2aac83d328c17cd9828a307f681bd01d}{00121}} \textcolor{keyword}{static} cn\_putc\_t        \mbox{\hyperlink{dcons__os_8c_a2aac83d328c17cd9828a307f681bd01d}{dcons\_cnputc}};}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00122}\mbox{\hyperlink{dcons__os_8c_a523dac01da0f8da8171f4216a9ed780e}{00122}} \textcolor{keyword}{static} cn\_grab\_t        \mbox{\hyperlink{dcons__os_8c_a523dac01da0f8da8171f4216a9ed780e}{dcons\_cngrab}};}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00123}\mbox{\hyperlink{dcons__os_8c_ab424f2a6014da91f36ab2e59160b1a1d}{00123}} \textcolor{keyword}{static} cn\_ungrab\_t      \mbox{\hyperlink{dcons__os_8c_ab424f2a6014da91f36ab2e59160b1a1d}{dcons\_cnungrab}};}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00124}00124 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00125}\mbox{\hyperlink{dcons__os_8c_a6a9f83949a2972acf958e1d73295ab7e}{00125}} \mbox{\hyperlink{dcons__os_8c_a6a9f83949a2972acf958e1d73295ab7e}{CONSOLE\_DRIVER}}(dcons);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00126}00126 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00127}00127 \textcolor{preprocessor}{\#if defined(GDB)}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00128}00128 \textcolor{keyword}{static} gdb\_probe\_f      dcons\_dbg\_probe;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00129}00129 \textcolor{keyword}{static} gdb\_init\_f       dcons\_dbg\_init;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00130}00130 \textcolor{keyword}{static} gdb\_term\_f       dcons\_dbg\_term;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00131}00131 \textcolor{keyword}{static} gdb\_getc\_f       dcons\_dbg\_getc;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00132}00132 \textcolor{keyword}{static} gdb\_putc\_f       dcons\_dbg\_putc;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00133}00133 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00134}00134 GDB\_DBGPORT(dcons, dcons\_dbg\_probe, dcons\_dbg\_init, dcons\_dbg\_term,}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00135}00135     dcons\_dbg\_getc, dcons\_dbg\_putc);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00136}00136 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00137}00137 \textcolor{keyword}{extern} \textcolor{keyword}{struct }gdb\_dbgport *gdb\_cur;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00138}00138 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00139}00139 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00140}\mbox{\hyperlink{dcons__os_8c_a3ec078bbca94986586c56550ee49a8c1}{00140}} \textcolor{keyword}{static} tsw\_outwakeup\_t \mbox{\hyperlink{dcons__os_8c_a3ec078bbca94986586c56550ee49a8c1}{dcons\_outwakeup}};}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00141}\mbox{\hyperlink{dcons__os_8c_a7a60f80af6b2d70b919c31a806448908}{00141}} \textcolor{keyword}{static} tsw\_free\_t      \mbox{\hyperlink{dcons__os_8c_a7a60f80af6b2d70b919c31a806448908}{dcons\_free}};}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00142}00142 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00143}\mbox{\hyperlink{dcons__os_8c_a618434d9f4ddc549e770c01c32d911ea}{00143}} \textcolor{keyword}{static} \textcolor{keyword}{struct }ttydevsw \mbox{\hyperlink{dcons__os_8c_a618434d9f4ddc549e770c01c32d911ea}{dcons\_ttydevsw}} = \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00144}00144         .tsw\_flags      = TF\_NOPREFIX,}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00145}00145         .tsw\_outwakeup  = \mbox{\hyperlink{dcons__os_8c_a3ec078bbca94986586c56550ee49a8c1}{dcons\_outwakeup}},}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00146}00146         .tsw\_free       = \mbox{\hyperlink{dcons__os_8c_a7a60f80af6b2d70b919c31a806448908}{dcons\_free}},}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00147}00147 \};}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00148}00148 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00149}\mbox{\hyperlink{dcons__os_8c_a5125e6637a25b391cba95d654cc8655f}{00149}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{dcons__os_8c_a5125e6637a25b391cba95d654cc8655f}{dcons\_close\_refs}};}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00150}00150 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00151}00151 \textcolor{preprocessor}{\#if (defined(GDB) || defined(DDB))}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00152}00152 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00153}00153 \mbox{\hyperlink{dcons__os_8c_ad17b9a0e10819628360b4dffd834e635}{dcons\_check\_break}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdcons__softc}{dcons\_softc}} *dc, \textcolor{keywordtype}{int} c)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00154}00154 \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00155}00155 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00156}00156         \textcolor{keywordflow}{if} (c < 0)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00157}00157                 \textcolor{keywordflow}{return} (c);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00158}00158 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00159}00159 \textcolor{preprocessor}{\#ifdef GDB}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00160}00160         \textcolor{keywordflow}{if} ((dc-\/>\mbox{\hyperlink{structdcons__softc_a66b1d0789d704e7b854840bc2530b450}{flags}} \& \mbox{\hyperlink{dcons_8h_a2e55c631f1881c02478fe92344f1929f}{DC\_GDB}}) != 0 \&\& gdb\_cur == \&dcons\_gdb\_dbgport)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00161}00161                 kdb\_alt\_break\_gdb(c, \&dc-\/>\mbox{\hyperlink{structdcons__softc_ae8e1315084d152150dc9dd76ca07d3ec}{brk\_state}});}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00162}00162         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00163}00163 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00164}00164                 kdb\_alt\_break(c, \&dc-\/>\mbox{\hyperlink{structdcons__softc_ae8e1315084d152150dc9dd76ca07d3ec}{brk\_state}});}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00165}00165 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00166}00166         \textcolor{keywordflow}{return} (c);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00167}00167 \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00168}00168 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00169}\mbox{\hyperlink{dcons__os_8c_ad17b9a0e10819628360b4dffd834e635}{00169}} \textcolor{preprocessor}{\#define dcons\_check\_break(dc, c)        (c)}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00170}00170 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00171}00171 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00172}00172 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00173}\mbox{\hyperlink{dcons__os_8c_aabe42b7de4f2635c1e4f87e97b4b48d9}{00173}} \mbox{\hyperlink{dcons__os_8c_aabe42b7de4f2635c1e4f87e97b4b48d9}{dcons\_os\_checkc\_nopoll}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdcons__softc}{dcons\_softc}} *dc)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00174}00174 \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00175}00175         \textcolor{keywordtype}{int} c;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00176}00176 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00177}00177         \textcolor{keywordflow}{if} (\mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a3e61331285b8ea94ffb30b59858a7bfa}{dma\_tag}} != NULL)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00178}00178                 bus\_dmamap\_sync(\mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a3e61331285b8ea94ffb30b59858a7bfa}{dma\_tag}}, \mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a7f26f97ea2842ab06b0258d619505120}{dma\_map}}, BUS\_DMASYNC\_POSTREAD);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00179}00179 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00180}00180         c = \mbox{\hyperlink{dcons__os_8c_ad17b9a0e10819628360b4dffd834e635}{dcons\_check\_break}}(dc, \mbox{\hyperlink{dcons_8c_aff3d1cbb424429abe54586ed4faf4131}{dcons\_checkc}}(dc));}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00181}00181 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00182}00182         \textcolor{keywordflow}{if} (\mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a3e61331285b8ea94ffb30b59858a7bfa}{dma\_tag}} != NULL)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00183}00183                 bus\_dmamap\_sync(\mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a3e61331285b8ea94ffb30b59858a7bfa}{dma\_tag}}, \mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a7f26f97ea2842ab06b0258d619505120}{dma\_map}}, BUS\_DMASYNC\_PREREAD);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00184}00184 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00185}00185         \textcolor{keywordflow}{return} (c);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00186}00186 \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00187}00187 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00188}00188 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00189}\mbox{\hyperlink{dcons__os_8c_af388af4902ce50ddf9ebb40a98d9ab22}{00189}} \mbox{\hyperlink{dcons__os_8c_af388af4902ce50ddf9ebb40a98d9ab22}{dcons\_os\_checkc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdcons__softc}{dcons\_softc}} *dc)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00190}00190 \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00191}00191         EVENTHANDLER\_INVOKE(dcons\_poll, 0);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00192}00192         \textcolor{keywordflow}{return} (\mbox{\hyperlink{dcons__os_8c_aabe42b7de4f2635c1e4f87e97b4b48d9}{dcons\_os\_checkc\_nopoll}}(dc));}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00193}00193 \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00194}00194 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00195}00195 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00196}\mbox{\hyperlink{dcons__os_8c_ac593c30aa91990e25837dd617c264948}{00196}} \mbox{\hyperlink{dcons__os_8c_ac593c30aa91990e25837dd617c264948}{dcons\_os\_putc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdcons__softc}{dcons\_softc}} *dc, \textcolor{keywordtype}{int} c)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00197}00197 \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00198}00198         \textcolor{keywordflow}{if} (\mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a3e61331285b8ea94ffb30b59858a7bfa}{dma\_tag}} != NULL)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00199}00199                 bus\_dmamap\_sync(\mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a3e61331285b8ea94ffb30b59858a7bfa}{dma\_tag}}, \mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a7f26f97ea2842ab06b0258d619505120}{dma\_map}}, BUS\_DMASYNC\_POSTWRITE);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00200}00200 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00201}00201         \mbox{\hyperlink{dcons_8c_ab657ee15e2e3202026deb3a730bb5bb4}{dcons\_putc}}(dc, c);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00202}00202 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00203}00203         \textcolor{keywordflow}{if} (\mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a3e61331285b8ea94ffb30b59858a7bfa}{dma\_tag}} != NULL)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00204}00204                 bus\_dmamap\_sync(\mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a3e61331285b8ea94ffb30b59858a7bfa}{dma\_tag}}, \mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a7f26f97ea2842ab06b0258d619505120}{dma\_map}}, BUS\_DMASYNC\_PREWRITE);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00205}00205 \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00206}00206 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00207}00207 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00208}\mbox{\hyperlink{dcons__os_8c_ae3eb16efe295250d9dc3450e37d019f9}{00208}} \mbox{\hyperlink{dcons__os_8c_a7a60f80af6b2d70b919c31a806448908}{dcons\_free}}(\textcolor{keywordtype}{void} *xsc \_\_unused)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00209}00209 \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00210}00210 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00211}00211         \textcolor{comment}{/* Our deferred free has arrived, now we're waiting for one fewer. */}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00212}00212         atomic\_subtract\_rel\_int(\&\mbox{\hyperlink{dcons__os_8c_a5125e6637a25b391cba95d654cc8655f}{dcons\_close\_refs}}, 1);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00213}00213 \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00214}00214 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00215}00215 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00216}\mbox{\hyperlink{dcons__os_8c_a3ad2a1e0a0b55dabd9b38dc0596379f7}{00216}} \mbox{\hyperlink{dcons__os_8c_a3ec078bbca94986586c56550ee49a8c1}{dcons\_outwakeup}}(\textcolor{keyword}{struct} tty *tp)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00217}00217 \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00218}00218         \textcolor{keyword}{struct }\mbox{\hyperlink{structdcons__softc}{dcons\_softc}} *dc;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00219}00219         \textcolor{keywordtype}{char} ch;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00220}00220 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00221}00221         dc = tty\_softc(tp);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00222}00222 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00223}00223         \textcolor{keywordflow}{while} (ttydisc\_getc(tp, \&ch, \textcolor{keyword}{sizeof} ch) != 0)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00224}00224                 \mbox{\hyperlink{dcons__os_8c_ac593c30aa91990e25837dd617c264948}{dcons\_os\_putc}}(dc, ch);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00225}00225 \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00226}00226 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00227}00227 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00228}\mbox{\hyperlink{dcons__os_8c_a0e6db888f379b881dbdcd5da3dedfbad}{00228}} \mbox{\hyperlink{dcons__os_8c_a0e6db888f379b881dbdcd5da3dedfbad}{dcons\_timeout}}(\textcolor{keywordtype}{void} *v)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00229}00229 \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00230}00230         \textcolor{keyword}{struct  }tty *tp;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00231}00231         \textcolor{keyword}{struct }\mbox{\hyperlink{structdcons__softc}{dcons\_softc}} *dc;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00232}00232         \textcolor{keywordtype}{int} \mbox{\hyperlink{structdcons__softc_a8d67951d8816f76671e7058a65ada80f}{i}}, c, polltime;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00233}00233 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00234}00234         \textcolor{keywordflow}{for} (\mbox{\hyperlink{structdcons__softc_a8d67951d8816f76671e7058a65ada80f}{i}} = 0; \mbox{\hyperlink{structdcons__softc_a8d67951d8816f76671e7058a65ada80f}{i}} < \mbox{\hyperlink{dcons_8h_ae40d463ff573efc56d59e1e610c10b62}{DCONS\_NPORT}}; \mbox{\hyperlink{structdcons__softc_a8d67951d8816f76671e7058a65ada80f}{i}} ++) \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00235}00235                 dc = \&\mbox{\hyperlink{dcons__os_8c_a5a590b7fdaec64c0058dee6fe432c353}{sc}}[\mbox{\hyperlink{structdcons__softc_a8d67951d8816f76671e7058a65ada80f}{i}}];}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00236}00236                 tp = dc-\/>\mbox{\hyperlink{structdcons__softc_a565281dd8d4d13efbfcf970dc7098b87}{tty}};}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00237}00237 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00238}00238                 tty\_lock(tp);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00239}00239                 \textcolor{keywordflow}{while} ((c = \mbox{\hyperlink{dcons__os_8c_aabe42b7de4f2635c1e4f87e97b4b48d9}{dcons\_os\_checkc\_nopoll}}(dc)) != -\/1) \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00240}00240                         ttydisc\_rint(tp, c, 0);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00241}00241                         \mbox{\hyperlink{dcons__os_8c_aff6026ec3e4b2f6e78d8ced970cff39d}{poll\_idle}} = 0;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00242}00242                 \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00243}00243                 ttydisc\_rint\_done(tp);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00244}00244                 tty\_unlock(tp);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00245}00245         \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00246}00246         \mbox{\hyperlink{dcons__os_8c_aff6026ec3e4b2f6e78d8ced970cff39d}{poll\_idle}}++;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00247}00247         polltime = hz;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00248}00248         \textcolor{keywordflow}{if} (\mbox{\hyperlink{dcons__os_8c_aff6026ec3e4b2f6e78d8ced970cff39d}{poll\_idle}} <= (\mbox{\hyperlink{dcons__os_8c_af4f5fb4f3d82c9f9c2de4f7cb5d23f97}{poll\_hz}} * \mbox{\hyperlink{dcons__os_8c_a0aaa09292dca8094a0242df24573144d}{DCONS\_POLL\_IDLE}}))}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00249}00249                 polltime /= \mbox{\hyperlink{dcons__os_8c_af4f5fb4f3d82c9f9c2de4f7cb5d23f97}{poll\_hz}};}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00250}00250         callout\_reset(\&\mbox{\hyperlink{dcons__os_8c_a3d01952e184de55b094f5e5bb9d76fea}{dcons\_callout}}, polltime, \mbox{\hyperlink{dcons__os_8c_a0e6db888f379b881dbdcd5da3dedfbad}{dcons\_timeout}}, tp);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00251}00251 \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00252}00252 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00253}00253 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00254}\mbox{\hyperlink{dcons__os_8c_ad67c8b234d2d30e264a95e639cd26396}{00254}} \mbox{\hyperlink{dcons__os_8c_aca1d0d214e15fbeec56867aa5482b8db}{dcons\_cnprobe}}(\textcolor{keyword}{struct} consdev *cp)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00255}00255 \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00256}00256         sprintf(cp-\/>cn\_name, \textcolor{stringliteral}{"{}dcons"{}});}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00257}00257 \textcolor{preprocessor}{\#if DCONS\_FORCE\_CONSOLE}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00258}00258         cp-\/>cn\_pri = CN\_REMOTE;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00259}00259 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00260}00260         cp-\/>cn\_pri = CN\_NORMAL;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00261}00261 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00262}00262 \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00263}00263 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00264}00264 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00265}\mbox{\hyperlink{dcons__os_8c_aed68211f2d635f445066735ca039e851}{00265}} \mbox{\hyperlink{dcons__os_8c_af5f48e938fe22dd13b8cacdabbb4021c}{dcons\_cninit}}(\textcolor{keyword}{struct} consdev *cp)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00266}00266 \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00267}00267         \mbox{\hyperlink{dcons__os_8c_a40998869934cedc6837c0253f41750d8}{dcons\_drv\_init}}(0);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00268}00268         cp-\/>cn\_arg = (\textcolor{keywordtype}{void} *)\&\mbox{\hyperlink{dcons__os_8c_a5a590b7fdaec64c0058dee6fe432c353}{sc}}[\mbox{\hyperlink{dcons_8h_ad694d2d07c81ada11b624df31d84c77c}{DCONS\_CON}}]; \textcolor{comment}{/* share port0 with unit0 */}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00269}00269 \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00270}00270 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00271}00271 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00272}\mbox{\hyperlink{dcons__os_8c_a1a17ed0abbab0c7088b90936fa330f9d}{00272}} \mbox{\hyperlink{dcons__os_8c_a45de56cfa9414551382fd822b2c6d4ad}{dcons\_cnterm}}(\textcolor{keyword}{struct} consdev *cp)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00273}00273 \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00274}00274 \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00275}00275 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00276}00276 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00277}\mbox{\hyperlink{dcons__os_8c_a1b06088df407a7b77bb9aad5dcd17dd2}{00277}} \mbox{\hyperlink{dcons__os_8c_a523dac01da0f8da8171f4216a9ed780e}{dcons\_cngrab}}(\textcolor{keyword}{struct} consdev *cp)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00278}00278 \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00279}00279 \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00280}00280 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00281}00281 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00282}\mbox{\hyperlink{dcons__os_8c_a42cdfe2001c11a367553bab1536b9b42}{00282}} \mbox{\hyperlink{dcons__os_8c_ab424f2a6014da91f36ab2e59160b1a1d}{dcons\_cnungrab}}(\textcolor{keyword}{struct} consdev *cp)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00283}00283 \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00284}00284 \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00285}00285 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00286}00286 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00287}\mbox{\hyperlink{dcons__os_8c_a259c386902d478e6b114b9a519e98c8a}{00287}} \mbox{\hyperlink{dcons__os_8c_a9460e4183de7254f3b5e8a22600c4c8b}{dcons\_cngetc}}(\textcolor{keyword}{struct} consdev *cp)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00288}00288 \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00289}00289         \textcolor{keyword}{struct }\mbox{\hyperlink{structdcons__softc}{dcons\_softc}} *dc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structdcons__softc}{dcons\_softc}} *)cp-\/>cn\_arg;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00290}00290         return (\mbox{\hyperlink{dcons__os_8c_af388af4902ce50ddf9ebb40a98d9ab22}{dcons\_os\_checkc}}(dc));}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00291}00291 \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00292}00292 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00293}00293 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00294}\mbox{\hyperlink{dcons__os_8c_a62f8a963383d3a39c8b7d453eb48d795}{00294}} \mbox{\hyperlink{dcons__os_8c_a2aac83d328c17cd9828a307f681bd01d}{dcons\_cnputc}}(\textcolor{keyword}{struct} consdev *cp, \textcolor{keywordtype}{int} c)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00295}00295 \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00296}00296         \textcolor{keyword}{struct }\mbox{\hyperlink{structdcons__softc}{dcons\_softc}} *dc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structdcons__softc}{dcons\_softc}} *)cp-\/>cn\_arg;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00297}00297         \mbox{\hyperlink{dcons__os_8c_ac593c30aa91990e25837dd617c264948}{dcons\_os\_putc}}(dc, c);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00298}00298 \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00299}00299 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00300}00300 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00301}\mbox{\hyperlink{dcons__os_8c_a40998869934cedc6837c0253f41750d8}{00301}} \mbox{\hyperlink{dcons__os_8c_a40998869934cedc6837c0253f41750d8}{dcons\_drv\_init}}(\textcolor{keywordtype}{int} stage)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00302}00302 \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00303}00303 \textcolor{preprocessor}{\#if defined(\_\_i386\_\_) || defined(\_\_amd64\_\_)}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00304}00304         quad\_t addr, size;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00305}00305 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00306}00306 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00307}00307         \textcolor{keywordflow}{if} (\mbox{\hyperlink{dcons__os_8c_ad890015902edc99d46af31972a549e25}{drv\_init}})}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00308}00308                 \textcolor{keywordflow}{return}(\mbox{\hyperlink{dcons__os_8c_ad890015902edc99d46af31972a549e25}{drv\_init}});}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00309}00309 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00310}00310         \mbox{\hyperlink{dcons__os_8c_ad890015902edc99d46af31972a549e25}{drv\_init}} = -\/1;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00311}00311 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00312}00312         bzero(\&\mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}));}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00313}00313         \mbox{\hyperlink{dcons__os_8c_a897a14cb0556aed8496ae213143a60a8}{dcons\_conf}} = \&\mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}};}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00314}00314         \mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_aa932a95018b6fffb959498f25a026df0}{cdev}} = \&dcons\_consdev;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00315}00315         \mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a548e874900b2e711decf9f21114be4d9}{buf}} = NULL;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00316}00316         \mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a67353b5ebd16d745ffb4360fa17f206b}{size}} = \mbox{\hyperlink{dcons__os_8c_a95d1f28c048a7547d3f84b682f8614e7}{DCONS\_BUF\_SIZE}};}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00317}00317 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00318}00318 \textcolor{preprocessor}{\#if defined(\_\_i386\_\_) || defined(\_\_amd64\_\_)}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00319}00319         \textcolor{keywordflow}{if} (getenv\_quad(\textcolor{stringliteral}{"{}dcons.addr"{}}, \&addr) > 0 \&\&}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00320}00320             getenv\_quad(\textcolor{stringliteral}{"{}dcons.size"{}}, \&size) > 0) \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00321}00321 \textcolor{preprocessor}{\#ifdef \_\_i386\_\_}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00322}00322                 vm\_paddr\_t pa;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00323}00323                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00324}00324 \textcolor{comment}{                 * Allow read/write access to dcons buffer.}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00325}00325 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00326}00326                 \textcolor{keywordflow}{for} (pa = trunc\_page(addr); pa < addr + size; pa += PAGE\_SIZE)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00327}00327                         pmap\_ksetrw(PMAP\_MAP\_LOW + pa);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00328}00328                 invltlb();}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00329}00329 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00330}00330                 \textcolor{comment}{/* XXX P to V */}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00331}00331 \textcolor{preprocessor}{\#ifdef \_\_amd64\_\_}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00332}00332                 \mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a548e874900b2e711decf9f21114be4d9}{buf}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structdcons__buf}{dcons\_buf}} *)(vm\_offset\_t)(KERNBASE + addr);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00333}00333 \textcolor{preprocessor}{\#else }\textcolor{comment}{/* \_\_i386\_\_ */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00334}00334                 \mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a548e874900b2e711decf9f21114be4d9}{buf}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structdcons__buf}{dcons\_buf}} *)((vm\_offset\_t)PMAP\_MAP\_LOW +}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00335}00335                     addr);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00336}00336 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00337}00337                 \mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a67353b5ebd16d745ffb4360fa17f206b}{size}} = size;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00338}00338                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{dcons_8c_a4137a33110f3382a8a9d1bd3a2bd3d16}{dcons\_load\_buffer}}(\mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a548e874900b2e711decf9f21114be4d9}{buf}}, \mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a67353b5ebd16d745ffb4360fa17f206b}{size}}, \mbox{\hyperlink{dcons__os_8c_a5a590b7fdaec64c0058dee6fe432c353}{sc}}) < 0)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00339}00339                         \mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a548e874900b2e711decf9f21114be4d9}{buf}} = NULL;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00340}00340         \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00341}00341 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00342}00342         \textcolor{keywordflow}{if} (\mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a548e874900b2e711decf9f21114be4d9}{buf}} != NULL)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00343}00343                 \textcolor{keywordflow}{goto} ok;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00344}00344 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00345}00345 \textcolor{preprocessor}{\#ifndef KLD\_MODULE}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00346}00346         \textcolor{keywordflow}{if} (stage == 0) \{ \textcolor{comment}{/* XXX or cold */}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00347}00347                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00348}00348 \textcolor{comment}{                 * DCONS\_FORCE\_CONSOLE == 1 and statically linked.}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00349}00349 \textcolor{comment}{                 * called from cninit(). can't use contigmalloc yet .}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00350}00350 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00351}00351                 \mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a548e874900b2e711decf9f21114be4d9}{buf}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structdcons__buf}{dcons\_buf}} *) \mbox{\hyperlink{dcons__os_8c_a6cf87096608a28c1fefaa17a8f60a597}{bssbuf}};}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00352}00352                 \mbox{\hyperlink{dcons_8c_a71428e81b11cd0b35b1677d8d896604b}{dcons\_init}}(\mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a548e874900b2e711decf9f21114be4d9}{buf}}, \mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a67353b5ebd16d745ffb4360fa17f206b}{size}}, \mbox{\hyperlink{dcons__os_8c_a5a590b7fdaec64c0058dee6fe432c353}{sc}});}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00353}00353         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00354}00354 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00355}00355         \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00356}00356                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00357}00357 \textcolor{comment}{                 * DCONS\_FORCE\_CONSOLE == 0 or kernel module case.}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00358}00358 \textcolor{comment}{                 * if the module is loaded after boot,}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00359}00359 \textcolor{comment}{                 * bssbuf could be non-\/continuous.}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00360}00360 \textcolor{comment}{                 */} }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00361}00361                 \mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a548e874900b2e711decf9f21114be4d9}{buf}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structdcons__buf}{dcons\_buf}} *) contigmalloc(\mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a67353b5ebd16d745ffb4360fa17f206b}{size}},}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00362}00362                         M\_DEVBUF, 0, 0x10000, 0xffffffff, PAGE\_SIZE, 0ul);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00363}00363                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a548e874900b2e711decf9f21114be4d9}{buf}} == NULL)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00364}00364                         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00365}00365                 \mbox{\hyperlink{dcons_8c_a71428e81b11cd0b35b1677d8d896604b}{dcons\_init}}(\mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a548e874900b2e711decf9f21114be4d9}{buf}}, \mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a67353b5ebd16d745ffb4360fa17f206b}{size}}, \mbox{\hyperlink{dcons__os_8c_a5a590b7fdaec64c0058dee6fe432c353}{sc}});}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00366}00366         \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00367}00367 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00368}00368 ok:}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00369}00369         \mbox{\hyperlink{structdcons__buf}{dcons\_buf}} = \mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a548e874900b2e711decf9f21114be4d9}{buf}};}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00370}00370 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00371}00371         \mbox{\hyperlink{dcons__os_8c_ad890015902edc99d46af31972a549e25}{drv\_init}} = 1;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00372}00372 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00373}00373         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00374}00374 \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00375}00375 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00376}00376 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00377}00377 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00378}\mbox{\hyperlink{dcons__os_8c_ac905ac1e6ea47d85c63c4961ca714fd9}{00378}} \mbox{\hyperlink{dcons__os_8c_ac905ac1e6ea47d85c63c4961ca714fd9}{dcons\_attach\_port}}(\textcolor{keywordtype}{int} port, \textcolor{keywordtype}{char} *name, \textcolor{keywordtype}{int} flags)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00379}00379 \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00380}00380         \textcolor{keyword}{struct }\mbox{\hyperlink{structdcons__softc}{dcons\_softc}} *dc;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00381}00381         \textcolor{keyword}{struct }tty *tp;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00382}00382 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00383}00383         dc = \&\mbox{\hyperlink{dcons__os_8c_a5a590b7fdaec64c0058dee6fe432c353}{sc}}[port];}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00384}00384         tp = tty\_alloc(\&\mbox{\hyperlink{dcons__os_8c_a618434d9f4ddc549e770c01c32d911ea}{dcons\_ttydevsw}}, dc);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00385}00385         dc-\/>\mbox{\hyperlink{structdcons__softc_a66b1d0789d704e7b854840bc2530b450}{flags}} = flags;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00386}00386         dc-\/>\mbox{\hyperlink{structdcons__softc_a565281dd8d4d13efbfcf970dc7098b87}{tty}}   = tp;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00387}00387         tty\_init\_console(tp, 0);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00388}00388         tty\_makedev(tp, NULL, \textcolor{stringliteral}{"{}\%s"{}}, name);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00389}00389         \textcolor{keywordflow}{return}(0);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00390}00390 \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00391}00391 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00392}00392 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00393}\mbox{\hyperlink{dcons__os_8c_a9086f7975603e425d8f2ad950068aad9}{00393}} \mbox{\hyperlink{dcons__os_8c_a9086f7975603e425d8f2ad950068aad9}{dcons\_attach}}(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00394}00394 \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00395}00395         \textcolor{keywordtype}{int} polltime;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00396}00396 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00397}00397         \mbox{\hyperlink{dcons__os_8c_ac905ac1e6ea47d85c63c4961ca714fd9}{dcons\_attach\_port}}(\mbox{\hyperlink{dcons_8h_ad694d2d07c81ada11b624df31d84c77c}{DCONS\_CON}}, \textcolor{stringliteral}{"{}dcons"{}}, 0);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00398}00398         \mbox{\hyperlink{dcons__os_8c_ac905ac1e6ea47d85c63c4961ca714fd9}{dcons\_attach\_port}}(\mbox{\hyperlink{dcons_8h_a7525b28a731c99479d5b1afa284cbdd5}{DCONS\_GDB}}, \textcolor{stringliteral}{"{}dgdb"{}}, \mbox{\hyperlink{dcons_8h_a2e55c631f1881c02478fe92344f1929f}{DC\_GDB}});}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00399}00399         callout\_init(\&\mbox{\hyperlink{dcons__os_8c_a3d01952e184de55b094f5e5bb9d76fea}{dcons\_callout}}, 1);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00400}00400         polltime = hz / \mbox{\hyperlink{dcons__os_8c_af4f5fb4f3d82c9f9c2de4f7cb5d23f97}{poll\_hz}};}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00401}00401         callout\_reset(\&\mbox{\hyperlink{dcons__os_8c_a3d01952e184de55b094f5e5bb9d76fea}{dcons\_callout}}, polltime, \mbox{\hyperlink{dcons__os_8c_a0e6db888f379b881dbdcd5da3dedfbad}{dcons\_timeout}}, NULL);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00402}00402         \textcolor{keywordflow}{return}(0);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00403}00403 \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00404}00404 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00405}00405 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00406}\mbox{\hyperlink{dcons__os_8c_a4e8d4122027d972ab0cf514d4d42cf4d}{00406}} \mbox{\hyperlink{dcons__os_8c_a4e8d4122027d972ab0cf514d4d42cf4d}{dcons\_detach}}(\textcolor{keywordtype}{int} port)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00407}00407 \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00408}00408         \textcolor{keyword}{struct  }tty *tp;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00409}00409         \textcolor{keyword}{struct }\mbox{\hyperlink{structdcons__softc}{dcons\_softc}} *dc;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00410}00410 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00411}00411         dc = \&\mbox{\hyperlink{dcons__os_8c_a5a590b7fdaec64c0058dee6fe432c353}{sc}}[port];}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00412}00412         tp = dc-\/>\mbox{\hyperlink{structdcons__softc_a565281dd8d4d13efbfcf970dc7098b87}{tty}};}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00413}00413 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00414}00414         \textcolor{comment}{/* tty\_rel\_gone() schedules a deferred free callback, count it. */}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00415}00415         atomic\_add\_int(\&\mbox{\hyperlink{dcons__os_8c_a5125e6637a25b391cba95d654cc8655f}{dcons\_close\_refs}}, 1);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00416}00416         tty\_lock(tp);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00417}00417         tty\_rel\_gone(tp);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00418}00418 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00419}00419         \textcolor{keywordflow}{return}(0);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00420}00420 \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00421}00421 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00422}00422 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00423}\mbox{\hyperlink{dcons__os_8c_a105eaaf503969f5014b684ba7652f711}{00423}} \mbox{\hyperlink{dcons__os_8c_a105eaaf503969f5014b684ba7652f711}{dcons\_modevent}}(module\_t mode, \textcolor{keywordtype}{int} type, \textcolor{keywordtype}{void} *data)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00424}00424 \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00425}00425         \textcolor{keywordtype}{int} err = 0, ret;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00426}00426 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00427}00427         \textcolor{keywordflow}{switch} (type) \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00428}00428         \textcolor{keywordflow}{case} MOD\_LOAD:}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00429}00429                 ret = \mbox{\hyperlink{dcons__os_8c_a40998869934cedc6837c0253f41750d8}{dcons\_drv\_init}}(1);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00430}00430                 \textcolor{keywordflow}{if} (ret != -\/1)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00431}00431                         \mbox{\hyperlink{dcons__os_8c_a9086f7975603e425d8f2ad950068aad9}{dcons\_attach}}();}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00432}00432                 \textcolor{keywordflow}{if} (ret == 0) \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00433}00433                         \mbox{\hyperlink{dcons__os_8c_aca1d0d214e15fbeec56867aa5482b8db}{dcons\_cnprobe}}(\&dcons\_consdev);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00434}00434                         \mbox{\hyperlink{dcons__os_8c_af5f48e938fe22dd13b8cacdabbb4021c}{dcons\_cninit}}(\&dcons\_consdev);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00435}00435                         cnadd(\&dcons\_consdev);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00436}00436                 \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00437}00437                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00438}00438         \textcolor{keywordflow}{case} MOD\_UNLOAD:}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00439}00439                 printf(\textcolor{stringliteral}{"{}dcons: unload\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00440}00440                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{dcons__os_8c_ad890015902edc99d46af31972a549e25}{drv\_init}} == 1) \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00441}00441                         callout\_stop(\&\mbox{\hyperlink{dcons__os_8c_a3d01952e184de55b094f5e5bb9d76fea}{dcons\_callout}});}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00442}00442                         cnremove(\&dcons\_consdev);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00443}00443                         \mbox{\hyperlink{dcons__os_8c_a4e8d4122027d972ab0cf514d4d42cf4d}{dcons\_detach}}(\mbox{\hyperlink{dcons_8h_ad694d2d07c81ada11b624df31d84c77c}{DCONS\_CON}});}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00444}00444                         \mbox{\hyperlink{dcons__os_8c_a4e8d4122027d972ab0cf514d4d42cf4d}{dcons\_detach}}(\mbox{\hyperlink{dcons_8h_a7525b28a731c99479d5b1afa284cbdd5}{DCONS\_GDB}});}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00445}00445                         \mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a548e874900b2e711decf9f21114be4d9}{buf}}-\/>\mbox{\hyperlink{structdcons__buf_a4759e16b73bd8f7527f44b72fec71c96}{magic}} = 0;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00446}00446 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00447}00447                         contigfree(\mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a548e874900b2e711decf9f21114be4d9}{buf}}, \mbox{\hyperlink{dcons__os_8c_a95d1f28c048a7547d3f84b682f8614e7}{DCONS\_BUF\_SIZE}}, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00448}00448                 \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00449}00449 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00450}00450                 \textcolor{comment}{/* Wait for tty deferred free callbacks to complete. */}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00451}00451                 \textcolor{keywordflow}{while} (atomic\_load\_acq\_int(\&\mbox{\hyperlink{dcons__os_8c_a5125e6637a25b391cba95d654cc8655f}{dcons\_close\_refs}}) > 0)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00452}00452                         pause\_sbt(\textcolor{stringliteral}{"{}dcunld"{}}, mstosbt(50), mstosbt(10), 0);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00453}00453                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00454}00454         \textcolor{keywordflow}{case} MOD\_SHUTDOWN:}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00455}00455 \textcolor{preprocessor}{\#if 0           }\textcolor{comment}{/* Keep connection after halt */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00456}00456                 \mbox{\hyperlink{dcons__os_8c_abd12daf72f20359a790f27026c876036}{dg}}.\mbox{\hyperlink{structdcons__global_a548e874900b2e711decf9f21114be4d9}{buf}}-\/>\mbox{\hyperlink{structdcons__buf_a4759e16b73bd8f7527f44b72fec71c96}{magic}} = 0;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00457}00457 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00458}00458                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00459}00459         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00460}00460                 err = EOPNOTSUPP;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00461}00461                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00462}00462         \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00463}00463         \textcolor{keywordflow}{return}(err);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00464}00464 \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00465}00465 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00466}00466 \textcolor{preprocessor}{\#if defined(GDB)}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00467}00467 \textcolor{comment}{/* Debugger interface */}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00468}00468 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00469}00469 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00470}00470 dcons\_os\_getc(\textcolor{keyword}{struct} \mbox{\hyperlink{structdcons__softc}{dcons\_softc}} *dc)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00471}00471 \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00472}00472         \textcolor{keywordtype}{int} c;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00473}00473 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00474}00474         \textcolor{keywordflow}{while} ((c = \mbox{\hyperlink{dcons__os_8c_af388af4902ce50ddf9ebb40a98d9ab22}{dcons\_os\_checkc}}(dc)) == -\/1);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00475}00475 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00476}00476         \textcolor{keywordflow}{return} (c \& 0xff);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00477}00477 \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00478}00478 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00479}00479 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00480}00480 dcons\_dbg\_probe(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00481}00481 \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00482}00482         \textcolor{keywordtype}{int} dcons\_gdb;}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00483}00483 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00484}00484         \textcolor{keywordflow}{if} (getenv\_int(\textcolor{stringliteral}{"{}dcons\_gdb"{}}, \&dcons\_gdb) == 0)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00485}00485                 \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00486}00486         \textcolor{keywordflow}{return} (dcons\_gdb);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00487}00487 \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00488}00488 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00489}00489 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00490}00490 dcons\_dbg\_init(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00491}00491 \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00492}00492 \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00493}00493 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00494}00494 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00495}00495 dcons\_dbg\_term(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00496}00496 \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00497}00497 \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00498}00498 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00499}00499 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00500}00500 dcons\_dbg\_putc(\textcolor{keywordtype}{int} c)}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00501}00501 \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00502}00502         \textcolor{keyword}{struct }\mbox{\hyperlink{structdcons__softc}{dcons\_softc}} *dc = \&\mbox{\hyperlink{dcons__os_8c_a5a590b7fdaec64c0058dee6fe432c353}{sc}}[\mbox{\hyperlink{dcons_8h_a7525b28a731c99479d5b1afa284cbdd5}{DCONS\_GDB}}];}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00503}00503         \mbox{\hyperlink{dcons__os_8c_ac593c30aa91990e25837dd617c264948}{dcons\_os\_putc}}(dc, c);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00504}00504 \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00505}00505 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00506}00506 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00507}00507 dcons\_dbg\_getc(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00508}00508 \{}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00509}00509         \textcolor{keyword}{struct }\mbox{\hyperlink{structdcons__softc}{dcons\_softc}} *dc = \&\mbox{\hyperlink{dcons__os_8c_a5a590b7fdaec64c0058dee6fe432c353}{sc}}[\mbox{\hyperlink{dcons_8h_a7525b28a731c99479d5b1afa284cbdd5}{DCONS\_GDB}}];}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00510}00510         \textcolor{keywordflow}{return} (dcons\_os\_getc(dc));}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00511}00511 \}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00512}00512 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00513}00513 }
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00514}\mbox{\hyperlink{dcons__os_8c_aea7bb6aec81be2035253b3aad3af9b71}{00514}} \mbox{\hyperlink{dcons__os_8c_aea7bb6aec81be2035253b3aad3af9b71}{DEV\_MODULE}}(dcons, \mbox{\hyperlink{dcons__os_8c_a105eaaf503969f5014b684ba7652f711}{dcons\_modevent}}, NULL);}
\DoxyCodeLine{\Hypertarget{dcons__os_8c_source_l00515}\mbox{\hyperlink{dcons__os_8c_a852d389f025e85cb7d0772cba4110192}{00515}} \mbox{\hyperlink{dcons__os_8c_a852d389f025e85cb7d0772cba4110192}{MODULE\_VERSION}}(dcons, \mbox{\hyperlink{dcons_8h_a7215d404e0d47592448ce1c98e761a01}{DCONS\_VERSION}});}

\end{DoxyCode}
