ieee1284_ref(3)

ieee1284_ref3

Modify a port's reference count

Usage

#include <ieee1284.h>

int ieee1284_ref(struct parport *port);

int ieee1284_unref(struct parport *port);

Overview

If you want to free the port list from ieee1284_find_ports but open one of the ports later on, you will need to prevent it from being destroyed in ieee1284_free_ports. Each port has a reference count, and you can use ieee1284_ref to increment it and ieee1284_unref to decrement it.

If you use ieee1284_ref at any stage, you must later call ieee1284_unref 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 ieee1284_ref on a port, you must not use ieee1284_unref on it.

Return value

These functions return the number of references held after the increment or decrement.

Releases

12 releases since Debian 3.1 (Sarge); the text changed 2 times.

  1. 3.1–4.0
  2. 5.0–13
  3. Arch

Author

Tim Waugh <[email protected]>

Author.

From libieee1284 0.2.11-19 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.