From 7fbe844acc56e57755095efe138c2f36aab4f989 Mon Sep 17 00:00:00 2001 From: Emanuele Aliberti Date: Tue, 30 May 2000 23:41:06 +0000 Subject: [PATCH] Minor changes to kernel32. svn path=/trunk/; revision=1168 --- reactos/lib/kernel32/thread/thread.c | 25 +++++++++++++------------ reactos/lib/kernel32/thread/tls.c | 6 +++++- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/reactos/lib/kernel32/thread/thread.c b/reactos/lib/kernel32/thread/thread.c index 616a06096f7..7d2b5b44c9c 100644 --- a/reactos/lib/kernel32/thread/thread.c +++ b/reactos/lib/kernel32/thread/thread.c @@ -1,4 +1,4 @@ -/* $Id: thread.c,v 1.14 2000/04/14 01:48:26 ekohl Exp $ +/* $Id: thread.c,v 1.15 2000/05/30 23:41:06 ea Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries @@ -20,6 +20,7 @@ #define NDEBUG #include +#include /* FUNCTIONS *****************************************************************/ @@ -173,7 +174,7 @@ VOID STDCALL ExitThread(UINT uExitCode) uExitCode); if (!NT_SUCCESS(errCode)) { - SetLastError(RtlNtStatusToDosError(errCode)); + SetLastErrorByStatus(errCode); } } @@ -194,7 +195,7 @@ WINBOOL STDCALL GetThreadTimes(HANDLE hThread, &ReturnLength); if (!NT_SUCCESS(errCode)) { - SetLastError(RtlNtStatusToDosError(errCode)); + SetLastErrorByStatus(errCode); return FALSE; } memcpy(lpCreationTime, &KernelUserTimes.CreateTime, sizeof(FILETIME)); @@ -214,7 +215,7 @@ WINBOOL STDCALL GetThreadContext(HANDLE hThread, lpContext); if (!NT_SUCCESS(errCode)) { - SetLastError(RtlNtStatusToDosError(errCode)); + SetLastErrorByStatus(errCode); return FALSE; } return TRUE; @@ -229,7 +230,7 @@ WINBOOL STDCALL SetThreadContext(HANDLE hThread, (void *)lpContext); if (!NT_SUCCESS(errCode)) { - SetLastError(RtlNtStatusToDosError(errCode)); + SetLastErrorByStatus(errCode); return FALSE; } return TRUE; @@ -249,7 +250,7 @@ WINBOOL STDCALL GetExitCodeThread(HANDLE hThread, &DataWritten); if (!NT_SUCCESS(errCode)) { - SetLastError(RtlNtStatusToDosError(errCode)); + SetLastErrorByStatus(errCode); return FALSE; } memcpy(lpExitCode, &ThreadBasic.ExitStatus, sizeof(DWORD)); @@ -265,7 +266,7 @@ DWORD STDCALL ResumeThread(HANDLE hThread) &PreviousResumeCount); if (!NT_SUCCESS(errCode)) { - SetLastError(RtlNtStatusToDosError(errCode)); + SetLastErrorByStatus(errCode); return -1; } return PreviousResumeCount; @@ -285,7 +286,7 @@ TerminateThread ( dwExitCode); if (!NT_SUCCESS(errCode)) { - SetLastError(RtlNtStatusToDosError(errCode)); + SetLastErrorByStatus(errCode); return FALSE; } return TRUE; @@ -301,7 +302,7 @@ DWORD STDCALL SuspendThread(HANDLE hThread) &PreviousSuspendCount); if (!NT_SUCCESS(errCode)) { - SetLastError(RtlNtStatusToDosError(errCode)); + SetLastErrorByStatus(errCode); return -1; } return PreviousSuspendCount; @@ -327,7 +328,7 @@ WINBOOL STDCALL SetThreadPriority(HANDLE hThread, &DataWritten); if (!NT_SUCCESS(errCode)) { - SetLastError(RtlNtStatusToDosError(errCode)); + SetLastErrorByStatus(errCode); return FALSE; } ThreadBasic.BasePriority = nPriority; @@ -337,7 +338,7 @@ WINBOOL STDCALL SetThreadPriority(HANDLE hThread, sizeof(THREAD_BASIC_INFORMATION)); if (!NT_SUCCESS(errCode)) { - SetLastError(RtlNtStatusToDosError(errCode)); + SetLastErrorByStatus(errCode); return FALSE; } return TRUE; @@ -356,7 +357,7 @@ int STDCALL GetThreadPriority(HANDLE hThread) &DataWritten); if (!NT_SUCCESS(errCode)) { - SetLastError(RtlNtStatusToDosError(errCode)); + SetLastErrorByStatus(errCode); return THREAD_PRIORITY_ERROR_RETURN; } return ThreadBasic.BasePriority; diff --git a/reactos/lib/kernel32/thread/tls.c b/reactos/lib/kernel32/thread/tls.c index dd5d1a24141..4470c22ecda 100644 --- a/reactos/lib/kernel32/thread/tls.c +++ b/reactos/lib/kernel32/thread/tls.c @@ -1,4 +1,5 @@ -/* +/* $Id: tls.c,v 1.5 2000/05/30 23:41:06 ea Exp $ + * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/kernel32/thread/tls.c @@ -64,3 +65,6 @@ WINBOOL STDCALL TlsSetValue(DWORD dwTlsIndex, LPVOID lpTlsValue) NtCurrentTeb()->TlsSlots[dwTlsIndex] = lpTlsValue; return(TRUE); } + + +/* EOF */