Add rxv1, v2, v3 port: removed system state macro, added missing interrupt control defines, and added missing thread preemption logic.
This commit is contained in:
@@ -32,6 +32,9 @@
|
||||
;
|
||||
;Define Assembly language external references...
|
||||
;
|
||||
|
||||
SWI0 .EQU 872E0H
|
||||
|
||||
.GLB __tx_timer_time_slice
|
||||
.GLB __tx_timer_system_clock
|
||||
.GLB __tx_timer_current_ptr
|
||||
@@ -43,6 +46,9 @@
|
||||
.GLB __tx_thread_context_save
|
||||
.GLB __tx_thread_time_slice
|
||||
.GLB __tx_thread_context_restore
|
||||
.GLB __tx_thread_preempt_disable
|
||||
.GLB __tx_thread_execute_ptr
|
||||
.GLB __tx_thread_current_ptr
|
||||
;
|
||||
.SECTION P,CODE
|
||||
;/**************************************************************************/
|
||||
@@ -50,7 +56,7 @@
|
||||
;/* FUNCTION RELEASE */
|
||||
;/* */
|
||||
;/* _tx_timer_interrupt RXv3/CCRX */
|
||||
;/* 6.1.9 */
|
||||
;/* 6.1.10 */
|
||||
;/* AUTHOR */
|
||||
;/* */
|
||||
;/* William E. Lamie, Microsoft Corporation */
|
||||
@@ -89,6 +95,10 @@
|
||||
;/* 06-02-2021 William E. Lamie Initial Version 6.1.7 */
|
||||
;/* 10-15-2021 William E. Lamie Modified comment(s), */
|
||||
;/* resulting in version 6.1.9 */
|
||||
;/* 01-31-2022 William E. Lamie Modified comment(s), and */
|
||||
;/* added missing thread */
|
||||
;/* preemption logic, */
|
||||
;/* resulting in version 6.1.10 */
|
||||
;/* */
|
||||
;/**************************************************************************/
|
||||
;VOID _tx_timer_interrupt(VOID)
|
||||
@@ -236,6 +246,23 @@ __tx_timer_dont_activate:
|
||||
; _tx_thread_time_slice();
|
||||
|
||||
BSR __tx_thread_time_slice ; Call time-slice processing
|
||||
|
||||
; /* Check if we must trigger a context switch. */
|
||||
MOV.L #__tx_thread_preempt_disable, R1 ; Load prempt disable flag.
|
||||
MOV.L [R1], R1
|
||||
CMP #0, R1
|
||||
BNE __tx_timer_not_ts_expiration ; Skip if prempt disabled.
|
||||
|
||||
MOV.L #__tx_thread_execute_ptr, R1
|
||||
MOV.L [R1], R1
|
||||
MOV.L #__tx_thread_current_ptr, R2
|
||||
MOV.L [R2], R2
|
||||
CMP R1, R2
|
||||
BEQ __tx_timer_not_ts_expiration
|
||||
|
||||
MOV.L #SWI0, R1
|
||||
MOV.L #1, [R1]
|
||||
|
||||
; }
|
||||
;
|
||||
__tx_timer_not_ts_expiration:
|
||||
|
||||
Reference in New Issue
Block a user