You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (tx_semaphore_get(sem, TX_WAIT_FOREVER) !=TX_SUCCESS) {
1556
+
errno=EINVAL;
1557
+
WOLFSENTRY_RETURN_VALUE(-1);
1558
+
}
1559
+
WOLFSENTRY_RETURN_VALUE(0);
1560
+
}
1561
+
#definesem_trywait threadx_sem_trywait
1562
+
staticintthreadx_sem_trywait( sem_t*sem )
1563
+
{
1564
+
if (tx_semaphore_get(sem, 0) !=TX_SUCCESS) {
1565
+
errno=EINVAL;
1566
+
WOLFSENTRY_RETURN_VALUE(-1);
1567
+
}
1568
+
WOLFSENTRY_RETURN_VALUE(0);
1569
+
}
1570
+
staticintthreadx_sem_destroy( sem_t*sem )
1571
+
{
1572
+
if (tx_semaphore_delete(sem) !=TX_SUCCESS) {
1573
+
errno=EINVAL;
1574
+
WOLFSENTRY_RETURN_VALUE(-1);
1575
+
}
1576
+
WOLFSENTRY_RETURN_VALUE(0);
1577
+
}
1578
+
1579
+
#definesem_destroy threadx_sem_destroy
1580
+
1512
1581
#else
1513
1582
1514
1583
#error Semaphore builtins not implemented for target -- build wolfSentry with -DWOLFSENTRY_NO_SEM_BUILTIN, and supply semaphore implementation with struct wolfsentry_host_platform_interface argument to wolfsentry_init().
Copy file name to clipboardExpand all lines: wolfsentry/wolfsentry_errcodes.h
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@
39
39
#endif
40
40
41
41
typedefint32_twolfsentry_errcode_t; /*!< \brief The structured result code type for wolfSentry. It encodes a failure or success code, a source code file ID, and a line number. */
42
-
#ifdefFREERTOS
42
+
#if defined(FREERTOS) || defined(THREADX)
43
43
#defineWOLFSENTRY_ERRCODE_FMT "%d"
44
44
#elif defined(PRId32)
45
45
#defineWOLFSENTRY_ERRCODE_FMT "%" PRId32
@@ -143,7 +143,7 @@ static inline int WOLFSENTRY_ERROR_DECODE_LINE_NUMBER(wolfsentry_errcode_t x) {
/*!< \brief Compute a `wolfsentry_errcode_t` encoding the current source ID and line number, and the designated short-form error `name` (e.g. `INVALID_ARG`). @hideinitializer */
/*!< \brief Compute a `wolfsentry_errcode_t` encoding the current source ID and line number, and the designated short-form success `name` (e.g. `OK`). @hideinitializer */
0 commit comments