From b1066a9f967ba4e12e9ca87820eab494177d8467 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Sat, 21 Mar 2020 17:06:14 -0500 Subject: [PATCH] unix: Remove custom definition of MP_PLAT_PRINT_STRN. This removes the port-specific definition of MP_PLAT_PRINT_STRN on the unix port. Since fee7e5617f55b4778de74ee185fcc3950cdc7b6d this is no longer a single function call so we are not really optimising anything over using the default definition of MP_PLAT_PRINT_STRN which calls mp_hal_stdout_tx_strn_cooked(). --- ports/unix/mpconfigport.h | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/ports/unix/mpconfigport.h b/ports/unix/mpconfigport.h index 5b2f0f09d2..7991aba51f 100644 --- a/ports/unix/mpconfigport.h +++ b/ports/unix/mpconfigport.h @@ -286,17 +286,6 @@ void mp_unix_mark_exec(void); #define MICROPY_FORCE_PLAT_ALLOC_EXEC (1) #endif -#if MICROPY_PY_OS_DUPTERM -#define MP_PLAT_PRINT_STRN(str, len) mp_hal_stdout_tx_strn_cooked(str, len) -#else -#define MP_PLAT_PRINT_STRN(str, len) do { \ - MP_THREAD_GIL_EXIT(); \ - ssize_t ret = write(1, str, len); \ - MP_THREAD_GIL_ENTER(); \ - (void)ret; \ -} while (0) -#endif - #ifdef __linux__ // Can access physical memory using /dev/mem #define MICROPY_PLAT_DEV_MEM (1)