pintos/src/tests/internal/list.c File Reference

#include <debug.h>
#include <list.h>
#include <random.h>
#include <stdio.h>
#include "threads/test.h"

Go to the source code of this file.

Data Structures

struct  value

Defines

#define MAX_SIZE   64

Functions

static void shuffle (struct value[], size_t)
static bool value_less (const struct list_elem *, const struct list_elem *, void *)
static void verify_list_fwd (struct list *, int size)
static void verify_list_bkwd (struct list *, int size)
void test (void)
static void shuffle (struct value *array, size_t cnt)
static bool value_less (const struct list_elem *a_, const struct list_elem *b_, void *aux UNUSED)


Define Documentation

#define MAX_SIZE   64

Definition at line 19 of file list.c.

Referenced by test().


Function Documentation

static void shuffle ( struct value array,
size_t  cnt 
) [static]

Definition at line 113 of file list.c.

References random_ulong().

static void shuffle ( struct  value[],
size_t   
) [static]

Referenced by test(), and test_main().

void test ( void   ) 

static bool value_less ( const struct list_elem a_,
const struct list_elem b_,
void *aux  UNUSED 
) [static]

Definition at line 129 of file list.c.

References value::elem, list_entry, and value::value.

static bool value_less ( const struct list_elem ,
const struct list_elem ,
void *   
) [static]

Referenced by test().

static void verify_list_bkwd ( struct list list,
int  size 
) [static]

Definition at line 160 of file list.c.

References ASSERT, value::elem, list_entry, list_prev(), list_rbegin(), list_rend(), and value::value.

Referenced by test().

static void verify_list_fwd ( struct list list,
int  size 
) [static]

Definition at line 141 of file list.c.

References ASSERT, value::elem, list_begin(), list_end(), list_entry, list_next(), and value::value.

Referenced by test().


Generated on Mon Jan 10 16:43:58 2011 for Pintos by  doxygen 1.5.6