branch update for HEAD-2003091401
[reactos.git] / lib / kernel32 / thread / thread.c
index 0000791..319cec7 100644 (file)
@@ -35,11 +35,14 @@ _except_handler(EXCEPTION_RECORD *ExceptionRecord,
 }
 
 
-static VOID STDCALL
-ThreadStartup(LPTHREAD_START_ROUTINE lpStartAddress,
-             LPVOID lpParameter)
+__declspec(noreturn) void STDCALL
+ThreadStartup
+(
+ LPTHREAD_START_ROUTINE lpStartAddress,
+ LPVOID lpParameter
+)
 {
-  UINT uExitCode;
+  volatile UINT uExitCode = 0;
 
   __try1(_except_handler)
   {
@@ -54,7 +57,11 @@ ThreadStartup(LPTHREAD_START_ROUTINE lpStartAddress,
 }
 
 
-HANDLE STDCALL CreateThread
+/*
+ * @implemented
+ */
+HANDLE STDCALL
+CreateThread
 (
  LPSECURITY_ATTRIBUTES lpThreadAttributes,
  DWORD dwStackSize,
@@ -77,7 +84,11 @@ HANDLE STDCALL CreateThread
 }
 
 
-HANDLE STDCALL CreateRemoteThread
+/*
+ * @implemented
+ */
+HANDLE STDCALL
+CreateRemoteThread
 (
  HANDLE hProcess,
  LPSECURITY_ATTRIBUTES lpThreadAttributes,
@@ -88,7 +99,6 @@ HANDLE STDCALL CreateRemoteThread
  LPDWORD lpThreadId
 )
 {
- PSECURITY_DESCRIPTOR pSD = NULL;
  HANDLE hThread;
  CLIENT_ID cidClientId;
  NTSTATUS nErrCode;
@@ -238,6 +248,10 @@ HANDLE STDCALL CreateRemoteThread
  return hThread;
 }
 
+
+/*
+ * @implemented
+ */
 PTEB
 GetTeb(VOID)
 {
@@ -245,6 +259,9 @@ GetTeb(VOID)
 }
 
 
+/*
+ * @implemented
+ */
 WINBOOL STDCALL
 SwitchToThread(VOID)
 {
@@ -254,6 +271,9 @@ SwitchToThread(VOID)
 }
 
 
+/*
+ * @implemented
+ */
 DWORD STDCALL
 GetCurrentThreadId(VOID)
 {
@@ -261,6 +281,9 @@ GetCurrentThreadId(VOID)
 }
 
 
+/*
+ * @implemented
+ */
 VOID STDCALL
 ExitThread(DWORD uExitCode)
 {
@@ -291,9 +314,13 @@ ExitThread(DWORD uExitCode)
     {
       SetLastErrorByStatus(Status);
     }
+  for(;;); /* GCC complains noreturn function should not return */
 }
 
 
+/*
+ * @implemented
+ */
 WINBOOL STDCALL
 GetThreadTimes(HANDLE hThread,
               LPFILETIME lpCreationTime,
@@ -325,6 +352,9 @@ GetThreadTimes(HANDLE hThread,
 }
 
 
+/*
+ * @implemented
+ */
 WINBOOL STDCALL
 GetThreadContext(HANDLE hThread,
                 LPCONTEXT lpContext)
@@ -343,6 +373,9 @@ GetThreadContext(HANDLE hThread,
 }
 
 
+/*
+ * @implemented
+ */
 WINBOOL STDCALL
 SetThreadContext(HANDLE hThread,
                 CONST CONTEXT *lpContext)
@@ -361,6 +394,9 @@ SetThreadContext(HANDLE hThread,
 }
 
 
+/*
+ * @implemented
+ */
 WINBOOL STDCALL
 GetExitCodeThread(HANDLE hThread,
                  LPDWORD lpExitCode)
@@ -386,6 +422,9 @@ GetExitCodeThread(HANDLE hThread,
 }
 
 
+/*
+ * @implemented
+ */
 DWORD STDCALL
 ResumeThread(HANDLE hThread)
 {
@@ -404,6 +443,9 @@ ResumeThread(HANDLE hThread)
 }
 
 
+/*
+ * @implemented
+ */
 WINBOOL STDCALL
 TerminateThread(HANDLE hThread,
                DWORD dwExitCode)
@@ -428,6 +470,9 @@ TerminateThread(HANDLE hThread,
 }
 
 
+/*
+ * @implemented
+ */
 DWORD STDCALL
 SuspendThread(HANDLE hThread)
 {
@@ -446,6 +491,9 @@ SuspendThread(HANDLE hThread)
 }
 
 
+/*
+ * @implemented
+ */
 DWORD STDCALL
 SetThreadAffinityMask(HANDLE hThread,
                      DWORD dwThreadAffinityMask)
@@ -479,6 +527,9 @@ SetThreadAffinityMask(HANDLE hThread,
 }
 
 
+/*
+ * @implemented
+ */
 WINBOOL STDCALL
 SetThreadPriority(HANDLE hThread,
                  int nPriority)
@@ -501,6 +552,9 @@ SetThreadPriority(HANDLE hThread,
 }
 
 
+/*
+ * @implemented
+ */
 int STDCALL
 GetThreadPriority(HANDLE hThread)
 {
@@ -523,6 +577,9 @@ GetThreadPriority(HANDLE hThread)
 }
 
 
+/*
+ * @implemented
+ */
 WINBOOL STDCALL
 GetThreadPriorityBoost(IN HANDLE hThread,
                       OUT PBOOL pDisablePriorityBoost)
@@ -548,6 +605,9 @@ GetThreadPriorityBoost(IN HANDLE hThread,
 }
 
 
+/*
+ * @implemented
+ */
 WINBOOL STDCALL
 SetThreadPriorityBoost(IN HANDLE hThread,
                       IN WINBOOL bDisablePriorityBoost)
@@ -571,6 +631,9 @@ SetThreadPriorityBoost(IN HANDLE hThread,
 }
 
 
+/*
+ * @implemented
+ */
 WINBOOL STDCALL
 GetThreadSelectorEntry(IN HANDLE hThread,
                       IN DWORD dwSelector,
@@ -581,6 +644,9 @@ GetThreadSelectorEntry(IN HANDLE hThread,
 }
 
 
+/*
+ * @implemented
+ */
 WINBOOL STDCALL
 SetThreadIdealProcessor(HANDLE hThread,
                        DWORD dwIdealProcessor)