#include <kernel.h>
#include <proc.h>
#include <semaphore.h>
#include <stdio.h>
Go to the source code of this file.
Functions | |
void | testPass (const char *) |
void | testFail (const char *) |
bool | test_checkSemCount (semaphore s, short c) |
bool | test_checkProcState (ushort pid, uchar state) |
bool | test_checkResult (uchar testResult, uchar expected) |
void | test_semWaiter (semaphore s, int times, uchar *testResult) |
int | test_semaphore4 (int argc, char **argv) |
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().
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().
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_semaphore4 | ( | int | argc, | |
char ** | argv | |||
) |
Definition at line 15 of file test-sem4.c.
References create(), FALSE, freesem(), INITSTK, isbadsem, kill(), newsem(), OK, PRFREE, printf, PRWAIT, ready(), RESCHED_YES, sprintf(), test_checkProcState(), test_checkResult(), test_checkSemCount(), test_semWaiter(), testFail(), testPass(), and TRUE.
Referenced by testItem().
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 * | ) |
void testPass | ( | const char * | ) |