#include <pthread.h>
#include <semaphore.h>
#include "config.h"
Go to the source code of this file.
Defines | |
#define | GET_THREAD_MODE(a, b) ( (a & (1<<b)) / (1<<b) ) |
#define | SET_THREAD_ON(a, b) a = (a | (1<<b)) |
#define | SET_THREAD_OFF(a, b) a = (a & (~(1<<b))) |
#define | STRUCT(name, members) |
#define | PTHREAD_STACK_SIZE 131072 |
#define | THREAD_T pthread_t |
#define | THREAD_CREATE(thread_handle, function, arg) |
#define | THREAD_CANCEL(thread_handle) pthread_cancel( thread_handle ) |
#define | THREAD_JOIN(thread_handle) pthread_join( thread_handle, NULL ) |
#define | THREAD_EXIT() pthread_exit(NULL) |
#define | MUTEX_T pthread_mutex_t |
#define | MUTEX_INIT(mutex) pthread_mutex_init(mutex, NULL) |
#define | MUTEX_DESTROY(mutex) pthread_mutex_destroy(mutex) |
#define | MUTEX_LOCK(mutex) |
#define | MUTEX_UNLOCK(mutex) pthread_mutex_unlock( mutex ) |
#define | MUTEX_NEW(mutex) |
#define | COND_T pthread_cond_t |
#define | COND_INIT(cond) pthread_cond_init(cond, NULL) |
#define | COND_DESTROY(cond) pthread_cond_destroy(cond) |
#define | COND_WAIT(cond, mutex) pthread_cond_wait(cond, mutex ) |
#define | COND_SLEEP(cond, mutex, test) |
#define | COND_RESET(cond, mutex) pthread_mutex_unlock( mutex ); |
#define | COND_SLEEP_ACTION(cond, mutex, action) |
#define | SIGNAL(<
Generated on Wed Apr 29 16:47:24 2009 for Mobile-C by ![]() |
#define | WAKE_QUEUE(queue, action) |
#define | SLEEP_QUEUE(queue) |
#define | SLEEP_RESET(queue) pthread_mutex_unlock( queue->thread_mutex ) |
#define | CHECK_NULL(var, action) |
#define | WARN(message) |
#define | CH_DATATYPE_SIZE(type, size) |
#define | CH_DATATYPE_STRING(type, string) |
#define | CH_DATATYPE_VALUE_STRING(type, string, p) |
#define | CH_STRING_DATATYPE(string, type) |
#define | CH_DATATYPE_STR_TO_VAL(type, string, val) |
#define CH_DATATYPE_SIZE | ( | type, | |||
size | ) |
Value:
switch(type) { \ case CH_CHARTYPE: \ size = sizeof(char); \ break; \ case CH_INTTYPE: \ size = sizeof(int); \ break; \ case CH_UINTTYPE: \ size = sizeof(unsigned int); \ break; \ case CH_SHORTTYPE: \ size = sizeof(short); \ break; \ case CH_USHORTTYPE: \ size = sizeof(unsigned short); \ break; \ case CH_FLOATTYPE: \ size = sizeof(float); \ break; \ case CH_DOUBLETYPE: \ size = sizeof(double); \ break; \ default: \ fprintf(stderr, "Unknown data type: %d at %s:%d", \ type, __FILE__, __LINE__); \ size=0; \ }
Definition at line 466 of file macros.h.
Referenced by agent_AddPersistentVariable(), agent_xml_compose__create_row_nodes(), agent_xml_parse__data(), agent_xml_parse__fill_row_data(), agent_xml_parse__row(), interpreter_variable_data_Initialize(), interpreter_variable_data_InitializeFromAgent(), and MC_GetAgentReturnData().
#define CH_DATATYPE_STR_TO_VAL | ( | type, | |||
string, | |||||
val | ) |
Value:
switch (type) { \ case CH_INTTYPE: \ *(int*)val = atoi(string); \ break; \ case CH_UINTTYPE: \ *(unsigned int*)val = atoi(string); \ break; \ case CH_SHORTTYPE: \ *(short*)val = (short)atoi(string); /*FIXME*/ \ break; \ case CH_USHORTTYPE: \ *(unsigned short*)val = (unsigned short)atoi(string); /*FIXME*/ \ break; \ case CH_FLOATTYPE: \ *(float*)val = strtof(string, NULL); \ break; \ case CH_DOUBLETYPE: \ *(double*)val = strtod(string, NULL); \ break; \ default: \ fprintf(stderr, \ "Unsupported data type: %d %s:%d\n", \ type, __FILE__, __LINE__ ); \ }
Definition at line 580 of file macros.h.
Referenced by agent_xml_parse__data().
#define CH_DATAT>Y6oZY@"tрAsq"TS \UFw+f*X |