botsense/bsProxy/bsProxyThread.c
static BsProxyThCtl_T *ThCtlBlkNew(const char *sDevUri)
{
  BsProxyThCtl_T *pThCtl = NEW(BsProxyThCtl_T);

  pThCtl->m_sDevUri = new_strdup(sDevUri);
  pThCtl->m_uRefCnt = 0;
  pThCtl->m_eState  = BsProxyThStateUninit;
  pThCtl->m_queue   = DListVoidNew(ThQReqCmp, ThQReqDelete);

  // create mutex
  pthread_mutex_init(&pThCtl->m_mutexSync, NULL);

  // create condition
  pthread_cond_init(&pThCtl->m_condSync, NULL);

  return pThCtl;
}
/*!
 * \brief Allocate new service thread control block.
 *
 * \param sDevUri   Device URI.
 *
 * \return Pointer to allocated thread control block.
 */
\brief Allocate new service thread control block.
\param sDevUri   Device URI.

\return Pointer to allocated thread control block.
\ brief Allocate new service thread control block . \ param sDevUri Device URI . \ return Pointer to allocated thread control block .
static BsProxyThCtl_T *ThCtlBlkNew(const char *sDevUri)
{
  BsProxyThCtl_T *pThCtl = NEW(BsProxyThCtl_T);
  pThCtl->m_sDevUri = new_strdup(sDevUri);
  pThCtl->m_uRefCnt = 0;
  pThCtl->m_eState  = BsProxyThStateUninit;
  pThCtl->m_queue   = DListVoidNew(ThQReqCmp, ThQReqDelete);
  pthread_mutex_init(&pThCtl->m_mutexSync, NULL);
  pthread_cond_init(&pThCtl->m_condSync, NULL);
  return pThCtl;
}
static BsProxyThCtl_T * ThCtlBlkNew ( const char * sDevUri ) { BsProxyThCtl_T * pThCtl = NEW ( BsProxyThCtl_T ) ; pThCtl -> m_sDevUri = new_strdup ( sDevUri ) ; pThCtl -> m_uRefCnt = 0 ; pThCtl -> m_eState = BsProxyThStateUninit ; pThCtl -> m_queue = DListVoidNew ( ThQReqCmp , ThQReqDelete ) ; pthread_mutex_init ( & pThCtl -> m_mutexSync , NULL ) ; pthread_cond_init ( & pThCtl -> m_condSync , NULL ) ; return pThCtl ; }
\brief Allocate new service thread control block.
\ brief Allocate new service thread control block .
// create mutex // create condition