First fixes to support fastcall:
authorEric Kohl <eric.kohl@reactos.org>
Wed, 20 Jun 2001 13:00:53 +0000 (13:00 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Wed, 20 Jun 2001 13:00:53 +0000 (13:00 +0000)
- moved FILETIME
- removed inclusion of <windows.h> from ntoskrnl
- fixed typos

svn path=/trunk/; revision=1990

reactos/include/ntos/types.h
reactos/include/structs.h
reactos/ntoskrnl/cm/cm.h
reactos/ntoskrnl/ex/fmutex.c
reactos/ntoskrnl/hal/x86/fmutex.c
reactos/ntoskrnl/include/internal/xhal.h
reactos/ntoskrnl/rtl/error.c

index 63c38e5..b87b2df 100644 (file)
@@ -128,7 +128,7 @@ typedef union _LARGE_INTEGER
     DWORD LowPart;
     LONG  HighPart;
   } u;
-#ifdef ANONYMOUSUNIONS   
+#ifdef ANONYMOUSUNIONS
   struct
   {
     DWORD LowPart;
@@ -145,16 +145,22 @@ typedef union _ULARGE_INTEGER
     DWORD LowPart;
     DWORD HighPart;
   } u;
-#ifdef ANONYMOUSUNIONS   
+#ifdef ANONYMOUSUNIONS
   struct
   {
     DWORD LowPart;
     DWORD HighPart;
   };
-#endif /* ANONYMOUSUNIONS */   
+#endif /* ANONYMOUSUNIONS */
   ULONGLONG QuadPart;
 } ULARGE_INTEGER, *PULARGE_INTEGER;
 
+typedef struct _FILETIME
+{
+   DWORD dwLowDateTime;
+   DWORD dwHighDateTime;
+} FILETIME, *LPFILETIME, *PFILETIME;
+
 #define CONST const
 
 #ifdef i386
index 35ebeef..c52f38a 100644 (file)
@@ -293,11 +293,6 @@ typedef struct _browseinfo {
   int iImage;              
 } BROWSEINFO, *PBROWSEINFO, *LPBROWSEINFO; 
 
