GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> MEM / V5-8-1 > mem_unit_test / rad750
#include <ITC/ITC_pubdefs.h>
#include <mem_unit_test.h>
Functions | |
void * | POOL_alloc (void *prm, unsigned int size, ITC_cb_Completion **free_cb, void **cb_parm_0, void **cb_parm_1, void **cb_parm_2) |
Allocate a packet from the memory pool. | |
int | POOL_init (test_Test_Descriptor *td_p, unsigned int num_pkts, unsigned int pkt_bytes) |
Create the memory pool for packets. | |
int | POOL_shutdown (test_Test_Descriptor *td_p) |
Shutdown the memory pool. |
** CVS $Id: mem_util_pool.h,v 1.2 2011/03/29 01:58:52 apw Exp $ **
void* POOL_alloc | ( | void * | prm, | |
unsigned int | size, | |||
ITC_cb_Completion ** | free_cb, | |||
void ** | cb_parm_0, | |||
void ** | cb_parm_1, | |||
void ** | cb_parm_2 | |||
) |
Allocate a packet from the memory pool.
prm | Context parm (pointer to test descriptor). | |
size | Size of allocation request, in bytes. | |
free_cb | Location to store pointer to 'free' callback function. | |
cb_parm_0 | Location to store callback parameter 0. | |
cb_parm_1 | Location to store callback parameter 1. | |
cb_parm_2 | Location to store callback parameter 2. |
References _test_Test_Descriptor::pool_fcb_p, pool_free(), _test_Test_Descriptor::pool_in_use, and _test_Test_Descriptor::pool_pkt_bytes.
Referenced by cmd_send(), TASK_add_queue(), and TASK_init().
int POOL_init | ( | test_Test_Descriptor * | td_p, | |
unsigned int | num_pkts, | |||
unsigned int | pkt_bytes | |||
) |
Create the memory pool for packets.
td_p | Pointer to test descriptor. | |
num_pkts | Number of packets to include in the pool. | |
pkt_bytes | Size of each packet in the pool, in bytes. |
0 | Success. | |
-1 | Failure. |
References _test_Test_Descriptor::pool_buf_p, _test_Test_Descriptor::pool_fcb_p, _test_Test_Descriptor::pool_in_use, _test_Test_Descriptor::pool_pkt_bytes, test_NULL_Compare(), test_Pop_State(), test_Push_State(), and test_Status_Success().
Referenced by mem_unit_test_func().
int POOL_shutdown | ( | test_Test_Descriptor * | td_p | ) |
Shutdown the memory pool.
td_p | Pointer to test descriptor. |
0 | Success. | |
-1 | Failure. |
References _test_Test_Descriptor::pool_buf_p, _test_Test_Descriptor::pool_fcb_p, _test_Test_Descriptor::pool_in_use, test_Generic_Error(), test_Pop_State(), test_Push_State(), and test_Value32_Compare().
Referenced by mem_unit_test_func().