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:
@@ -26,7 +26,7 @@
|
||||
/* PORT SPECIFIC C INFORMATION RELEASE */
|
||||
/* */
|
||||
/* tx_port.h RXv2/GNURX */
|
||||
/* 6.1.9 */
|
||||
/* 6.1.10 */
|
||||
/* */
|
||||
/* AUTHOR */
|
||||
/* */
|
||||
@@ -52,6 +52,10 @@
|
||||
/* resulting in 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 interrupt */
|
||||
/* control defines, */
|
||||
/* resulting in version 6.1.10 */
|
||||
/* */
|
||||
/**************************************************************************/
|
||||
|
||||
@@ -85,6 +89,12 @@ typedef short SHORT;
|
||||
typedef unsigned short USHORT;
|
||||
|
||||
|
||||
/* Define interrupt control options. */
|
||||
|
||||
#define TX_INT_DISABLE 0x00000000
|
||||
#define TX_INT_ENABLE 0x00010000
|
||||
|
||||
|
||||
/* Define the priority levels for ThreadX. Legal values range
|
||||
from 32 to 1024 and MUST be evenly divisible by 32. */
|
||||
|
||||
@@ -259,7 +269,7 @@ static void _tx_thread_system_return_inline(void)
|
||||
|
||||
#ifdef TX_THREAD_INIT
|
||||
CHAR _tx_version_id[] =
|
||||
"Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX RXv2/GNURX Version 6.1.9 *";
|
||||
"Copyright (c) Microsoft Corporation. All rights reserved. * ThreadX RXv2/GNURX Version 6.1.10 *";
|
||||
#else
|
||||
extern CHAR _tx_version_id[];
|
||||
#endif
|
||||
|
||||
@@ -149,6 +149,10 @@ For generic code revision information, please refer to the readme_threadx_generi
|
||||
file, which is included in your distribution. The following details the revision
|
||||
information associated with this specific port of ThreadX:
|
||||
|
||||
01-31-2022 Release 6.1.10 changes:
|
||||
tx_port.h Added missing interrupt control defines
|
||||
tx_timer_interrupt.src Added missing thread preemption logic
|
||||
|
||||
10-15-2021 Release 6.1.9 changes:
|
||||
tx_thread_context_restore.s Removed unnecessary stack type placement
|
||||
tx_thread_schedule.s Removed unnecessary stack type checking
|
||||
@@ -165,7 +169,7 @@ information associated with this specific port of ThreadX:
|
||||
12-31-2020 Initial ThreadX release for the RXv2 using GNURX tools, version 6.1.3
|
||||
|
||||
|
||||
Copyright(c) 1996-2020 Microsoft Corporation
|
||||
Copyright(c) 1996-2022 Microsoft Corporation
|
||||
|
||||
|
||||
https://azure.com/rtos
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
;/* FUNCTION RELEASE */
|
||||
;/* */
|
||||
;/* _tx_initialize_low_level RXv2/GNURX */
|
||||
;/* 6.1.9 */
|
||||
;/* 6.1.10 */
|
||||
;/* AUTHOR */
|
||||
;/* */
|
||||
;/* William E. Lamie, Microsoft Corporation */
|
||||
@@ -65,6 +65,8 @@
|
||||
;/* 12-30-2020 William E. Lamie Initial Version 6.1.3 */
|
||||
;/* 10-15-2021 William E. Lamie Modified comment(s), */
|
||||
;/* resulting in version 6.1.9 */
|
||||
;/* 01-31-2022 William E. Lamie Modified comment(s), */
|
||||
;/* resulting in version 6.1.10 */
|
||||
;/* */
|
||||
;/**************************************************************************/
|
||||
.global __tx_initialize_low_level
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
;/* FUNCTION RELEASE */
|
||||
;/* */
|
||||
;/* _tx_thread_context_restore RXv2/GNURX */
|
||||
;/* 6.1.9 */
|
||||
;/* 6.1.10 */
|
||||
;/* AUTHOR */
|
||||
;/* */
|
||||
;/* William E. Lamie, Microsoft Corporation */
|
||||
@@ -83,6 +83,8 @@
|
||||
;/* removed unnecessary stack */
|
||||
;/* type placement, */
|
||||
;/* resulting in version 6.1.9 */
|
||||
;/* 01-31-2022 William E. Lamie Modified comment(s), */
|
||||
;/* resulting in version 6.1.10 */
|
||||
;/* */
|
||||
;/**************************************************************************/
|
||||
;VOID _tx_thread_context_restore(VOID)
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
;/* FUNCTION RELEASE */
|
||||
;/* */
|
||||
;/* _tx_thread_context_save RXv2/GNURX */
|
||||
;/* 6.1.9 */
|
||||
;/* 6.1.10 */
|
||||
;/* AUTHOR */
|
||||
;/* */
|
||||
;/* William E. Lamie, Microsoft Corporation */
|
||||
@@ -74,6 +74,8 @@
|
||||
;/* 12-30-2020 William E. Lamie Initial Version 6.1.3 */
|
||||
;/* 10-15-2021 William E. Lamie Modified comment(s), */
|
||||
;/* resulting in version 6.1.9 */
|
||||
;/* 01-31-2022 William E. Lamie Modified comment(s), */
|
||||
;/* resulting in version 6.1.10 */
|
||||
;/* */
|
||||
;/**************************************************************************/
|
||||
;VOID _tx_thread_context_save(VOID)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
;/* FUNCTION RELEASE */
|
||||
;/* */
|
||||
;/* _tx_thread_interrupt_control RXv2/GNURX */
|
||||
;/* 6.1.9 */
|
||||
;/* 6.1.10 */
|
||||
;/* AUTHOR */
|
||||
;/* */
|
||||
;/* William E. Lamie, Microsoft Corporation */
|
||||
@@ -68,6 +68,8 @@
|
||||
;/* 12-30-2020 William E. Lamie Initial Version 6.1.3 */
|
||||
;/* 10-15-2021 William E. Lamie Modified comment(s), */
|
||||
;/* resulting in version 6.1.9 */
|
||||
;/* 01-31-2022 William E. Lamie Modified comment(s), */
|
||||
;/* resulting in version 6.1.10 */
|
||||
;/* */
|
||||
;/**************************************************************************/
|
||||
;UINT _tx_thread_interrupt_control(UINT new_posture)
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
;/* FUNCTION RELEASE */
|
||||
;/* */
|
||||
;/* _tx_thread_schedule RXv2/GNURX */
|
||||
;/* 6.1.9 */
|
||||
;/* 6.1.10 */
|
||||
;/* AUTHOR */
|
||||
;/* */
|
||||
;/* William E. Lamie, Microsoft Corporation */
|
||||
@@ -80,6 +80,8 @@
|
||||
;/* removed unnecessary stack */
|
||||
;/* type checking, */
|
||||
;/* resulting in version 6.1.9 */
|
||||
;/* 01-31-2022 William E. Lamie Modified comment(s), */
|
||||
;/* resulting in version 6.1.10 */
|
||||
;/* */
|
||||
;/**************************************************************************/
|
||||
;VOID _tx_thread_schedule(VOID)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
;/* FUNCTION RELEASE */
|
||||
;/* */
|
||||
;/* _tx_thread_stack_build RXv2/GNURX */
|
||||
;/* 6.1.9 */
|
||||
;/* 6.1.10 */
|
||||
;/* AUTHOR */
|
||||
;/* */
|
||||
;/* William E. Lamie, Microsoft Corporation */
|
||||
@@ -73,6 +73,8 @@
|
||||
;/* removed unnecessary stack */
|
||||
;/* type placement, */
|
||||
;/* resulting in version 6.1.9 */
|
||||
;/* 01-31-2022 William E. Lamie Modified comment(s), */
|
||||
;/* resulting in version 6.1.10 */
|
||||
;/* */
|
||||
;/**************************************************************************/
|
||||
;VOID _tx_thread_stack_build(TX_THREAD *thread_ptr, VOID (*function_ptr)(VOID))
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
;/* FUNCTION RELEASE */
|
||||
;/* */
|
||||
;/* _tx_thread_system_return RXv2/GNURX */
|
||||
;/* 6.1.9 */
|
||||
;/* 6.1.10 */
|
||||
;/* AUTHOR */
|
||||
;/* */
|
||||
;/* William E. Lamie, Microsoft Corporation */
|
||||
@@ -66,6 +66,8 @@
|
||||
;/* 10-15-2021 William E. Lamie Modified comment(s), and */
|
||||
;/* removed unused code, */
|
||||
;/* resulting in version 6.1.9 */
|
||||
;/* 01-31-2022 William E. Lamie Modified comment(s), */
|
||||
;/* resulting in version 6.1.10 */
|
||||
;/* */
|
||||
;/**************************************************************************/
|
||||
;VOID _tx_thread_system_return(VOID)
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
;
|
||||
;Define Assembly language external references...
|
||||
;
|
||||
|
||||
.equ SWI0, 872E0H
|
||||
.global __tx_timer_time_slice
|
||||
.global __tx_timer_system_clock
|
||||
.global __tx_timer_current_ptr
|
||||
@@ -43,6 +45,9 @@
|
||||
.global __tx_thread_context_save
|
||||
.global __tx_thread_time_slice
|
||||
.global __tx_thread_context_restore
|
||||
.global __tx_thread_preempt_disable
|
||||
.global __tx_thread_execute_ptr
|
||||
.global __tx_thread_current_ptr
|
||||
;
|
||||
.SECTION P,CODE
|
||||
;/**************************************************************************/
|
||||
@@ -50,7 +55,7 @@
|
||||
;/* FUNCTION RELEASE */
|
||||
;/* */
|
||||
;/* _tx_timer_interrupt RXv2/GNURX */
|
||||
;/* 6.1.9 */
|
||||
;/* 6.1.10 */
|
||||
;/* AUTHOR */
|
||||
;/* */
|
||||
;/* William E. Lamie, Microsoft Corporation */
|
||||
@@ -89,6 +94,10 @@
|
||||
;/* 12-30-2020 William E. Lamie Initial Version 6.1.3 */
|
||||
;/* 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 +245,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