logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

ieee1284_ref, ieee1284_unref - modify a port's reference count

Author

TimWaugh <twaugh@redhat.com> Author.

Description

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.

Name

ieee1284_ref, ieee1284_unref - modify a port's reference count

Return Value

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

See Also

ieee1284_open(3)

Synopsis

#include<ieee1284.h>intieee1284_ref(structparport*port);intieee1284_unref(structparport*port);

See Also