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
iom_init(3) FreeBSD Library Functions Manual iom_init(3)

iom_init - create new I/O multiplexer

#include <libowfat/io.h>

int iom_init(iomux_t* c);

iom_init initializes an I/O multiplexer.

An I/O multiplexer is a context that can be used to do I/O multiplexing with support for multiple threads. Add events to a multiplexer using iom_add, and then get the next available event with iom_wait. If you are done and want to signal all the threads something, set a volatile global variable to tell the threads to stop and then fall iom_abort to tell all pending iom_wait operations in all threads to return immediately.

After iom_init is done, iom_add and iom_wait can be called from different threads on the same context, and they will synchronize internally.

You may have to add -lpthread to the command line in the linking step.

iom_init returns 0 on success and -1 on error, setting errno.

iom_add, iom_wait, iom_abort

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.