Ejemplo n.º 1
0
pwr_tStatus
sync_CondSignal (
  thread_sCond	*cp
)
{

#if defined OS_ELN

  pwr_tStatus sts = SYNC__SUCCESS;

  ker$signal(&sts, *cp);

  return sts;

#elif defined OS_LYNX && defined PWR_LYNX_30
  cp->f = 1;
  return errno_Pstatus(pthread_cond_signal(&cp->c));

#elif defined OS_POSIX
  cp->f = 1;
  return errno_Status(pthread_cond_signal(&cp->c));

#elif defined OS_VMS

  return errno_Status(tis_cond_signal(&cp->c));

#else
# error Not defined for this platform !
#endif
}
Ejemplo n.º 2
0
pwr_tStatus
sync_CondInit (
  thread_sCond	*cp
)
{

#if defined OS_ELN

  pwr_tStatus sts;

  ker$create_event(&sts, cp, EVENT$CLEARED);

  return sts;

#elif defined OS_LYNX && defined PWR_LYNX_30

  return errno_Pstatus(pthread_cond_init(&cp->c, NULL));

#elif defined OS_POSIX

  return errno_Status(pthread_cond_init(&cp->c, NULL));

#elif defined OS_VMS

  return errno_Status(tis_cond_init(&cp->c));

#else
# error Not defined for this platform !
#endif
}
Ejemplo n.º 3
0
pwr_tStatus
sync_MutexUnlock (
  thread_sMutex		*mp
)
{

#if defined OS_ELN

  ELN$UNLOCK_MUTEX(*mp);
  return SYNC__SUCCESS;

#elif defined OS_LYNX && defined PWR_LYNX_30

  return errno_Pstatus(pthread_mutex_unlock(mp));

#elif defined OS_POSIX

  return errno_Status(pthread_mutex_unlock(mp));

#elif defined OS_VMS

  return errno_Status(tis_mutex_unlock(mp));

#else
# error Not defined for this platform !
#endif

}
Ejemplo n.º 4
0
pwr_tStatus
sync_MutexInit (
  thread_sMutex		*mp
)
{

#if defined OS_ELN

  pwr_tStatus sts = SYNC__SUCCESS;

  ELN$CREATE_MUTEX(*mp, &sts);

  return sts;

#elif defined OS_LYNX && defined PWR_LYNX_30

  return errno_Pstatus(pthread_mutex_init(mp, NULL));

#elif defined OS_POSIX

  return errno_Status(pthread_mutex_init(mp, NULL));

#elif defined OS_VMS

  return errno_Status(tis_mutex_init(mp));

#else
# error Not defined for this platform !
#endif
}
Ejemplo n.º 5
0
char *
syi_NodeName (
  pwr_tStatus *status,
  char *ibuffer,
  int isize
)
{
  char* cp;
  pwr_dStatus(sts, status, SYI__SUCCESS);

  if (gethostname(ibuffer, isize) != 0) {
    if (errno == EINVAL) {
      *sts = SYI__TRUNCATED;
    } else { 
      *sts = errno_Status(errno);
      ibuffer = NULL;
    }
  }
  
  /* Remove domain */
  if ((cp = strchr(ibuffer, '.')))
    *cp = 0;

  return ibuffer;
}
Ejemplo n.º 6
0
pwr_tStatus
qos_SignalQueOld (
  pwr_tStatus	*status,
  qdb_sQue	*qp
)
{
  union sigval	value;
  int		ok;
  pwr_dStatus	(sts, status, QCOM__SUCCESS);

  qdb_AssumeLocked;

  if (qp->lock.waiting) {
//    value.sival_int = BUILDPID(getpid(), pthread_self());
    value.sival_int = getpid();
    qp->lock.waiting = FALSE;

    ok = sigqueue(qp->lock.pid, qdb_cSigMsg, value);

    if (ok == -1) {
      *sts = errno_Status(errno);
    }
  }

  return TRUE;
}