diff --git a/src/native/corehost/fxr/fx_ver.h b/src/native/corehost/fxr/fx_ver.h index 643c155816306..5f5348386897b 100644 --- a/src/native/corehost/fxr/fx_ver.h +++ b/src/native/corehost/fxr/fx_ver.h @@ -21,10 +21,6 @@ struct fx_ver_t int get_minor() const { return m_minor; } int get_patch() const { return m_patch; } - void set_major(int m) { m_major = m; } - void set_minor(int m) { m_minor = m; } - void set_patch(int p) { m_patch = p; } - bool is_prerelease() const { return !m_pre.empty(); } bool is_empty() const { return m_major == -1; } diff --git a/src/native/corehost/version.h b/src/native/corehost/version.h index b6b5136f84081..84c69d91fc6da 100644 --- a/src/native/corehost/version.h +++ b/src/native/corehost/version.h @@ -15,12 +15,7 @@ struct version_t int get_major() const { return m_major; } int get_minor() const { return m_minor; } int get_build() const { return m_build; } - int get_revision() const { return m_revision; } - - void set_major(int m) { m_major = m; } - void set_minor(int m) { m_minor = m; } - void set_build(int m) { m_build = m; } - void set_revision(int m) { m_revision = m; } + // int get_revision() const { return m_revision; } pal::string_t as_str() const; diff --git a/src/native/eventpipe/ds-protocol.h b/src/native/eventpipe/ds-protocol.h index 4f6e317044da4..df5b7aaa7d965 100644 --- a/src/native/eventpipe/ds-protocol.h +++ b/src/native/eventpipe/ds-protocol.h @@ -117,34 +117,12 @@ ds_ipc_message_try_parse_uint64_t ( uint32_t *buffer_len, uint64_t *value); -static -inline -bool -ds_ipc_message_try_parse_int64_t ( - uint8_t **buffer, - uint32_t *buffer_len, - int64_t *value) -{ - return ds_ipc_message_try_parse_uint64_t (buffer, buffer_len, (uint64_t *)value); -} - bool ds_ipc_message_try_parse_uint32_t ( uint8_t **buffer, uint32_t *buffer_len, uint32_t *value); -static -inline -bool -ds_ipc_message_try_parse_int32_t ( - uint8_t **buffer, - uint32_t *buffer_len, - int32_t *value) -{ - return ds_ipc_message_try_parse_uint32_t (buffer, buffer_len, (uint32_t *)value); -} - bool ds_ipc_message_try_parse_string_utf16_t_byte_array_alloc ( uint8_t **buffer, @@ -181,17 +159,6 @@ ds_ipc_message_initialize_header_uint64_t_payload ( const DiagnosticsIpcHeader *header, uint64_t payload); -static -inline -bool -ds_ipc_message_initialize_header_int64_t_payload ( - DiagnosticsIpcMessage *message, - const DiagnosticsIpcHeader *header, - int64_t payload) -{ - return ds_ipc_message_initialize_header_uint64_t_payload (message, header, (uint64_t)payload); -} - bool ds_ipc_message_initialize_buffer ( DiagnosticsIpcMessage *message, diff --git a/src/native/eventpipe/ep-sample-profiler.c b/src/native/eventpipe/ep-sample-profiler.c index c219fd1cec100..2459a51cf51ef 100644 --- a/src/native/eventpipe/ep-sample-profiler.c +++ b/src/native/eventpipe/ep-sample-profiler.c @@ -76,14 +76,6 @@ sample_profiler_store_profiling_enabled (bool enabled) ep_rt_volatile_store_uint32_t (&_profiling_enabled, enabled ? 1 : 0); } -static -inline -bool -sample_profiler_load_can_start_sampling (void) -{ - return (ep_rt_volatile_load_uint32_t (&_can_start_sampling) != 0) ? true : false; -} - static inline void diff --git a/src/native/eventpipe/ep-stack-contents.h b/src/native/eventpipe/ep-stack-contents.h index e0df8bfc84c61..b0ffdbdf2984b 100644 --- a/src/native/eventpipe/ep-stack-contents.h +++ b/src/native/eventpipe/ep-stack-contents.h @@ -109,20 +109,6 @@ ep_stack_contents_get_length (EventPipeStackContents *stack_contents) return ep_stack_contents_get_next_available_frame (stack_contents); } -static -inline -uintptr_t -ep_stack_contents_get_ip ( - EventPipeStackContents *stack_contents, - uint32_t frame_index) -{ - EP_ASSERT (frame_index < EP_MAX_STACK_DEPTH); - if (frame_index >= EP_MAX_STACK_DEPTH) - return 0; - - return ep_stack_contents_get_stack_frames_cref (stack_contents)[frame_index]; -} - #ifdef EP_CHECKED_BUILD static inline diff --git a/src/native/eventpipe/ep.h b/src/native/eventpipe/ep.h index 86f9616b78a82..daeaa8d9b7b5f 100644 --- a/src/native/eventpipe/ep.h +++ b/src/native/eventpipe/ep.h @@ -41,14 +41,6 @@ ep_volatile_store_eventpipe_state (EventPipeState state) ep_rt_volatile_store_uint32_t ((volatile uint32_t *)&_ep_state, state); } -static -inline -void -ep_volatile_store_eventpipe_state_without_barrier (EventPipeState state) -{ - ep_rt_volatile_store_uint32_t_without_barrier ((volatile uint32_t *)&_ep_state, state); -} - static inline EventPipeSession * @@ -73,14 +65,6 @@ ep_volatile_store_session (size_t index, EventPipeSession *session) ep_rt_volatile_store_ptr ((volatile void **)(&_ep_sessions [index]), session); } -static -inline -void -ep_volatile_store_session_without_barrier (size_t index, EventPipeSession *session) -{ - ep_rt_volatile_store_ptr_without_barrier ((volatile void **)(&_ep_sessions [index]), session); -} - static inline uint32_t @@ -105,14 +89,6 @@ ep_volatile_store_number_of_sessions (uint32_t number_of_sessions) ep_rt_volatile_store_uint32_t (&_ep_number_of_sessions, number_of_sessions); } -static -inline -void -ep_volatile_store_number_of_sessions_without_barrier (uint32_t number_of_sessions) -{ - ep_rt_volatile_store_uint32_t_without_barrier (&_ep_number_of_sessions, number_of_sessions); -} - static inline uint64_t @@ -121,14 +97,6 @@ ep_volatile_load_allow_write (void) return ep_rt_volatile_load_uint64_t (&_ep_allow_write); } -static -inline -uint64_t -ep_volatile_load_allow_write_without_barrier (void) -{ - return ep_rt_volatile_load_uint64_t_without_barrier (&_ep_allow_write); -} - static inline void @@ -137,14 +105,6 @@ ep_volatile_store_allow_write (uint64_t allow_write) ep_rt_volatile_store_uint64_t (&_ep_allow_write, allow_write); } -static -inline -void -ep_volatile_store_allow_write_without_barrier (uint64_t allow_write) -{ - ep_rt_volatile_store_uint64_t_without_barrier (&_ep_allow_write, allow_write); -} - /* * EventPipe. */ @@ -276,18 +236,6 @@ ep_walk_managed_stack_for_current_thread (EventPipeStackContents *stack_contents return (thread != NULL) ? ep_rt_walk_managed_stack_for_thread (thread, stack_contents) : false; } -static -inline -bool -ep_walk_managed_stack_for_thread (ep_rt_thread_handle_t thread, EventPipeStackContents *stack_contents) -{ - EP_ASSERT (thread != NULL); - EP_ASSERT (stack_contents != NULL); - - ep_stack_contents_reset (stack_contents); - return (thread != NULL) ? ep_rt_walk_managed_stack_for_thread (thread, stack_contents) : false; -} - bool ep_add_rundown_execution_checkpoint ( const ep_char8_t *name, diff --git a/src/native/libs/Common/pal_config.h.in b/src/native/libs/Common/pal_config.h.in index 1dc19840e56f8..1814c53499ad9 100644 --- a/src/native/libs/Common/pal_config.h.in +++ b/src/native/libs/Common/pal_config.h.in @@ -33,8 +33,6 @@ #cmakedefine01 HAVE_NON_LEGACY_STATFS #cmakedefine01 HAVE_STRCPY_S #cmakedefine01 HAVE_STRLCPY -#cmakedefine01 HAVE_STRCAT_S -#cmakedefine01 HAVE_STRLCAT #cmakedefine01 HAVE_SHM_OPEN_THAT_WORKS_WELL_ENOUGH_WITH_MMAP #cmakedefine01 HAVE_POSIX_ADVISE #cmakedefine01 HAVE_FALLOCATE diff --git a/src/native/libs/Common/pal_utilities.h b/src/native/libs/Common/pal_utilities.h index 0bab812bd613e..d517974c9fcf3 100644 --- a/src/native/libs/Common/pal_utilities.h +++ b/src/native/libs/Common/pal_utilities.h @@ -68,24 +68,6 @@ inline static void SafeStringCopy(char* destination, size_t destinationSize, con #endif } -/** - * Abstraction helper method to safely copy strings using strlcpy or strcpy_s - * or a different safe copy method, depending on the current platform. - */ -inline static void SafeStringConcat(char* destination, size_t destinationSize, const char* str1, const char* str2) -{ - memset(destination, 0, destinationSize); -#if HAVE_STRCAT_S - strcat_s(destination, destinationSize, str1); - strcat_s(destination, destinationSize, str2); -#elif HAVE_STRLCAT - strlcat(destination, str1, destinationSize); - strlcat(destination, str2, destinationSize); -#else - snprintf(destination, destinationSize, "%s%s", str1, str2); -#endif -} - /** * Converts an intptr_t to a file descriptor. * intptr_t is the type used to marshal file descriptors so we can use SafeHandles effectively. diff --git a/src/native/libs/configure.cmake b/src/native/libs/configure.cmake index 74f6910012a05..237f88c07ea20 100644 --- a/src/native/libs/configure.cmake +++ b/src/native/libs/configure.cmake @@ -226,16 +226,6 @@ check_symbol_exists( string.h HAVE_STRCPY_S) -check_symbol_exists( - strlcpy - string.h - HAVE_STRLCPY) - -check_symbol_exists( - strcat_s - string.h - HAVE_STRCAT_S) - check_symbol_exists( strlcat string.h