Blob Blame History Raw
.\"     Title: ieee1284_ref
.\"    Author: Tim Waugh <>
.\" Generator: DocBook XSL Stylesheets v1.72.0 <>
.\"      Date: 09/18/2007
.\"    Manual: Functions
.\"    Source: 
.TH "IEEE1284_REF" "3" "09/18/2007" "" "Functions"
.\" disable hyphenation
.\" disable justification (adjust text to left margin only)
.ad l
ieee1284_ref, ieee1284_unref \- modify a port's reference count
.ft B
#include <ieee1284.h>
.HP 17
.BI "int ieee1284_ref(struct\ parport\ *" "port" ");"
.HP 19
.BI "int ieee1284_unref(struct\ parport\ *" "port" ");"
If you want to free the port list from
but open one of the ports later on, you will need to prevent it from being destroyed in
\fBieee1284_free_ports\fR. Each port has a reference count, and you can use
to increment it and
to decrement it.
If you use
at any stage, you must later call
to relinquish the extra reference. If you do not do this, the resources associated with the port will not be cleaned up.
If you have not previously used
on a port, you must not use
on it.
These functions return the number of references held after the increment or decrement.
\fBTim Waugh\fR <\&\&>
.sp -1n
.IP "" 4
Copyright \(co 2001\-2003 Tim Waugh