-typedef struct _FILETIME { 
-  DWORD dwLowDateTime; 
-  DWORD dwHighDateTime; 
-} FILETIME, *LPFILETIME, *PFILETIME; 
 typedef struct _BY_HANDLE_FILE_INFORMATION {
   DWORD    dwFileAttributes; 
   FILETIME ftCreationTime; 
index 9cf007c..bc19c68 100644 (file)
@@ -2,7 +2,6 @@
 #ifndef __INCLUDE_CM_H
 #define __INCLUDE_CM_H
 
-#include <windows.h>
 #include <ddk/ntddk.h>
 #include <internal/config.h>
 #include <internal/ob.h>
index 447ebf3..6876874 100644 (file)
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: fmutex.c,v 1.9 2001/03/16 18:11:21 dwelch Exp $
+/* $Id: fmutex.c,v 1.10 2001/06/20 12:57:32 ekohl Exp $
  *
  * PROJECT:         ReactOS kernel
  * FILE:            ntoskrnl/ex/fmutex.c
@@ -36,8 +36,8 @@
 
 /* FUNCTIONS *****************************************************************/
 
-VOID FASTCALL EXPORTED 
-ExAcquireFastMutexUnsafe (PFAST_MUTEX  FastMutex)
+VOID FASTCALL
+ExAcquireFastMutexUnsafe(PFAST_MUTEX FastMutex)
 {
    if (InterlockedDecrement(&FastMutex->Count) == 0)
      {
@@ -52,8 +52,8 @@ ExAcquireFastMutexUnsafe (PFAST_MUTEX FastMutex)
    FastMutex->Owner = KeGetCurrentThread();
 }
 
-VOID FASTCALL EXPORTED 
-ExReleaseFastMutexUnsafe (PFAST_MUTEX  FastMutex)
+VOID FASTCALL
+ExReleaseFastMutexUnsafe(PFAST_MUTEX FastMutex)
 {
    assert(FastMutex->Owner == KeGetCurrentThread());
    if (InterlockedIncrement(&FastMutex->Count) <= 0)
index 2553c4c..f2f6d82 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: fmutex.c,v 1.2 2000/08/30 19:33:28 dwelch Exp $
+/* $Id: fmutex.c,v 1.3 2001/06/20 12:59:18 ekohl Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS kernel
@@ -18,7 +18,7 @@
 
 /* FUNCTIONS *****************************************************************/
 
-VOID FASTCALL EXPORTED
+VOID FASTCALL
 ExAcquireFastMutex (PFAST_MUTEX        FastMutex)
 {
    KeEnterCriticalRegion();
@@ -36,7 +36,7 @@ ExAcquireFastMutex (PFAST_MUTEX       FastMutex)
 }
 
 
-VOID FASTCALL EXPORTED
+VOID FASTCALL
 ExReleaseFastMutex (PFAST_MUTEX        FastMutex)
 {
    assert(FastMutex->Owner == KeGetCurrentThread());
@@ -51,7 +51,7 @@ ExReleaseFastMutex (PFAST_MUTEX       FastMutex)
 }
 
 
-BOOLEAN FASTCALL EXPORTED
+BOOLEAN FASTCALL
 ExTryToAcquireFastMutex (PFAST_MUTEX   FastMutex)
 {
    UNIMPLEMENTED;
index 1e44512..d6c52db 100644 (file)
@@ -25,7 +25,7 @@ xHalIoSetPartitionInformation(IN PDEVICE_OBJECT DeviceObject,
                              IN ULONG PartitionNumber,
                              IN ULONG PartitionType);
 
-NTSTATUS STDCALL
+NTSTATUS FASTCALL
 xHalIoWritePartitionTable(IN PDEVICE_OBJECT DeviceObject,
                          IN ULONG SectorSize,
                          IN ULONG SectorsPerTrack,
index 92c5d43..0214614 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: error.c,v 1.1 2000/07/04 01:30:18 ekohl Exp $
+/* $Id: error.c,v 1.2 2001/06/20 13:00:53 ekohl Exp $
  *
  * COPYRIGHT:         See COPYING in the top level directory
  * PROJECT:           ReactOS kernel
 /* INCLUDES *****************************************************************/
 
 #include <ddk/ntddk.h>
-#include <windows.h>
 #include <errors.h>
 
 #define NDEBUG
 #include <internal/debug.h>
 
+#define HIWORD(l) ((WORD)(((DWORD)(l) >> 16) & 0xFFFF))
+#define LOWORD(l) ((WORD)(l))
 
 /* TYPES *******************************************************************/
 
@@ -825,20 +826,17 @@ RPC_NT_SS_CONTEXT_MISMATCH           ERROR_INVALID_HANDLE
 
 /* FUNCTIONS ***************************************************************/
 
-VOID
-STDCALL
-RtlAssert (
-       PVOID FailedAssertion,
-       PVOID FileName,
-       ULONG LineNumber,
-       PCHAR Message
-       )
+VOID STDCALL
+RtlAssert(PVOID FailedAssertion,
+         PVOID FileName,
+         ULONG LineNumber,
+         PCHAR Message)
 {
-       DbgPrint ("Assertion \'%s\' failed at %s line %d: %s\n",
-                 (PCHAR)FailedAssertion,
-                 (PCHAR)FileName,
-                 LineNumber,
-                 Message);
+   DbgPrint("Assertion \'%s\' failed at %s line %d: %s\n",
+           (PCHAR)FailedAssertion,
+           (PCHAR)FileName,
+           LineNumber,
+           Message);
 }
 
 
@@ -859,9 +857,8 @@ RtlAssert (
  * REMARK
  *     RtlNtStatusToDosErrorNoTeb() does the real work.
  */
-DWORD
-STDCALL
-RtlNtStatusToDosErrorNoTeb (NTSTATUS Status)
+DWORD STDCALL
+RtlNtStatusToDosErrorNoTeb(IN NTSTATUS Status)
 {
        PERROR_TABLE Table = (PERROR_TABLE)ErrorTable;
 
@@ -918,19 +915,16 @@ RtlNtStatusToDosErrorNoTeb (NTSTATUS Status)
  * REMARK
  *     RtlNtStatusToDosErrorNoTeb() does the real work.
  */
-DWORD
-STDCALL
-RtlNtStatusToDosError (
-       NTSTATUS        Status
-       )
+DWORD STDCALL
+RtlNtStatusToDosError(IN NTSTATUS Status)
 {
-       PNT_TEB Teb = NtCurrentTeb ();
+   PNT_TEB Teb = NtCurrentTeb ();
 
-       if (NULL != Teb)
-       {
-               Teb->LastStatusValue = Status;
-       }
-       return RtlNtStatusToDosErrorNoTeb (Status);
+   if (NULL != Teb)
+     {
+       Teb->LastStatusValue = Status;
+     }
+   return RtlNtStatusToDosErrorNoTeb(Status);
 }
 
 
@@ -955,18 +949,15 @@ RtlNtStatusToDosError (
  * REVISIONS
  *     1999-11-30 ea
  */
-INT
-STDCALL
-RtlNtStatusToPsxErrno (
-       IN      NTSTATUS        Status
-       )
+INT STDCALL
+RtlNtStatusToPsxErrno(IN NTSTATUS Status)
 {
 #if 0
-       switch (Status)
-       {
-       }
+   switch (Status)
+     {
+     }
 #endif
-       return -1; /* generic POSIX error */
+   return -1; /* generic POSIX error */
 }
 
 /* EOF */