Revision 880a8dde

View differences:

configurations/HelloWorld/modules/HelloWorld_urtwareconf.h
107 107
 */
108 108
#define URT_CFG_RPC_QOS_JITTERCHECKS            true
109 109

  
110
/**
111
 * @brief   Flag to enable timeout functionality for condition variables.
112
 * @details If the OS supports this feature, urtPublisherPublish() can be called
113
            with a timeout. Otherwise it will block indefinitely under certain
114
            conditions.
115
 */
116
#define URT_CFG_OSAL_CONDVAR_TIMEOUT            false
117

  
110 118
#endif /* HELLOWORLD_URTWARECONF_H */
middleware/apps_urtosal.c
34 34
/* CONDITION VARIABLE                                                         */
35 35
/*============================================================================*/
36 36

  
37
#if (URT_CFG_OSAL_CONDVAR_TIMEOUT == true) || defined(__DOXYGEN__)
37 38
/**
38 39
 * @details Due to limitations of ChibiOS, the 'mutex' argument is ignored in
39 40
 *          this implementation. Instead, the mutex, which was locked by the
......
61 62
      return URT_CONDVAR_WAITSTATUS_TIMEOUT;
62 63
  }
63 64
}
65
#else
66
urt_osCondvarWaitStatus_t urtCondvarWait(urt_osCondvar_t* condvar, urt_osMutex_t* mutex)
67
{
68
  aosDbgCheck(condvar != NULL);
69
  aosDbgCheck(mutex != NULL);
70
  aosDbgCheck(chMtxGetNextMutexX() == mutex); // due to limitation of ChibiOS
71

  
72
  (void)mutex;
73

  
74
  switch (chCondWait(condvar)) {
75
    case MSG_OK:
76
      return URT_CONDVAR_WAITSTATUS_SIGNAL;
77
    case MSG_RESET:
78
      return URT_CONDVAR_WAITSTATUS_BROADCAST;
79
    default:
80
      chSysHalt(__func__);
81
      return URT_CONDVAR_WAITSTATUS_TIMEOUT;
82
  }
83
}
84
#endif
64 85

  
65 86
/*============================================================================*/
66 87
/* EVENTS                                                                     */
middleware/apps_urtosal.h
61 61

  
62 62
#define urtCondvarSignal(condvar)               chCondSignal(condvar)
63 63

  
64
#define urtCondvarBroadcast condvar)            chCondBroadcast(condvar)
64
#define urtCondvarBroadcast(condvar)            chCondBroadcast(condvar)
65 65

  
66 66
/*============================================================================*/
67 67
/* EVENTS                                                                     */
middleware/uRtWare
1
Subproject commit 46471486302efadc59bfbde603a5238a41eb6a74
1
Subproject commit b247db3f752f4a663003aab8831b8274f29d3550
os/AMiRo-OS
1
Subproject commit 7387fb422e7df3ad3f636891117615a5ce2b659e
1
Subproject commit 33de2690f6e52f106b5407dc346c9e1821867810

Also available in: Unified diff