rename maros from FUZZ to _FUZZ, change TU_STATIC to static _fuzz_thread

This commit is contained in:
hathach
2023-02-22 11:47:09 +07:00
parent 18c3095346
commit 03ec49450d
17 changed files with 57 additions and 58 deletions

View File

@@ -62,10 +62,10 @@
#endif
/* --------------------- Fuzzing types -------------------------------------- */
#ifdef FUZZ
#define TU_STATIC __thread static
#ifdef _FUZZ
#define _fuzz_thread __thread
#else
#define TU_STATIC static
#define _fuzz_thread
#endif
// for declaration of reserved field, make use of _TU_COUNTER_

View File

@@ -114,7 +114,7 @@ typedef struct
static inline const char* tu_lookup_find(tu_lookup_table_t const* p_table, uint32_t key)
{
TU_STATIC char not_found[11];
static _fuzz_thread char not_found[11];
for(uint16_t i=0; i<p_table->count; i++)
{

View File

@@ -529,13 +529,13 @@ TU_ATTR_ALWAYS_INLINE static inline uint16_t tu_edpt_packet_size(tusb_desc_endpo
#if CFG_TUSB_DEBUG
TU_ATTR_ALWAYS_INLINE static inline const char *tu_edpt_dir_str(tusb_dir_t dir)
{
TU_STATIC const char *str[] = {"out", "in"};
static _fuzz_thread const char *str[] = {"out", "in"};
return str[dir];
}
TU_ATTR_ALWAYS_INLINE static inline const char *tu_edpt_type_str(tusb_xfer_type_t t)
{
TU_STATIC const char *str[] = {"control", "isochronous", "bulk", "interrupt"};
static _fuzz_thread const char *str[] = {"control", "isochronous", "bulk", "interrupt"};
return str[t];
}
#endif