Desktop/xinu_mips-1.0.2.tar/xinu_mips-1.0.2/test/test-sem.c File Reference

#include <kernel.h>
#include <proc.h>
#include <semaphore.h>
#include <stdio.h>

Include dependency graph for test-sem.c:

Go to the source code of this file.

Functions

void testPass (const char *)
void testFail (const char *)
void test_semWaiter (semaphore s, int times, uchar *testResult)
bool test_checkSemCount (semaphore s, short c)
bool test_checkProcState (ushort pid, uchar state)
bool test_checkResult (uchar testResult, uchar expected)
int test_semaphore (int argc, char **argv)


Function Documentation

bool test_checkProcState ( ushort  pid,
uchar  state 
)

Definition at line 32 of file test-sem.c.

References FALSE, proctab, sprintf(), testFail(), and TRUE.

Referenced by test_semaphore(), test_semaphore2(), test_semaphore3(), and test_semaphore4().

bool test_checkResult ( uchar  testResult,
uchar  expected 
)

Definition at line 46 of file test-sem.c.

References FALSE, sprintf(), testFail(), and TRUE.

Referenced by test_semaphore(), test_semaphore2(), test_semaphore3(), and test_semaphore4().

bool test_checkSemCount ( semaphore  s,
short  c 
)

Definition at line 19 of file test-sem.c.

References sentry::count, FALSE, semtab, sprintf(), testFail(), and TRUE.

Referenced by test_semaphore(), test_semaphore2(), test_semaphore3(), and test_semaphore4().

int test_semaphore ( int  argc,
char **  argv 
)

void test_semWaiter ( semaphore  s,
int  times,
uchar testResult 
)

Definition at line 9 of file test-sem.c.

References wait().

Referenced by test_semaphore(), test_semaphore2(), test_semaphore3(), and test_semaphore4().

void testFail ( const char *   ) 

Definition at line 11 of file testhelper.c.

void testPass ( const char *   ) 

Definition at line 6 of file testhelper.c.


Generated on Thu Oct 9 22:35:18 2008 for xinu by  doxygen 1.5.5