-/* $Id: bitmap.c,v 1.3 2002/09/07 15:12:40 chorns Exp $
+/* $Id: bitmap.c,v 1.7 2004/02/02 13:34:01 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* 20/08/99 Created by Eric Kohl
*/
-#define NTOS_USER_MODE
-#include <ntos.h>
+#include <ddk/ntddk.h>
+
#define NDEBUG
-#include <debug.h>
+#include <ntdll/ntdll.h>
#define ALIGN(x,align) (((x)+(align)-1) / (align))
/* FUNCTIONS *****************************************************************/
+/*
+ * @implemented
+ */
VOID
STDCALL
RtlInitializeBitMap (
}
+/*
+ * @implemented
+ */
BOOLEAN
STDCALL
RtlAreBitsClear (
}
+/*
+ * @implemented
+ */
BOOLEAN
STDCALL
RtlAreBitsSet (
}
+/*
+ * @implemented
+ */
VOID
STDCALL
RtlClearAllBits (
}
+/*
+ * @implemented
+ */
VOID
STDCALL
RtlClearBits (
}
+/*
+ * @implemented
+ */
ULONG
STDCALL
RtlFindClearBits (
}
+/*
+ * @implemented
+ */
ULONG
STDCALL
RtlFindClearBitsAndSet (
}
+/*
+ * @unimplemented
+ */
+ULONG STDCALL
+RtlFindClearRuns (PRTL_BITMAP BitMapHeader,
+ PRTL_BITMAP_RUN RunArray,
+ ULONG SizeOfRunArray,
+ BOOLEAN LocateLongestRuns)
+{
+ return (ULONG)-1;
+}
+
+
ULONG
STDCALL
RtlFindFirstRunClear (
}
+/*
+ * @unimplemented
+ */
+ULONG STDCALL
+RtlFindLastBackwardRunClear (IN PRTL_BITMAP BitMapHeader,
+ IN ULONG FromIndex,
+ IN PULONG StartingRunIndex)
+{
+ return (ULONG)-1;
+}
+
+
+/*
+ * @implemented
+ */
ULONG
STDCALL
RtlFindLongestRunClear (
}
+/*
+ * @implemented
+ */
ULONG
STDCALL
RtlFindLongestRunSet (
}
+/*
+ * @unimplemented
+ */
+ULONG STDCALL
+RtlFindNextForwardRunClear (IN PRTL_BITMAP BitMapHeader,
+ IN ULONG FromIndex,
+ IN PULONG StartingRunIndex)
+{
+ return (ULONG)-1;
+}
+
+
+/*
+ * @implemented
+ */
ULONG
STDCALL
RtlFindSetBits (
}
+/*
+ * @implemented
+ */
ULONG
STDCALL
RtlFindSetBitsAndClear (
}
+/*
+ * @implemented
+ */
ULONG
STDCALL
RtlNumberOfClearBits (
}
+/*
+ * @implemented
+ */
ULONG
STDCALL
RtlNumberOfSetBits (
}
+/*
+ * @implemented
+ */
VOID
STDCALL
RtlSetAllBits (
}
+/*
+ * @implemented
+ */
VOID
STDCALL
RtlSetBits (
}
}
+
+/*
+ * @implemented
+ */
+CCHAR STDCALL
+RtlFindLeastSignificantBit (IN ULONGLONG Set)
+{
+ int i;
+
+ if (Set == 0ULL)
+ return -1;
+
+ for (i = 0; i < 64; i++)
+ {
+ if (Set & (1 << i))
+ return (CCHAR)i;
+ }
+
+ return -1;
+}
+
+
+/*
+ * @implemented
+ */
+CCHAR STDCALL
+RtlFindMostSignificantBit (IN ULONGLONG Set)
+{
+ int i;
+
+ if (Set == 0ULL)
+ return -1;
+
+ for (i = 63; i >= 0; i--)
+ {
+ if (Set & (1 << i))
+ return (CCHAR)i;
+ }
+
+ return -1;
+}
+
/* EOF */