xref: /illumos-gate/usr/src/man/man9f/pollhead_clean.9f (revision 6bc6f338464909544c320247529f38fb20420589)
te
Copyright (c) 2015, Joyent, Inc. All Rights Reserved.
This file and its contents are supplied under the terms of the
Common Development and Distribution License ("CDDL"), version 1.0.
You may only use this file in accordance with the terms of version
1.0 of the CDDL.

A full copy of the text of the CDDL should have accompanied this
source. A copy of the CDDL is also available via the Internet at
http://www.illumos.org/license/CDDL.
POLLHEAD_CLEAN 9F "Jun 12, 1998"

A little inside joke with the above date: that's the date that the
devpoll work integrated (under bug 1265897). The original work included
pollhead_clean() -- but didn't bother to document it! With the date,
we are therefore giving this man page the date it should have had in an
attempt to right an historical wrong -- albeit nearly two decades after
the fact.

NAME
pollhead_clean - inform the kernel that a pollhead is being deallocated
SYNOPSIS

#include <sys/poll.h>



void pollhead_clean(struct pollhead *php);
INTERFACE LEVEL

Architecture independent level 1 (DDI/DKI).

PARAMETERS
php

Pointer to a pollhead structure.

DESCRIPTION

The pollhead_clean() function informs the kernel that a driver's pollhead structure is about to be deallocated, usually as part of the driver's close(9E) entry point before the software state that contains the pollhead is deallocated via ddi_soft_state_free(9F). See chpoll(9E), pollwakeup(9F) and poll(2) for more detail.

CONTEXT

The pollhead_clean() function is generally called from the context of a close(9E) entry point, but may be called from user or kernel context.

SEE ALSO

poll(2), chpoll(9E), pollwakeup(9F)