#ifndef LAB2_INT_H #define LAB2_INT_H // // Use this function in the clock driven approach to wait for the next time slice // void WaitForNextTimeSlice(void); // // Labels for Wait-for-release functions, don't worry about these unless you wait for // a task to be released at two different points in the task. (not recommended) // _OSLabel(TaskReleaseA) _OSLabel(TaskReleaseB) _OSLabel(TaskReleaseC) // // Wait for the given task to be released. lab2_int.c will release tasks based on // their periods. // #define WAIT_FOR_RELEASE_A() OS_WaitBinSem(OSECBP(1),OSNO_TIMEOUT,TaskReleaseA) #define WAIT_FOR_RELEASE_B() OS_WaitBinSem(OSECBP(2),OSNO_TIMEOUT,TaskReleaseB) #define WAIT_FOR_RELEASE_C() OS_WaitBinSem(OSECBP(3),OSNO_TIMEOUT,TaskReleaseC) // // Call this once, AFTER calling OSInit // void BoardInit(void); // // Each of these jobs consume 0.5 units of time and must be called: // Task A: 3 times before 3 time slices elapse // Task B: 3 times before 2 time slices elapse // Task C: 2 times before 12 time slices elapse // void DoJobA(void); void DoJobB(void); void DoJobC(void); #endif