<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <HTML ><HEAD ><TITLE >parport_yield</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="The Linux 2.4 Parallel Port Subsystem" HREF="book1.html"><LINK REL="UP" TITLE=" Linux parallel port driver API reference " HREF="a950.html"><LINK REL="PREVIOUS" TITLE="parport_release" HREF="r1617.html"><LINK REL="NEXT" TITLE="parport_yield_blocking" HREF="r1675.html"></HEAD ><BODY CLASS="REFENTRY" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >The Linux 2.4 Parallel Port Subsystem</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="r1617.html" ACCESSKEY="P" ><<< Previous</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="r1675.html" ACCESSKEY="N" >Next >>></A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="AEN1643" ></A ><SPAN CLASS="phrase" ><SPAN CLASS="PHRASE" >parport_yield</SPAN ></SPAN ></H1 ><DIV CLASS="REFNAMEDIV" ><A NAME="AEN1647" ></A ><H2 >Name</H2 >parport_yield -- relinquish a parallel port temporarily </DIV ><DIV CLASS="REFSYNOPSISDIV" ><A NAME="AEN1650" ></A ><H2 >Synopsis</H2 ><DIV CLASS="FUNCSYNOPSIS" ><A NAME="AEN1652" ></A ><P ></P ><P ><CODE ><CODE CLASS="FUNCDEF" >int <TT CLASS="FUNCTION" >parport_yield </TT ></CODE >(struct pardevice * <TT CLASS="PARAMETER" ><I >dev</I ></TT >);</CODE ></P ><P ></P ></DIV ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN1658" ></A ><H2 >Arguments</H2 ><P ></P ><DIV CLASS="VARIABLELIST" ><DL ><DT ><TT CLASS="PARAMETER" ><I >dev</I ></TT ></DT ><DD ><P > a device on the parallel port </P ></DD ></DL ></DIV ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN1666" ></A ><H2 >Description</H2 ><P > This function relinquishes the port if it would be helpful to other drivers to do so. Afterwards it tries to reclaim the port using <TT CLASS="FUNCTION" >parport_claim</TT >, and the return value is the same as for <TT CLASS="FUNCTION" >parport_claim</TT >. If it fails, the port is left unclaimed and it is the driver's responsibility to reclaim the port. </P ><P > The <TT CLASS="FUNCTION" >parport_yield</TT > and <TT CLASS="FUNCTION" >parport_yield_blocking</TT > functions are for marking points in the driver at which other drivers may claim the port and use their devices. Yielding the port is similar to releasing it and reclaiming it, but is more efficient because no action is taken if there are no other devices needing the port. In fact, nothing is done even if there are other devices waiting but the current device is still within its <SPAN CLASS="QUOTE" >"timeslice"</SPAN >. The default timeslice is half a second, but it can be adjusted via the /proc interface. </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="r1617.html" ACCESSKEY="P" ><<< Previous</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="book1.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="r1675.html" ACCESSKEY="N" >Next >>></A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><SPAN CLASS="phrase" ><SPAN CLASS="PHRASE" >parport_release</SPAN ></SPAN ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="a950.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><SPAN CLASS="phrase" ><SPAN CLASS="PHRASE" >parport_yield_blocking</SPAN ></SPAN ></TD ></TR ></TABLE ></DIV ></BODY ></HTML >