lab2
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
lab2 [2010/02/24 23:58] – natalia | lab2 [2010/03/19 12:50] (current) – natalia | ||
---|---|---|---|
Line 39: | Line 39: | ||
You MUST invoke OSIntEnter() and OSIntExit() in pairs. In other words, for every call to OSIntEnter() at the beginning of the ISR you MUST have a call to OSIntExit() at the end of the ISR. | You MUST invoke OSIntEnter() and OSIntExit() in pairs. In other words, for every call to OSIntEnter() at the beginning of the ISR you MUST have a call to OSIntExit() at the end of the ISR. | ||
- | Please note that rescheduling is prevented when the scheduler is locked (see [[syntax# | + | Please note that rescheduling is prevented when the scheduler is locked (see OSSchedLock) |
== OSTaskCreate == | == OSTaskCreate == | ||
Line 186: | Line 186: | ||
* " | * " | ||
- | Return will be (void *)0 if no event control blocks were available. Otherwise return is a pointer to the event control block (OS_EVENT) associated with the created semaphore. | + | Returns: |
+ | * (void *)0 if no event control blocks were available. Otherwise return is a pointer to the event control block (OS_EVENT) associated with the created semaphore. | ||
== OSSemPost == | == OSSemPost == | ||
Line 199: | Line 200: | ||
== OSSemPendAbort == | == OSSemPendAbort == | ||
OSSemPendAbort function aborts & readies any tasks currently waiting on a semaphore. This function should be used to fault-abort the wait on the semaphore, rather than to normally signal the semaphore via OSSemPost(). | OSSemPendAbort function aborts & readies any tasks currently waiting on a semaphore. This function should be used to fault-abort the wait on the semaphore, rather than to normally signal the semaphore via OSSemPost(). | ||
+ | ==== Prelab studies ==== | ||
+ | Please make sure to read and understand the license agreements listed below: | ||
+ | * {{: | ||
+ | * {{: | ||
+ | * {{: | ||
+ | * {{: | ||
+ | Also read the following study guides and application notes: | ||
+ | * {{: | ||
+ | * {{: | ||
+ | * {{: | ||
+ | * {{: | ||
+ | * {{: | ||
+ | * {{: | ||
+ | * {{: | ||
+ | * {{: | ||
+ | |||
+ | |||
+ | ==== Evaluation ==== | ||
+ | μC/OS-II source code is divided into platform dependent and platform independent files. Platform independent files can be found in Micrium/ | ||
+ | |||
+ | By study the source structure and Micrium/ | ||
+ | - Write a pseudo code using μC/OS-II to create two tasks and protect their critical sections that is accessing a common variable called XYZ. | ||
+ | - In your own words, explain how multitasking is achieved in the μC/OS-II (pay special attention to os_cpu_a.s)? | ||
+ | ==== Resources ===== | ||
+ | * {{: |
lab2.1267055892.txt.gz · Last modified: 2010/02/24 23:58 by natalia