liblscp
1.0.0
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
#include "lscp/version.h"
Go to the source code of this file.
Macros | |
#define | lscp_mutex_init(m) pthread_mutex_init(&(m), NULL) |
#define | lscp_mutex_destroy(m) pthread_mutex_destroy(&(m)) |
#define | lscp_mutex_lock(m) pthread_mutex_lock(&(m)) |
#define | lscp_mutex_unlock(m) pthread_mutex_unlock(&(m)) |
#define | lscp_cond_init(c) pthread_cond_init(&(c), NULL) |
#define | lscp_cond_destroy(c) pthread_cond_destroy(&(c)) |
#define | lscp_cond_wait(c, m) pthread_cond_wait(&(c), &(m)) |
#define | lscp_cond_signal(c) pthread_cond_signal(&(c)) |
#define | lscp_thread_exit() pthread_exit(NULL) |
Typedefs | |
typedef enum _lscp_status_t | lscp_status_t |
typedef pthread_mutex_t | lscp_mutex_t |
typedef pthread_cond_t | lscp_cond_t |
typedef void(* | lscp_thread_proc_t) (void *pvData) |
typedef struct _lscp_thread_t | lscp_thread_t |
Enumerations | |
enum | _lscp_status_t { LSCP_OK = 0 , LSCP_FAILED = -1 , LSCP_ERROR = -2 , LSCP_WARNING = -3 , LSCP_TIMEOUT = -4 , LSCP_QUIT = -5 } |
Functions | |
lscp_thread_t * | lscp_thread_create (lscp_thread_proc_t pfnProc, void *pvData, int iDetach) |
lscp_status_t | lscp_thread_join (lscp_thread_t *pThread) |
lscp_status_t | lscp_thread_cancel (lscp_thread_t *pThread) |
lscp_status_t | lscp_thread_destroy (lscp_thread_t *pThread) |
#define lscp_cond_destroy | ( | c | ) | pthread_cond_destroy(&(c)) |
#define lscp_cond_init | ( | c | ) | pthread_cond_init(&(c), NULL) |
#define lscp_cond_signal | ( | c | ) | pthread_cond_signal(&(c)) |
#define lscp_cond_wait | ( | c, | |
m | |||
) | pthread_cond_wait(&(c), &(m)) |
#define lscp_mutex_destroy | ( | m | ) | pthread_mutex_destroy(&(m)) |
#define lscp_mutex_init | ( | m | ) | pthread_mutex_init(&(m), NULL) |
#define lscp_mutex_lock | ( | m | ) | pthread_mutex_lock(&(m)) |
#define lscp_mutex_unlock | ( | m | ) | pthread_mutex_unlock(&(m)) |
#define lscp_thread_exit | ( | ) | pthread_exit(NULL) |
typedef pthread_cond_t lscp_cond_t |
typedef pthread_mutex_t lscp_mutex_t |
typedef enum _lscp_status_t lscp_status_t |
typedef void(* lscp_thread_proc_t) (void *pvData) |
typedef struct _lscp_thread_t lscp_thread_t |
enum _lscp_status_t |
lscp_status_t lscp_thread_cancel | ( | lscp_thread_t * | pThread | ) |
References LSCP_FAILED, LSCP_OK, and _lscp_thread_t::pthread.
Referenced by lscp_thread_destroy().
lscp_thread_t* lscp_thread_create | ( | lscp_thread_proc_t | pfnProc, |
void * | pvData, | ||
int | iDetach | ||
) |
References _lscp_thread_t::iDetach, _lscp_thread_t::pfnProc, and _lscp_thread_t::pvData.
Referenced by lscp_socket_agent_start().
lscp_status_t lscp_thread_destroy | ( | lscp_thread_t * | pThread | ) |
References LSCP_OK, lscp_thread_cancel(), and lscp_thread_join().
Referenced by lscp_socket_agent_free(), and lscp_socket_agent_start().
lscp_status_t lscp_thread_join | ( | lscp_thread_t * | pThread | ) |
References LSCP_FAILED, LSCP_OK, and _lscp_thread_t::pthread.
Referenced by lscp_socket_agent_join(), and lscp_thread_destroy().