//==========================================================================
|
//==========================================================================
|
//
|
//
|
// tests/mbuf_test.c
|
// tests/mbuf_test.c
|
//
|
//
|
// Initial test for network mbufs
|
// Initial test for network mbufs
|
//
|
//
|
//==========================================================================
|
//==========================================================================
|
//####BSDCOPYRIGHTBEGIN####
|
//####BSDCOPYRIGHTBEGIN####
|
//
|
//
|
// -------------------------------------------
|
// -------------------------------------------
|
//
|
//
|
// Portions of this software may have been derived from OpenBSD or other sources,
|
// Portions of this software may have been derived from OpenBSD or other sources,
|
// and are covered by the appropriate copyright disclaimers included herein.
|
// and are covered by the appropriate copyright disclaimers included herein.
|
//
|
//
|
// -------------------------------------------
|
// -------------------------------------------
|
//
|
//
|
//####BSDCOPYRIGHTEND####
|
//####BSDCOPYRIGHTEND####
|
//==========================================================================
|
//==========================================================================
|
//#####DESCRIPTIONBEGIN####
|
//#####DESCRIPTIONBEGIN####
|
//
|
//
|
// Author(s): gthomas
|
// Author(s): gthomas
|
// Contributors: gthomas
|
// Contributors: gthomas
|
// Date: 2000-01-10
|
// Date: 2000-01-10
|
// Purpose:
|
// Purpose:
|
// Description:
|
// Description:
|
//
|
//
|
//
|
//
|
//####DESCRIPTIONEND####
|
//####DESCRIPTIONEND####
|
//
|
//
|
//==========================================================================
|
//==========================================================================
|
|
|
// mbuf test code
|
// mbuf test code
|
|
|
#include <sys/param.h>
|
#include <sys/param.h>
|
#include <sys/mbuf.h>
|
#include <sys/mbuf.h>
|
|
|
#include <cyg/infra/diag.h>
|
#include <cyg/infra/diag.h>
|
#include <cyg/infra/testcase.h>
|
#include <cyg/infra/testcase.h>
|
|
|
void
|
void
|
cyg_start(void)
|
cyg_start(void)
|
{
|
{
|
int i;
|
int i;
|
struct mbuf *m[32];
|
struct mbuf *m[32];
|
diag_printf("Start mbuf test\n");
|
diag_printf("Start mbuf test\n");
|
|
|
for (i = 0; i < 32; i++) {
|
for (i = 0; i < 32; i++) {
|
m[i] = m_get(M_DONTWAIT, MT_DATA);
|
m[i] = m_get(M_DONTWAIT, MT_DATA);
|
diag_printf("allocate mbuf = %x\n", m[i]);
|
diag_printf("allocate mbuf = %x\n", m[i]);
|
}
|
}
|
|
|
cyg_test_exit();
|
cyg_test_exit();
|
}
|
}
|
|
|