Go to main content

man pages section 3: Basic Library Functions

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

postwait_genkey (3C)

Name

postwait_genkey - Generate a post-wait key.

Synopsis

#include <port.h>
int postwait_genkey(
postwkey_t *key);

Description

The postwait_genkey() function returns a statistically unique key of type postwkey_t in the key argument every time it is called. This is to be used in the post-wait mechanism provided by the functions postwait_post(3C), and postwait_postn(3C) to post and event ports to wait. For more information, see port_associate(3C).

Return Values

Upon successful completion, postwait_genkey() returns 0 and the key in the key argument. Otherwise, it returns -1 and sets errno to indicate the error.

Errors

EINTR

A signal was caught while reading /dev/urandom. For more information, see random(4D).

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed
MT-Level
Safe, Async-Signal-Safe

See Also

port_associate(3C), postwait_post(3C), postwait_postn(3C)