--- mqtt/inc/mqttd.h 2012/05/05 13:39:27 1.2.2.9 +++ mqtt/inc/mqttd.h 2012/05/05 14:51:01 1.2.2.10 @@ -15,9 +15,6 @@ struct tagStore { }; struct tagSession { - /* client session thread id */ - pthread_t sess_tid; - pthread_mutex_t sess_mtx; /* server dispatcher */ mqtt_srv_t *sess_srv; @@ -51,10 +48,6 @@ struct tagSession { TAILQ_ENTRY(tagSession) sess_node; }; typedef TAILQ_HEAD(, tagSession) sessions_t; -#define SESS_ELEM_LOCK(x) pthread_mutex_lock(&(x)->sess_mtx) -#define SESS_ELEM_UNLOCK(x) pthread_mutex_unlock(&(x)->sess_mtx) -#define SESS_LOCK pthread_mutex_lock(&mtx_sess) -#define SESS_UNLOCK pthread_mutex_unlock(&mtx_sess) struct tagPub { ait_val_t pub_name; @@ -63,19 +56,15 @@ struct tagPub { TAILQ_ENTRY(tagPub) pub_node; }; typedef TAILQ_HEAD(, tagPub) pubs_t; -#define PUBS_LOCK pthread_mutex_lock(&mtx_pub) -#define PUBS_UNLOCK pthread_mutex_unlock(&mtx_pub) extern sessions_t Sessions; extern pubs_t Pubs; extern sched_root_task_t *root; extern cfg_root_t cfg; -extern pthread_mutex_t mtx_sess, mtx_pub; /* function prototypes */ -void finiSession(struct tagSession *sess); void *startSession(sched_task_t *task);