-/*\r
- * ReactOS kernel\r
- * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team\r
- *\r
- * This program is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation; either version 2 of the License, or\r
- * (at your option) any later version.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with this program; if not, write to the Free Software\r
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r
- */\r
-/*\r
- * PROJECT: ReactOS kernel\r
- * FILE: ntoskrnl/ke/alert.c\r
- * PURPOSE: Alerts\r
- * PROGRAMMER: Alex Ionescu (alex@relsoft.net)\r
- * PORTABILITY: Unchecked\r
- * UPDATE HISTORY:\r
- * Created 22/05/98\r
- */\r
-\r
-/* INCLUDES *****************************************************************/\r
-\r
-#include <ntoskrnl.h>\r
-#define NDEBUG\r
-#include <internal/debug.h>\r
-\r
-/* GLOBALS *******************************************************************/\r
-\r
-\r
-/* FUNCTIONS *****************************************************************/\r
-\r
-\r
-BOOLEAN\r
-STDCALL\r
-KeTestAlertThread(IN KPROCESSOR_MODE AlertMode)\r
-/*\r
- * FUNCTION: Tests whether there are any pending APCs for the current thread\r
- * and if so the APCs will be delivered on exit from kernel mode\r
- */\r
-{\r
- KIRQL OldIrql;\r
- PKTHREAD Thread = KeGetCurrentThread();\r
- BOOLEAN OldState;\r
- \r
- ASSERT_IRQL_LESS_OR_EQUAL(DISPATCH_LEVEL);\r
- \r
- OldIrql = KeAcquireDispatcherDatabaseLock();\r
- KiAcquireSpinLock(&Thread->ApcQueueLock);\r
- \r
- /* NOTE: Albert Almeida claims Alerted[1] is never used. Two kind of \r
- * alerts _do_ seem useless. -Gunnar\r
- */\r
- OldState = Thread->Alerted[0];\r
- \r
- /* If the Thread is Alerted, Clear it */\r
- if (OldState) {\r
- Thread->Alerted[0] = FALSE; \r
- } else if ((AlertMode == UserMode) && (!IsListEmpty(&Thread->ApcState.ApcListHead[UserMode]))) {\r
- /* If the mode is User and the Queue isn't empty, set Pending */\r
- Thread->ApcState.UserApcPending = TRUE;\r
- }\r
- \r
- KiReleaseSpinLock(&Thread->ApcQueueLock);\r
- KeReleaseDispatcherDatabaseLock(OldIrql);\r
- return OldState;\r
-}\r
-\r
-\r
-VOID\r
-KeAlertThread(PKTHREAD Thread, KPROCESSOR_MODE AlertMode)\r
-{\r
+/* $Id:$
+ *
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * FILE: ntoskrnl/ke/alert.c
+ * PURPOSE: Alerts
+ *
+ * PROGRAMMERS: Alex Ionescu (alex@relsoft.net)
+ */
+
+/* INCLUDES *****************************************************************/
+
+#include <ntoskrnl.h>
+#define NDEBUG
+#include <internal/debug.h>
+
+/* GLOBALS *******************************************************************/
+
+
+/* FUNCTIONS *****************************************************************/
+
+
+BOOLEAN
+STDCALL
+KeTestAlertThread(IN KPROCESSOR_MODE AlertMode)
+/*
+ * FUNCTION: Tests whether there are any pending APCs for the current thread
+ * and if so the APCs will be delivered on exit from kernel mode
+ */
+{
+ KIRQL OldIrql;
+ PKTHREAD Thread = KeGetCurrentThread();
+ BOOLEAN OldState;
+
+ ASSERT_IRQL_LESS_OR_EQUAL(DISPATCH_LEVEL);
+
+ OldIrql = KeAcquireDispatcherDatabaseLock();
+ KiAcquireSpinLock(&Thread->ApcQueueLock);
+
+ /* NOTE: Albert Almeida claims Alerted[1] is never used. Two kind of
+ * alerts _do_ seem useless. -Gunnar
+ */
+ OldState = Thread->Alerted[0];
+
+ /* If the Thread is Alerted, Clear it */
+ if (OldState) {
+ Thread->Alerted[0] = FALSE;
+ } else if ((AlertMode == UserMode) && (!IsListEmpty(&Thread->ApcState.ApcListHead[UserMode]))) {
+ /* If the mode is User and the Queue isn't empty, set Pending */
+ Thread->ApcState.UserApcPending = TRUE;
+ }
+
+ KiReleaseSpinLock(&Thread->ApcQueueLock);
+ KeReleaseDispatcherDatabaseLock(OldIrql);
+ return OldState;
+}
+
+
+VOID
+KeAlertThread(PKTHREAD Thread, KPROCESSOR_MODE AlertMode)
+{