mUPnP for C
|
#include <string.h>
#include <signal.h>
#include <mupnp/util/log.h>
#include <mupnp/util/thread.h>
#include <mupnp/util/time.h>
Functions | |
static void | sig_handler (int sign) |
static void | mupnp_thread_createkey () |
mUpnpThread * | mupnp_thread_self () |
static void * | PosixThreadProc (void *param) |
mUpnpThread * | mupnp_thread_new () |
bool | mupnp_thread_delete (mUpnpThread *thread) |
bool | mupnp_thread_start (mUpnpThread *thread) |
bool | mupnp_thread_stop (mUpnpThread *thread) |
bool | mupnp_thread_stop_with_cond (mUpnpThread *thread, mUpnpCond *cond) |
bool | mupnp_thread_restart (mUpnpThread *thread) |
bool | mupnp_thread_isrunnable (mUpnpThread *thread) |
void | mupnp_thread_setaction (mUpnpThread *thread, MUPNP_THREAD_FUNC func) |
void | mupnp_thread_setuserdata (mUpnpThread *thread, void *value) |
void * | mupnp_thread_getuserdata (mUpnpThread *thread) |
Variables | |
static pthread_key_t | mupnp_thread_self_ref |
static pthread_once_t | mupnp_thread_mykeycreated = PTHREAD_ONCE_INIT |
|
static |
bool mupnp_thread_delete | ( | mUpnpThread * | thread | ) |
Stop and destroy a thread.
thread | Thread to destroy |
void * mupnp_thread_getuserdata | ( | mUpnpThread * | thread | ) |
Get the user data pointer
thread | Thread from which to get the pointer |
bool mupnp_thread_isrunnable | ( | mUpnpThread * | thread | ) |
Check if a thread has been started
thread | Thread to check |
mUpnpThread * mupnp_thread_new | ( | void | ) |
Create a new thread
bool mupnp_thread_restart | ( | mUpnpThread * | thread | ) |
Restart a thread. Essentially calls mupnp_thread_stop() and mupnp_thread_start()
thread | Thread to restart |
mUpnpThread * mupnp_thread_self | ( | void | ) |
Get a self reference to thread.
void mupnp_thread_setaction | ( | mUpnpThread * | thread, |
MUPNP_THREAD_FUNC | actionFunc ) |
Set the thread's worker function.
thread | Thread struct |
actionFunc | Function pointer to set as the worker function |
void mupnp_thread_setuserdata | ( | mUpnpThread * | thread, |
void * | data ) |
Set the user data pointer
thread | Thread struct |
data | Pointer to user data |
bool mupnp_thread_start | ( | mUpnpThread * | thread | ) |
Start a thread (must be created first with ch_thread_new())
thread | Thread to start |
bool mupnp_thread_stop | ( | mUpnpThread * | thread | ) |
Stop a running thread.
thread | Thread to stop |
bool mupnp_thread_stop_with_cond | ( | mUpnpThread * | thread, |
mUpnpCond * | cond ) |
Stop the running thread and signal the given CGCond.
|
static |
|
static |
|
static |
|
static |