diff --git a/utils/msg_q.c b/utils/msg_q.c index c4f3b9d9..f82d4c03 100644 --- a/utils/msg_q.c +++ b/utils/msg_q.c @@ -136,6 +136,20 @@ msq_q_err_type msg_q_init(void** msg_q_data) return eMSG_Q_SUCCESS; } +/*=========================================================================== + + FUNCTION: msg_q_init2 + + ===========================================================================*/ +const void* msg_q_init2() +{ + void* q = NULL; + if (eMSG_Q_SUCCESS != msg_q_init(&q)) { + q = NULL; + } + return q; +} + /*=========================================================================== FUNCTION: msg_q_destroy diff --git a/utils/msg_q.h b/utils/msg_q.h index d3d5cc5d..453b8ce3 100644 --- a/utils/msg_q.h +++ b/utils/msg_q.h @@ -58,7 +58,7 @@ FUNCTION msg_q_init DESCRIPTION Initializes internal structures for message queue. - msg_q_data: State of message queue to be initialized. + msg_q_data: pointer to an opaque Q handle to be returned; NULL if fails DEPENDENCIES N/A @@ -72,6 +72,24 @@ SIDE EFFECTS ===========================================================================*/ msq_q_err_type msg_q_init(void** msg_q_data); +/*=========================================================================== +FUNCTION msg_q_init2 + +DESCRIPTION + Initializes internal structures for message queue. + +DEPENDENCIES + N/A + +RETURN VALUE + opaque handle to the Q created; NULL if create fails + +SIDE EFFECTS + N/A + +===========================================================================*/ +const void* msg_q_init2(); + /*=========================================================================== FUNCTION msg_q_destroy