GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
SIGEVENT(3) FreeBSD Library Functions Manual SIGEVENT(3)

sigevent
asynchronous event notification

#include <signal.h>

Some operations permit threads to request asynchronous notification of events via a struct sigevent structure. This structure contains several fields that describe the requested notification:
Type Member Description
int sigev_notify notification method
int sigev_signo signal number
union sigval sigev_value signal value
int sigev_notify_kqueue kqueue(2) file descriptor
unsigned short sigev_notify_kevent_flags kevent flags
lwpid_t sigev_notify_thread_id LWP ID
void (*)(union sigval) sigev_notify_function callback function pointer
pthread_attr_t * sigev_notify_attributes callback thread attributes

The sigev_notify field specifies the notification method used when the event triggers:

No notification is sent.
The signal sigev_signo is queued as a real-time signal to the calling process. The value stored in sigev_value will be present in the si_value of the siginfo_t structure of the queued signal.
The notification function in sigev_notify_function is called in a separate thread context. The thread is created with the attributes specified in *sigev_notify_attributes. The value stored in sigev_value is passed as the sole argument to sigev_notify_function. If sigev_notify_attributes is NULL, the thread is created with default attributes.
A new kevent is posted to the kqueue sigev_notify_kqueue. The udata member of the kevent structure contains the value stored in sigev_value. The meaning of other fields in the kevent are specific to the type of triggered event.
The signal sigev_signo is queued to the thread whose LWP ID is sigev_notify_thread_id. The value stored in sigev_value will be present in the si_value of the siginfo_t structure of the queued signal.

Note that programs wishing to use SIGEV_THREAD notifications must link against the POSIX Real-time Library (librt, -lrt).

aio_read(2), mq_notify(2), timer_create(2), siginfo(3)

The struct sigevent type conforms to IEEE Std 1003.1-2004 (“POSIX.1”).

The sigevent structure first appeared in FreeBSD 3.3.
February 25, 2020 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.