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 fee7e5617f 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().
This commit is contained in:
David Lechner 2020-03-21 17:06:14 -05:00 committed by Damien George
parent 9fa32169e9
commit b1066a9f96

View File

@ -286,17 +286,6 @@ void mp_unix_mark_exec(void);
#define MICROPY_FORCE_PLAT_ALLOC_EXEC (1) #define MICROPY_FORCE_PLAT_ALLOC_EXEC (1)
#endif #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__ #ifdef __linux__
// Can access physical memory using /dev/mem // Can access physical memory using /dev/mem
#define MICROPY_PLAT_DEV_MEM (1) #define MICROPY_PLAT_DEV_MEM (1)