Branimir Karadžić 11 vuotta sitten
vanhempi
sitoutus
3c297abf1b
4 muutettua tiedostoa jossa 15 lisäystä ja 15 poistoa
  1. 1 1
      include/bx/cpu.h
  2. 1 1
      include/bx/mutex.h
  3. 2 2
      include/bx/sem.h
  4. 11 11
      include/bx/thread.h

+ 1 - 1
include/bx/cpu.h

@@ -68,7 +68,7 @@ namespace bx
 #if BX_PLATFORM_XBOX360
 #if BX_PLATFORM_XBOX360
 		__lwsync();
 		__lwsync();
 #elif BX_PLATFORM_WINRT
 #elif BX_PLATFORM_WINRT
-        MemoryBarrier();
+		MemoryBarrier();
 #elif BX_COMPILER_MSVC
 #elif BX_COMPILER_MSVC
 		_mm_mfence();
 		_mm_mfence();
 #else
 #else

+ 1 - 1
include/bx/mutex.h

@@ -45,7 +45,7 @@ namespace bx
 	inline int pthread_mutex_init(pthread_mutex_t* _mutex, pthread_mutexattr_t* /*_attr*/)
 	inline int pthread_mutex_init(pthread_mutex_t* _mutex, pthread_mutexattr_t* /*_attr*/)
 	{
 	{
 #if BX_PLATFORM_WINRT
 #if BX_PLATFORM_WINRT
-        InitializeCriticalSectionEx(_mutex, 4000, 0);   // docs recommend 4000 spincount as sane default
+		InitializeCriticalSectionEx(_mutex, 4000, 0);   // docs recommend 4000 spincount as sane default
 #else
 #else
 		InitializeCriticalSection(_mutex);
 		InitializeCriticalSection(_mutex);
 #endif
 #endif

+ 2 - 2
include/bx/sem.h

@@ -203,7 +203,7 @@ namespace bx
 		Semaphore()
 		Semaphore()
 		{
 		{
 #if BX_PLATFORM_WINRT
 #if BX_PLATFORM_WINRT
-            m_handle = CreateSemaphoreEx(NULL, 0, LONG_MAX, NULL, 0, SEMAPHORE_ALL_ACCESS);
+			m_handle = CreateSemaphoreEx(NULL, 0, LONG_MAX, NULL, 0, SEMAPHORE_ALL_ACCESS);
 #else
 #else
 			m_handle = CreateSemaphore(NULL, 0, LONG_MAX, NULL);
 			m_handle = CreateSemaphore(NULL, 0, LONG_MAX, NULL);
 #endif
 #endif
@@ -226,7 +226,7 @@ namespace bx
 #if BX_PLATFORM_WINRT
 #if BX_PLATFORM_WINRT
 			return WAIT_OBJECT_0 == WaitForSingleObjectEx(m_handle, milliseconds, FALSE);
 			return WAIT_OBJECT_0 == WaitForSingleObjectEx(m_handle, milliseconds, FALSE);
 #else
 #else
-            return WAIT_OBJECT_0 == WaitForSingleObject(m_handle, milliseconds);
+			return WAIT_OBJECT_0 == WaitForSingleObject(m_handle, milliseconds);
 #endif
 #endif
 		}
 		}
 
 

+ 11 - 11
include/bx/thread.h

@@ -70,14 +70,14 @@ namespace bx
 				, NULL
 				, NULL
 				);
 				);
 #elif BX_PLATFORM_WINRT
 #elif BX_PLATFORM_WINRT
-            m_handle = CreateEventEx(nullptr, nullptr, CREATE_EVENT_MANUAL_RESET, EVENT_ALL_ACCESS);
-            auto workItemHandler = ref new WorkItemHandler([=](IAsyncAction^)
-            {
-                m_exitCode = threadFunc(this);
-                SetEvent(m_handle);
-            }, CallbackContext::Any);
-
-            ThreadPool::RunAsync(workItemHandler, WorkItemPriority::Normal, WorkItemOptions::TimeSliced);
+			m_handle = CreateEventEx(nullptr, nullptr, CREATE_EVENT_MANUAL_RESET, EVENT_ALL_ACCESS);
+			auto workItemHandler = ref new WorkItemHandler([=](IAsyncAction^)
+			{
+				m_exitCode = threadFunc(this);
+				SetEvent(m_handle);
+			}, CallbackContext::Any);
+
+			ThreadPool::RunAsync(workItemHandler, WorkItemPriority::Normal, WorkItemOptions::TimeSliced);
 #elif BX_PLATFORM_POSIX
 #elif BX_PLATFORM_POSIX
 			int result;
 			int result;
 			BX_UNUSED(result);
 			BX_UNUSED(result);
@@ -113,9 +113,9 @@ namespace bx
 			CloseHandle(m_handle);
 			CloseHandle(m_handle);
 			m_handle = INVALID_HANDLE_VALUE;
 			m_handle = INVALID_HANDLE_VALUE;
 #elif BX_PLATFORM_WINRT
 #elif BX_PLATFORM_WINRT
-            WaitForSingleObjectEx(m_handle, INFINITE, FALSE);
-            CloseHandle(m_handle);
-            m_handle = INVALID_HANDLE_VALUE;
+			WaitForSingleObjectEx(m_handle, INFINITE, FALSE);
+			CloseHandle(m_handle);
+			m_handle = INVALID_HANDLE_VALUE;
 #elif BX_PLATFORM_POSIX
 #elif BX_PLATFORM_POSIX
 			union
 			union
 			{
 			{