add barrier countdownlatch completion macro define to config
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
|
||||
__CDECLS_BEGIN
|
||||
|
||||
#if TOS_CFG_BARRIER_EN > 0
|
||||
|
||||
typedef struct k_barrier_st {
|
||||
#if TOS_CFG_OBJECT_VERIFY_EN > 0u
|
||||
knl_obj_t knl_obj;
|
||||
@@ -82,6 +84,8 @@ __API__ k_err_t tos_barrier_pend(k_barrier_t *barrier);
|
||||
*/
|
||||
__API__ k_err_t tos_barrier_reset(k_barrier_t *barrier, k_barrier_cnt_t count);
|
||||
|
||||
#endif /* TOS_CFG_BARRIER_EN */
|
||||
|
||||
__CDECLS_END
|
||||
|
||||
#endif /* _TOS_BARRIER_H_ */
|
||||
|
@@ -20,6 +20,8 @@
|
||||
|
||||
__CDECLS_BEGIN
|
||||
|
||||
#if TOS_CFG_COMPLETION_EN > 0
|
||||
|
||||
typedef uint16_t completion_done_t;
|
||||
|
||||
typedef struct k_completion_st {
|
||||
@@ -146,6 +148,8 @@ __API__ k_err_t tos_completion_reset(k_completion_t *completion);
|
||||
*/
|
||||
__API__ int tos_completion_is_done(k_completion_t *completion);
|
||||
|
||||
#endif /* TOS_CFG_COMPLETION_EN */
|
||||
|
||||
__CDECLS_END
|
||||
|
||||
#endif /* _TOS_COMPLETION_H_ */
|
||||
|
@@ -20,6 +20,7 @@
|
||||
|
||||
__CDECLS_BEGIN
|
||||
|
||||
#if TOS_CFG_COUNTDOWNLATCH_EN > 0
|
||||
typedef struct k_countdownlatch_st {
|
||||
#if TOS_CFG_OBJECT_VERIFY_EN > 0u
|
||||
knl_obj_t knl_obj;
|
||||
@@ -115,6 +116,8 @@ __API__ k_err_t tos_countdownlatch_post(k_countdownlatch_t *countdownlatch);
|
||||
*/
|
||||
__API__ k_err_t tos_countdownlatch_reset(k_countdownlatch_t *countdownlatch, k_countdownlatch_cnt_t count);
|
||||
|
||||
#endif /* TOS_CFG_COUNTDOWNLATCH_EN */
|
||||
|
||||
__CDECLS_END
|
||||
|
||||
#endif /* _TOS_COUNTDOWNLATCH_H_ */
|
||||
|
@@ -17,6 +17,8 @@
|
||||
|
||||
#include "tos_k.h"
|
||||
|
||||
#if TOS_CFG_BARRIER_EN > 0
|
||||
|
||||
__API__ k_err_t tos_barrier_create(k_barrier_t *barrier, k_barrier_cnt_t count)
|
||||
{
|
||||
TOS_PTR_SANITY_CHECK(barrier);
|
||||
@@ -104,3 +106,4 @@ __API__ k_err_t tos_barrier_reset(k_barrier_t *barrier, k_barrier_cnt_t count)
|
||||
return K_ERR_NONE;
|
||||
}
|
||||
|
||||
#endif /* TOS_CFG_BARRIER_EN */
|
||||
|
@@ -17,6 +17,8 @@
|
||||
|
||||
#include "tos_k.h"
|
||||
|
||||
#if TOS_CFG_COMPLETION_EN > 0
|
||||
|
||||
__API__ k_err_t tos_completion_create(k_completion_t *completion)
|
||||
{
|
||||
TOS_PTR_SANITY_CHECK(completion);
|
||||
@@ -155,3 +157,4 @@ __API__ int tos_completion_is_done(k_completion_t *completion)
|
||||
return is_done;
|
||||
}
|
||||
|
||||
#endif /* TOS_CFG_COMPLETION_EN */
|
||||
|
@@ -17,6 +17,8 @@
|
||||
|
||||
#include "tos_k.h"
|
||||
|
||||
#if TOS_CFG_COUNTDOWNLATCH_EN > 0
|
||||
|
||||
__API__ k_err_t tos_countdownlatch_create(k_countdownlatch_t *countdownlatch, k_countdownlatch_cnt_t count)
|
||||
{
|
||||
TOS_PTR_SANITY_CHECK(countdownlatch);
|
||||
@@ -130,3 +132,4 @@ __API__ k_err_t tos_countdownlatch_reset(k_countdownlatch_t *countdownlatch, k_c
|
||||
return K_ERR_NONE;
|
||||
}
|
||||
|
||||
#endif /* TOS_CFG_COUNTDOWNLATCH_EN */
|
||||
|
Reference in New Issue
Block a user