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


Manual Reference Pages  -  IV_THREAD_CREATE (3)

NAME

iv_thread_create, iv_thread_set_debug_state - ivykis thread convenience functions

CONTENTS

Synopsis
Description

SYNOPSIS

#include <iv_thread.h>

int iv_thread_create(const char *name, void (*start_routine)(void *), void *arg);
void iv_thread_set_debug_state(int state);

DESCRIPTION

iv_thread_create is a wrapper around pthread_create(3) which will maintain an ivykis main loop reference in the calling thread (which must be an ivykis(3) thread, i.e. have had iv_init(3) called in it) for as long as the created thread is alive.

Maintaining a reference on the calling thread’s ivykis event loop makes sure that the calling thread will not return from its ivykis main loop before the created thread exits, as that could cause cleanup still happening in the created thread to be interrupted when the calling thread subsequently calls exit(3).

The created thread need not be an ivykis thread.

Enabling debugging by calling iv_thread_set_debug with a nonzero argument will print a debug message to standard error whenever a thread is created via iv_thread_create, whenever a thread so created terminates normally by returning from its start_routine, self-terminates by calling pthread_exit(3), or is successfully canceled by pthread_cancel(3), and whenever destruction of such a thread is signaled back to the calling thread.

For inter-thread signaling, iv_thread uses iv_event(3).

SEE ALSO

ivykis(3), iv_event(3), exit(3), pthread_cancel(3), pthread_create(3), pthread_exit(3)
Search for    or go to Top of page |  Section 3 |  Main Index


ivykis IV_THREAD (3) 2010-09-13

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