Added xQueueSendToBack, xQueueSendToFront, xQueuePeek and xSemaphoreCreateMutex - along with GenQTest.c to demonstrate their usage.

This commit is contained in:
Richard Barry 2007-08-21 16:54:48 +00:00
parent ac14fdb0b7
commit 60338bd872
18 changed files with 2005 additions and 367 deletions

View file

@ -51,18 +51,18 @@ void portSWITCH_CONTEXT( void );
*/
void portFIRST_CONTEXT( void );
#define portSWITCH_CONTEXT()
// asm { mov ax, seg pxCurrentTCB }
// asm { mov ds, ax }
// asm { les bx, pxCurrentTCB } /* Save the stack pointer into the TCB. */
// asm { mov es:0x2[ bx ], ss }
// asm { mov es:[ bx ], sp }
// asm { call far ptr vTaskSwitchContext } /* Perform the switch. */
// asm { mov ax, seg pxCurrentTCB } /* Restore the stack pointer from the TCB. */
// asm { mov ds, ax }
// asm { les bx, dword ptr pxCurrentTCB }
// asm { mov ss, es:[ bx + 2 ] }
// asm { mov sp, es:[ bx ] }
#define portSWITCH_CONTEXT() \
asm { mov ax, seg pxCurrentTCB } \
asm { mov ds, ax } \
asm { les bx, pxCurrentTCB } /* Save the stack pointer into the TCB. */ \
asm { mov es:0x2[ bx ], ss } \
asm { mov es:[ bx ], sp } \
asm { call far ptr vTaskSwitchContext } /* Perform the switch. */ \
asm { mov ax, seg pxCurrentTCB } /* Restore the stack pointer from the TCB. */ \
asm { mov ds, ax } \
asm { les bx, dword ptr pxCurrentTCB } \
asm { mov ss, es:[ bx + 2 ] } \
asm { mov sp, es:[ bx ] }
#define portFIRST_CONTEXT() \
asm { mov ax, seg pxCurrentTCB } \
@ -70,7 +70,7 @@ void portFIRST_CONTEXT( void );
asm { les bx, dword ptr pxCurrentTCB } \
asm { mov ss, es:[ bx + 2 ] } \
asm { mov sp, es:[ bx ] } \
asm { pop bx } \
asm { pop bp } \
asm { pop di } \
asm { pop si } \
asm { pop ds } \