소스 검색

Removed m_name

Richard Gale 10 년 전
부모
커밋
669ff9483c
2개의 변경된 파일2개의 추가작업 그리고 25개의 파일을 삭제
  1. 0 12
      include/bx/config.h
  2. 2 13
      include/bx/thread.h

+ 0 - 12
include/bx/config.h

@@ -43,16 +43,4 @@
 #	define BX_CONFIG_SUPPORTS_THREADING !(BX_PLATFORM_EMSCRIPTEN)
 #	define BX_CONFIG_SUPPORTS_THREADING !(BX_PLATFORM_EMSCRIPTEN)
 #endif // BX_CONFIG_SUPPORTS_THREADING
 #endif // BX_CONFIG_SUPPORTS_THREADING
 
 
-#ifndef BX_CONFIG_THREAD_NAME_LENGTH
-#   if BX_PLATFORM_WINDOWS
-#       define BX_CONFIG_THREAD_NAME_LENGTH 256
-#   elif BX_PLATFORM_OSX|BX_PLATFORM_IOS
-#       define BX_CONFIG_THREAD_NAME_LENGTH 64
-#   elif BX_PLATFORM_POSIX
-#       define BX_CONFIG_THREAD_NAME_LENGTH 16
-#   else
-#       define BX_CONFIG_THREAD_NAME_LENGTH 0
-#   endif
-#endif
-
 #endif // BX_CONFIG_H_HEADER_GUARD
 #endif // BX_CONFIG_H_HEADER_GUARD

+ 2 - 13
include/bx/thread.h

@@ -141,22 +141,11 @@ namespace bx
 
 
 		void setThreadName(const char* name)
 		void setThreadName(const char* name)
 		{
 		{
-			if (name != NULL)
-			{
-				strncpy(m_name, name, BX_CONFIG_THREAD_NAME_LENGTH);
-			}
-			else
-			{
-				memset(m_name, 0, BX_CONFIG_THREAD_NAME_LENGTH);
-			}
-
 #if BX_PLATFORM_WINDOWS
 #if BX_PLATFORM_WINDOWS
 #elif BX_PLATFORM_OSX|BX_PLATFORM_IOS
 #elif BX_PLATFORM_OSX|BX_PLATFORM_IOS
-			strncpy(m_name, name, BX_CONFIG_THREAD_NAME_LENGTH);
-			pthread_setname_np(m_name);
+			pthread_setname_np(name);
 #elif BX_PLATFORM_POSIX
 #elif BX_PLATFORM_POSIX
-			strncpy(m_name, name, BX_CONFIG_THREAD_NAME_LENGTH);
-			pthread_setname_np(m_handle, m_name);
+			pthread_setname_np(m_handle, name);
 #endif // BX_PLATFORM_
 #endif // BX_PLATFORM_
 		}
 		}