Synchronization problem stubs and drivers.
This commit is contained in:
28
kern/include/synchprobs.h
Normal file
28
kern/include/synchprobs.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#ifndef _SYNCHPROBS_H_
|
||||
#define _SYNCHPROBS_H_
|
||||
|
||||
/*
|
||||
* Synchronization problem primitives.
|
||||
*/
|
||||
|
||||
/*
|
||||
* whalemating.c.
|
||||
*/
|
||||
|
||||
void whalemating_init(void);
|
||||
void whalemating_cleanup(void);
|
||||
void male(void *, unsigned long);
|
||||
void female(void *, unsigned long);
|
||||
void matchmaker(void *, unsigned long);
|
||||
|
||||
/*
|
||||
* stoplight.c.
|
||||
*/
|
||||
|
||||
void gostraight(void *, unsigned long);
|
||||
void turnleft(void *, unsigned long);
|
||||
void turnright(void *, unsigned long);
|
||||
void stoplight_init(void);
|
||||
void stoplight_cleanup(void);
|
||||
|
||||
#endif /* _SYNCHPROBS_H_ */
|
@@ -30,6 +30,8 @@
|
||||
#ifndef _TEST_H_
|
||||
#define _TEST_H_
|
||||
|
||||
#include "opt-synchprobs.h"
|
||||
|
||||
/*
|
||||
* Declarations for test code and other miscellaneous high-level
|
||||
* functions.
|
||||
@@ -105,5 +107,24 @@ void menu(char *argstr);
|
||||
/* The main function, called from start.S. */
|
||||
void kmain(char *bootstring);
|
||||
|
||||
#if OPT_SYNCHPROBS
|
||||
|
||||
/*
|
||||
* Synchronization driver primitives.
|
||||
*/
|
||||
|
||||
void male_start(void);
|
||||
void male_end(void);
|
||||
void female_start(void);
|
||||
void female_end(void);
|
||||
void matchmaker_start(void);
|
||||
void matchmaker_end(void);
|
||||
int whalemating(int, char **);
|
||||
|
||||
void inQuadrant(int);
|
||||
void leaveIntersection(void);
|
||||
int stoplight(int, char **);
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* _TEST_H_ */
|
||||
|
Reference in New Issue
Block a user