]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/GCC/RISC-V/portmacro.h
Update to the latest atomic.h.
[freertos] / FreeRTOS / Source / portable / GCC / RISC-V / portmacro.h
index c43cd92e17ae501678a05e8d7cf411885b410485..8e185d6f68e13c30254dac7be85e8118b18c4151 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
- * FreeRTOS Kernel V10.2.0\r
+ * FreeRTOS Kernel V10.2.1\r
  * Copyright (C) 2019 Amazon.com, Inc. or its affiliates.  All Rights Reserved.\r
  *\r
  * Permission is hereby granted, free of charge, to any person obtaining a copy of\r
@@ -45,10 +45,11 @@ extern "C" {
 \r
 /* Type definitions. */\r
 #if __riscv_xlen == 64\r
-       #define portSTACK_TYPE  uint64_t\r
-       #define portBASE_TYPE   int64_t\r
-       #define portUBASE_TYPE  uint64_t\r
-       #define portMAX_DELAY ( TickType_t ) 0xffffffffffffffffUL\r
+       #define portSTACK_TYPE                  uint64_t\r
+       #define portBASE_TYPE                   int64_t\r
+       #define portUBASE_TYPE                  uint64_t\r
+       #define portMAX_DELAY                   ( TickType_t ) 0xffffffffffffffffUL\r
+       #define portPOINTER_SIZE_TYPE   uint64_t\r
 #elif __riscv_xlen == 32\r
        #define portSTACK_TYPE  uint32_t\r
        #define portBASE_TYPE   int32_t\r
@@ -64,6 +65,13 @@ typedef portBASE_TYPE BaseType_t;
 typedef portUBASE_TYPE UBaseType_t;\r
 typedef portUBASE_TYPE TickType_t;\r
 \r
+/* Legacy type definitions. */\r
+#define portCHAR               char\r
+#define portFLOAT              float\r
+#define portDOUBLE             double\r
+#define portLONG               long\r
+#define portSHORT              short\r
+\r
 /* 32-bit tick type on a 32-bit architecture, so reads of the tick count do\r
 not need to be guarded with a critical section. */\r
 #define portTICK_TYPE_IS_ATOMIC 1\r
@@ -76,7 +84,7 @@ not need to be guarded with a critical section. */
        #error This is the RV32 port that has not yet been adapted for 64.\r
        #define portBYTE_ALIGNMENT                      16\r
 #else\r
-       #define portBYTE_ALIGNMENT 8\r
+       #define portBYTE_ALIGNMENT                      16\r
 #endif\r
 /*-----------------------------------------------------------*/\r
 \r
@@ -144,6 +152,8 @@ not necessary for to use this port.  They are defined so the common demo files
        #define portFORCE_INLINE inline __attribute__(( always_inline))\r
 #endif\r
 \r
+#define portMEMORY_BARRIER() __asm volatile( "" ::: "memory" )\r
+\r
 #ifdef __cplusplus\r
 }\r
 #endif\r