applies clang--format
This commit is contained in:
@@ -54,21 +54,21 @@
|
||||
#ifdef __ASSEMBLER__
|
||||
|
||||
#if __riscv_xlen == 64
|
||||
#define SLL32 sllw
|
||||
#define STORE sd
|
||||
#define LOAD ld
|
||||
#define LWU lwu
|
||||
#define SLL32 sllw
|
||||
#define STORE sd
|
||||
#define LOAD ld
|
||||
#define LWU lwu
|
||||
#define LOG_REGBYTES 3
|
||||
#else
|
||||
#define SLL32 sll
|
||||
#define STORE sw
|
||||
#define LOAD lw
|
||||
#define LWU lw
|
||||
#define SLL32 sll
|
||||
#define STORE sw
|
||||
#define LOAD lw
|
||||
#define LWU lw
|
||||
#define LOG_REGBYTES 2
|
||||
#endif
|
||||
#define REGBYTES (1 << LOG_REGBYTES)
|
||||
#define TX_THREAD_STACK_END_OFFSET 2*4 + 2*REGBYTES
|
||||
#define TX_THREAD_TIME_SLICE_OFFSET 3*4+ 3*REGBYTES
|
||||
#define REGBYTES (1 << LOG_REGBYTES)
|
||||
#define TX_THREAD_STACK_END_OFFSET 2 * 4 + 2 * REGBYTES
|
||||
#define TX_THREAD_TIME_SLICE_OFFSET 3 * 4 + 3 * REGBYTES
|
||||
|
||||
#else /*not __ASSEMBLER__ */
|
||||
|
||||
@@ -134,7 +134,7 @@ typedef unsigned short USHORT;
|
||||
/* Define various constants for the ThreadX RISC-V port. */
|
||||
|
||||
#define TX_INT_DISABLE 0x00000000 /* Disable interrupts value */
|
||||
#define TX_INT_ENABLE 0x00000008 /* Enable interrupt value */
|
||||
#define TX_INT_ENABLE 0x00000008 /* Enable interrupt value */
|
||||
|
||||
/* Define the clock source for trace event entry time stamp. The following two item are port specific.
|
||||
For example, if the time source is at the address 0x0a800024 and is 16-bits in size, the clock
|
||||
@@ -247,25 +247,27 @@ ULONG64 _tx_thread_interrupt_control(unsigned int new_posture);
|
||||
|
||||
#define TX_INTERRUPT_SAVE_AREA ULONG64 interrupt_save;
|
||||
/* Atomically read mstatus into interrupt_save and clear bit 3 of mstatus. */
|
||||
#define TX_DISABLE \
|
||||
{ __asm__("csrrci %0, mstatus, 0x08" : "=r"(interrupt_save) :); };
|
||||
#define TX_DISABLE \
|
||||
{ \
|
||||
__asm__("csrrci %0, mstatus, 0x08" : "=r"(interrupt_save) :); \
|
||||
};
|
||||
/* We only care about mstatus.mie (bit 3), so mask interrupt_save and write to mstatus. */
|
||||
#define TX_RESTORE \
|
||||
{ \
|
||||
register ULONG64 __tempmask = interrupt_save & 0x08; \
|
||||
__asm__("csrrs x0, mstatus, %0 \n\t" : : "r"(__tempmask) :); \
|
||||
#define TX_RESTORE \
|
||||
{ \
|
||||
register ULONG64 __tempmask = interrupt_save & 0x08; \
|
||||
__asm__("csrrs x0, mstatus, %0 \n\t" : : "r"(__tempmask) :); \
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
/* Define the interrupt lockout macros for each ThreadX object. */
|
||||
|
||||
#define TX_BLOCK_POOL_DISABLE TX_DISABLE
|
||||
#define TX_BYTE_POOL_DISABLE TX_DISABLE
|
||||
#define TX_BLOCK_POOL_DISABLE TX_DISABLE
|
||||
#define TX_BYTE_POOL_DISABLE TX_DISABLE
|
||||
#define TX_EVENT_FLAGS_GROUP_DISABLE TX_DISABLE
|
||||
#define TX_MUTEX_DISABLE TX_DISABLE
|
||||
#define TX_QUEUE_DISABLE TX_DISABLE
|
||||
#define TX_SEMAPHORE_DISABLE TX_DISABLE
|
||||
#define TX_MUTEX_DISABLE TX_DISABLE
|
||||
#define TX_QUEUE_DISABLE TX_DISABLE
|
||||
#define TX_SEMAPHORE_DISABLE TX_DISABLE
|
||||
|
||||
/* Define the version ID of ThreadX. This may be utilized by the application. */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user