made a convenient msg_q_init2
the original msg_q_init takes a q handle in the parameter list which makes it inconvenient for chain statement. This really adds nothing be making it slightly convenient Change-Id: I1e7f931d6b278c804ec6f7d87c1a79a3ffcceb75
This commit is contained in:
parent
b86a09596e
commit
d42eeebb5a
2 changed files with 33 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue