- Fix the way NlsOemLeadByteInfo is exported.

- Fix definition of PFAST_IO_UNLOCK_ALL_BY_KEY.
- Add IO_REPARSE and IO_REMOUNT definitions.
- Add IOCTL_CDROM_DISK_TYPE definition.
- Add FlagOn, BooleanFlagOn, SetFlag and ClearFlag definitions.
- Add FILE_READ_ONLY_VOLUME, FILE_SEQUENTIAL_WRITE_ONCE, FILE_SUPPORTS_TRANSACTIONS definitions.
- Add FSRTL_FLAG_ADVANCED_HEADER definition.
- Add FSRTL_FLAG2_PURGE_WHEN_MAPPED and FSRTL_FLAG2_IS_PAGING_FILE definitions.
- Add FILE_ID_FULL_DIR_INFORMATION and FILE_ID_BOTH_DIR_INFORMATION structures.
- Add FSRTL_FCB_HEADER_V0 and FSRTL_FCB_HEADER_V1 definitions.
- Add FSRTL_COMPARISION_RESULT enumeration.
- Add backwards compatibility support for non-AVL tree routines.
- Add RtlInsertElementGenericTableAvl, RtlDeleteElementGenericTableAvl, RtlLookupElementGenericTableAvl, RtlEnumerateGenericTableWithoutSplayingAvl prototypes.
- Add FsRtlSetupAdvancedHeader macro.
- Add FsRtlIsFatDbcsLegal prototype.
- Add FsRtlTeardownPerStreamContexts prototype.
- Add RtlFreeOemString, RtlOemStringToCountedUnicodeString, RtlUnicodeStringToCountedOemString, RtlOemToUnicodeN prototypes.
- Fix GenericTable prototypes in rtlfuncs.h
- It seems the ntoskrnl_i386.def exports file is totally incorrect with respect to mingw -- most FsRtl functions are not properly exported. We fixed the ones we need, someone needs to go fix this entire file.
- Add memcmp to the NTOS exports -- we're not entirely sure how you were even expecting 3rd party drivers to load in React?
- Fix FastFat's "VfatFastIoUnlockAllByKey" prototype to match the fixed up PFAST_IO_UNLOCK_ALL_BY_KEY definition.
- Clean-build-tested on i386.


svn path=/trunk/; revision=34611
This commit is contained in:
ReactOS Portable Systems Group 2008-07-20 19:19:02 +00:00
parent f3ddaf8067
commit 840143e28a
8 changed files with 241 additions and 30 deletions

View file

@ -114,7 +114,7 @@ VfatFastIoUnlockAll(IN PFILE_OBJECT FileObject,
static BOOLEAN NTAPI
VfatFastIoUnlockAllByKey(IN PFILE_OBJECT FileObject,
PEPROCESS ProcessId,
PVOID ProcessId,
ULONG Key,
OUT PIO_STATUS_BLOCK IoStatus,
IN PDEVICE_OBJECT DeviceObject)

View file

@ -62,6 +62,9 @@ extern "C" {
#define IOCTL_CDROM_RAW_READ \
CTL_CODE(IOCTL_CDROM_BASE, 0x000F, METHOD_OUT_DIRECT, FILE_READ_ACCESS)
#define IOCTL_CDROM_DISK_TYPE \
CTL_CODE(IOCTL_CDROM_BASE, 0x0010, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_CDROM_READ_Q_CHANNEL \
CTL_CODE(IOCTL_CDROM_BASE, 0x000B, METHOD_BUFFERED, FILE_READ_ACCESS)

View file

@ -55,6 +55,23 @@ extern "C" {
#define EX_PUSH_LOCK ULONG_PTR
#define PEX_PUSH_LOCK PULONG_PTR
#ifndef FlagOn
#define FlagOn(_F,_SF) ((_F) & (_SF))
#endif
#ifndef BooleanFlagOn
#define BooleanFlagOn(F,SF) ((BOOLEAN)(((F) & (SF)) != 0))
#endif
#ifndef SetFlag
#define SetFlag(_F,_SF) ((_F) |= (_SF))
#endif
#ifndef ClearFlag
#define ClearFlag(_F,_SF) ((_F) &= ~(_SF))
#endif
#include "csq.h"
typedef struct _SE_EXPORTS *PSE_EXPORTS;
@ -204,7 +221,10 @@ typedef enum _SECURITY_LOGON_TYPE
#define FILE_SUPPORTS_OBJECT_IDS 0x00010000
#define FILE_SUPPORTS_ENCRYPTION 0x00020000
#define FILE_NAMED_STREAMS 0x00040000
#define FILE_READ_ONLY_VOLUME 0x00080000
#define FILE_SEQUENTIAL_WRITE_ONCE 0x00100000
#define FILE_SUPPORTS_TRANSACTIONS 0x00200000
#define FILE_PIPE_BYTE_STREAM_TYPE 0x00000000
#define FILE_PIPE_MESSAGE_TYPE 0x00000001
@ -268,9 +288,13 @@ typedef enum _SECURITY_LOGON_TYPE
#define FSRTL_FLAG_ACQUIRE_MAIN_RSRC_EX (0x08)
#define FSRTL_FLAG_ACQUIRE_MAIN_RSRC_SH (0x10)
#define FSRTL_FLAG_USER_MAPPED_FILE (0x20)
#define FSRTL_FLAG_ADVANCED_HEADER (0x40)
#define FSRTL_FLAG_EOF_ADVANCE_ACTIVE (0x80)
#define FSRTL_FLAG2_DO_MODIFIED_WRITE (0x01)
#define FSRTL_FLAG2_SUPPORTS_FILTER_CONTEXTS (0x02)
#define FSRTL_FLAG2_PURGE_WHEN_MAPPED (0x04)
#define FSRTL_FLAG2_IS_PAGING_FILE (0x08)
#define FSRTL_FSP_TOP_LEVEL_IRP (0x01)
#define FSRTL_CACHE_TOP_LEVEL_IRP (0x02)
@ -880,6 +904,22 @@ typedef struct _FILE_FULL_DIRECTORY_INFORMATION {
ULONG EaSize;
WCHAR FileName[0];
} FILE_FULL_DIRECTORY_INFORMATION, *PFILE_FULL_DIRECTORY_INFORMATION;
typedef struct _FILE_ID_FULL_DIR_INFORMATION {
ULONG NextEntryOffset;
ULONG FileIndex;
LARGE_INTEGER CreationTime;
LARGE_INTEGER LastAccessTime;
LARGE_INTEGER LastWriteTime;
LARGE_INTEGER ChangeTime;
LARGE_INTEGER EndOfFile;
LARGE_INTEGER AllocationSize;
ULONG FileAttributes;
ULONG FileNameLength;
ULONG EaSize;
LARGE_INTEGER FileId;
WCHAR FileName[1];
} FILE_ID_FULL_DIR_INFORMATION, *PFILE_ID_FULL_DIR_INFORMATION;
typedef struct _FILE_BOTH_DIRECTORY_INFORMATION {
ULONG NextEntryOffset;
@ -898,6 +938,24 @@ typedef struct _FILE_BOTH_DIRECTORY_INFORMATION {
WCHAR FileName[0];
} FILE_BOTH_DIRECTORY_INFORMATION, *PFILE_BOTH_DIRECTORY_INFORMATION;
typedef struct _FILE_ID_BOTH_DIR_INFORMATION {
ULONG NextEntryOffset;
ULONG FileIndex;
LARGE_INTEGER CreationTime;
LARGE_INTEGER LastAccessTime;
LARGE_INTEGER LastWriteTime;
LARGE_INTEGER ChangeTime;
LARGE_INTEGER EndOfFile;
LARGE_INTEGER AllocationSize;
ULONG FileAttributes;
ULONG FileNameLength;
ULONG EaSize;
CCHAR ShortNameLength;
WCHAR ShortName[12];
LARGE_INTEGER FileId;
WCHAR FileName[1];
} FILE_ID_BOTH_DIR_INFORMATION, *PFILE_ID_BOTH_DIR_INFORMATION;
typedef struct _FILE_EA_INFORMATION {
ULONG EaSize;
} FILE_EA_INFORMATION, *PFILE_EA_INFORMATION;
@ -1284,6 +1342,10 @@ typedef struct FILE_ALLOCATED_RANGE_BUFFER {
} FILE_ALLOCATED_RANGE_BUFFER, *PFILE_ALLOCATED_RANGE_BUFFER;
#endif /* (VER_PRODUCTBUILD >= 2195) */
#define FSRTL_FCB_HEADER_V0 (0x00)
#define FSRTL_FCB_HEADER_V1 (0x01)
typedef struct _FSRTL_COMMON_FCB_HEADER {
CSHORT NodeTypeCode;
CSHORT NodeByteSize;
@ -1300,6 +1362,13 @@ typedef struct _FSRTL_COMMON_FCB_HEADER {
LARGE_INTEGER ValidDataLength;
} FSRTL_COMMON_FCB_HEADER, *PFSRTL_COMMON_FCB_HEADER;
typedef enum _FSRTL_COMPARISON_RESULT
{
LessThan = -1,
EqualTo = 0,
GreaterThan = 1
} FSRTL_COMPARISON_RESULT;
#if (VER_PRODUCTBUILD >= 2600)
typedef struct _FSRTL_ADVANCED_FCB_HEADER {
@ -1570,6 +1639,30 @@ typedef struct _RTL_GENERIC_TABLE
PVOID TableContext;
} RTL_GENERIC_TABLE, *PRTL_GENERIC_TABLE;
#undef PRTL_GENERIC_COMPARE_ROUTINE
#undef PRTL_GENERIC_ALLOCATE_ROUTINE
#undef PRTL_GENERIC_FREE_ROUTINE
#undef RTL_GENERIC_TABLE
#undef PRTL_GENERIC_TABLE
#define PRTL_GENERIC_COMPARE_ROUTINE PRTL_AVL_COMPARE_ROUTINE
#define PRTL_GENERIC_ALLOCATE_ROUTINE PRTL_AVL_ALLOCATE_ROUTINE
#define PRTL_GENERIC_FREE_ROUTINE PRTL_AVL_FREE_ROUTINE
#define RTL_GENERIC_TABLE RTL_AVL_TABLE
#define PRTL_GENERIC_TABLE PRTL_AVL_TABLE
#define RtlInitializeGenericTable RtlInitializeGenericTableAvl
#define RtlInsertElementGenericTable RtlInsertElementGenericTableAvl
#define RtlInsertElementGenericTableFull RtlInsertElementGenericTableFullAvl
#define RtlDeleteElementGenericTable RtlDeleteElementGenericTableAvl
#define RtlLookupElementGenericTable RtlLookupElementGenericTableAvl
#define RtlLookupElementGenericTableFull RtlLookupElementGenericTableFullAvl
#define RtlEnumerateGenericTable RtlEnumerateGenericTableAvl
#define RtlEnumerateGenericTableWithoutSplaying RtlEnumerateGenericTableWithoutSplayingAvl
#define RtlGetElementGenericTable RtlGetElementGenericTableAvl
#define RtlNumberGenericTableElements RtlNumberGenericTableElementsAvl
#define RtlIsGenericTableEmpty RtlIsGenericTableEmptyAvl
typedef struct _RTL_AVL_TABLE
{
RTL_BALANCED_LINKS BalancedRoot;
@ -1596,6 +1689,40 @@ RtlInitializeGenericTableAvl(
PVOID TableContext
);
NTSYSAPI
PVOID
NTAPI
RtlInsertElementGenericTableAvl (
PRTL_AVL_TABLE Table,
PVOID Buffer,
CLONG BufferSize,
PBOOLEAN NewElement OPTIONAL
);
NTSYSAPI
BOOLEAN
NTAPI
RtlDeleteElementGenericTableAvl (
PRTL_AVL_TABLE Table,
PVOID Buffer
);
NTSYSAPI
PVOID
NTAPI
RtlLookupElementGenericTableAvl (
PRTL_AVL_TABLE Table,
PVOID Buffer
);
NTSYSAPI
PVOID
NTAPI
RtlEnumerateGenericTableWithoutSplayingAvl (
PRTL_AVL_TABLE Table,
PVOID *RestartKey
);
#if defined(USE_LPC6432)
#define LPC_CLIENT_ID CLIENT_ID64
#define LPC_SIZE_T ULONGLONG
@ -2443,6 +2570,21 @@ ExWaitForRundownProtectionRelease (
#endif
#endif /* (VER_PRODUCTBUILD >= 2600) */
#define FsRtlSetupAdvancedHeader( _advhdr, _fmutx ) \
{ \
SetFlag( (_advhdr)->Flags, FSRTL_FLAG_ADVANCED_HEADER ); \
SetFlag( (_advhdr)->Flags2, FSRTL_FLAG2_SUPPORTS_FILTER_CONTEXTS ); \
(_advhdr)->Version = FSRTL_FCB_HEADER_V1; \
InitializeListHead( &(_advhdr)->FilterContexts ); \
if ((_fmutx) != NULL) { \
(_advhdr)->FastMutex = (_fmutx); \
} \
*((PULONG_PTR)(&(_advhdr)->PushLock)) = 0; \
/*ExInitializePushLock( &(_advhdr)->PushLock ); API Not avaliable downlevel*/\
(_advhdr)->FileContextSupportPointer = NULL; \
}
#define FlagOn(x, f) ((x) & (f))
NTKERNELAPI
@ -2680,6 +2822,17 @@ FsRtlDoesNameContainWildCards (
IN PUNICODE_STRING Name
);
NTKERNELAPI
BOOLEAN
NTAPI
FsRtlIsFatDbcsLegal (
IN ANSI_STRING DbcsName,
IN BOOLEAN WildCardsPermissible,
IN BOOLEAN PathNamePermissible,
IN BOOLEAN LeadingBackslashPermissible
);
#define FsRtlCompleteRequest(IRP,STATUS) { \
(IRP)->IoStatus.Status = (STATUS); \
IoCompleteRequest( (IRP), IO_DISK_INCREMENT ); \
@ -3139,6 +3292,13 @@ FsRtlPostPagingFileStackOverflow (
IN PFSRTL_STACK_OVERFLOW_ROUTINE StackOverflowRoutine
);
NTKERNELAPI
VOID
NTAPI
FsRtlTeardownPerStreamContexts (
IN PFSRTL_ADVANCED_FCB_HEADER AdvancedHeader
);
NTKERNELAPI
VOID
NTAPI
@ -4069,6 +4229,13 @@ RtlFreeHeap (
IN PVOID P
);
NTSYSAPI
VOID
NTAPI
RtlFreeOemString(
IN OUT POEM_STRING OemString
);
NTSYSAPI
VOID
NTAPI
@ -4173,6 +4340,24 @@ RtlUnicodeStringToOemString(
IN BOOLEAN AllocateDestinationString
);
NTSYSAPI
NTSTATUS
NTAPI
RtlOemStringToCountedUnicodeString(
IN OUT PUNICODE_STRING DestinationString,
IN PCOEM_STRING SourceString,
IN BOOLEAN AllocateDestinationString
);
NTSYSAPI
NTSTATUS
NTAPI
RtlUnicodeStringToCountedOemString(
IN OUT POEM_STRING DestinationString,
IN PCUNICODE_STRING SourceString,
IN BOOLEAN AllocateDestinationString
);
NTSYSAPI
NTSTATUS
NTAPI
@ -4246,6 +4431,17 @@ RtlUnicodeToMultiByteN(
IN ULONG BytesInUnicodeString
);
NTSYSAPI
NTSTATUS
NTAPI
RtlOemToUnicodeN(
OUT PWSTR UnicodeString,
IN ULONG MaxBytesInUnicodeString,
OUT PULONG BytesInUnicodeString OPTIONAL,
IN PCH OemString,
IN ULONG BytesInOemString
);
/* RTL Splay Tree Functions */
NTSYSAPI
PRTL_SPLAY_LINKS

View file

@ -3401,7 +3401,7 @@ typedef BOOLEAN
typedef BOOLEAN
(DDKAPI *PFAST_IO_UNLOCK_ALL_BY_KEY)(
IN struct _FILE_OBJECT *FileObject,
PEPROCESS ProcessId,
PVOID ProcessId,
ULONG Key,
OUT PIO_STATUS_BLOCK IoStatus,
IN struct _DEVICE_OBJECT *DeviceObject);
@ -4769,6 +4769,9 @@ typedef enum _CONFIGURATION_TYPE {
#define IO_FORCE_ACCESS_CHECK 0x001
#define IO_NO_PARAMETER_CHECKING 0x100
#define IO_REPARSE 0x0
#define IO_REMOUNT 0x1
typedef NTSTATUS
(DDKAPI *PIO_QUERY_DEVICE_ROUTINE)(
IN PVOID Context,
@ -7384,6 +7387,7 @@ NTAPI
ExRaiseDatatypeMisalignment(
VOID);
DECLSPEC_NORETURN
NTKERNELAPI
VOID
NTAPI

View file

@ -2602,6 +2602,7 @@ DbgUnLoadImageSymbols(
// Generic Table Functions
//
#if defined(NTOS_MODE_USER) || defined(_NTIFS_)
NTSYSAPI
PVOID
NTAPI
RtlInsertElementGenericTable(
@ -2611,6 +2612,7 @@ RtlInsertElementGenericTable(
OUT PBOOLEAN NewElement OPTIONAL
);
NTSYSAPI
PVOID
NTAPI
RtlInsertElementGenericTableFull(
@ -2622,12 +2624,14 @@ RtlInsertElementGenericTableFull(
IN TABLE_SEARCH_RESULT SearchResult
);
NTSYSAPI
BOOLEAN
NTAPI
RtlIsGenericTableEmpty(
IN PRTL_GENERIC_TABLE Table
);
NTSYSAPI
PVOID
NTAPI
RtlLookupElementGenericTableFull(

View file

@ -31,8 +31,9 @@ BOOLEAN NlsMbOemCodePageTag = FALSE; /* exported */
PWCHAR NlsOemToUnicodeTable = NULL;
PCHAR NlsUnicodeToOemTable =NULL;
PWCHAR NlsDbcsUnicodeToOemTable = NULL;
PUSHORT NlsOemLeadByteInfo = NULL; /* exported */
PUSHORT _NlsOemLeadByteInfo = NULL; /* exported */
#define NlsOemLeadByteInfo _NlsOemLeadByteInfo
#define INIT_FUNCTION
/* FUNCTIONS *****************************************************************/

View file

@ -84,13 +84,15 @@
#define ExSemaphoreObjectType _ExSemaphoreObjectType
#define KdDebuggerEnabled _KdDebuggerEnabled
#define KdDebuggerNotPresent _KdDebuggerNotPresent
#define NlsOemLeadByteInfo _NlsOemLeadByteInfo
extern PUSHORT _NlsOemLeadByteInfo;
#define FsRtlLegalAnsiCharacterArray _FsRtlLegalAnsiCharacterArray
#undef LEGAL_ANSI_CHARACTER_ARRAY
#undef NLS_MB_CODE_PAGE_TAG
#undef NLS_OEM_LEAD_BYTE_INFO
#define LEGAL_ANSI_CHARACTER_ARRAY FsRtlLegalAnsiCharacterArray
#define NLS_MB_CODE_PAGE_TAG NlsMbOemCodePageTag
#define NLS_OEM_LEAD_BYTE_INFO NlsOemLeadByteInfo
#define NLS_OEM_LEAD_BYTE_INFO _NlsOemLeadByteInfo
#undef KD_DEBUGGER_ENABLED
#undef KD_DEBUGGER_NOT_PRESENT
#define KD_DEBUGGER_ENABLED KdDebuggerEnabled

View file

@ -186,21 +186,21 @@ FsRtlAcquireFileExclusive
FsRtlAddLargeMcbEntry
FsRtlAddMcbEntry
FsRtlAddToTunnelCache
FsRtlAllocateFileLock
FsRtlAllocateFileLock@8
FsRtlAllocatePool
FsRtlAllocatePoolWithQuota
FsRtlAllocatePoolWithQuotaTag
FsRtlAllocatePoolWithTag
FsRtlAllocatePoolWithTag@12
FsRtlAllocateResource
FsRtlAreNamesEqual@16
FsRtlBalanceReads
FsRtlCheckLockForReadAccess@8
FsRtlCheckLockForWriteAccess@8
FsRtlCheckOplock
FsRtlCopyRead
FsRtlCheckOplock@20
FsRtlCopyRead@32
FsRtlCopyWrite
FsRtlCreateSectionForDataScan@40
FsRtlCurrentBatchOplock
FsRtlCurrentBatchOplock@4
FsRtlDeleteKeyFromTunnelCache
FsRtlDeleteTunnelCache
FsRtlDeregisterUncProvider
@ -208,13 +208,13 @@ FsRtlDissectDbcs
FsRtlDissectName@16
FsRtlDoesDbcsContainWildCards
FsRtlDoesNameContainWildCards@4
FsRtlFastCheckLockForRead
FsRtlFastCheckLockForRead@24
FsRtlFastCheckLockForWrite
FsRtlFastUnlockAll@16
FsRtlFastUnlockAllByKey
FsRtlFastUnlockSingle
FsRtlFastUnlockAllByKey@20
FsRtlFastUnlockSingle@32
FsRtlFindInTunnelCache
FsRtlFreeFileLock
FsRtlFreeFileLock@4
FsRtlGetFileSize
;FsRtlGetNextBaseMcbEntry
FsRtlGetNextFileLock
@ -233,7 +233,7 @@ FsRtlInitializeTunnelCache
FsRtlInsertPerFileObjectContext
FsRtlInsertPerStreamContext
FsRtlIsDbcsInExpression
FsRtlIsFatDbcsLegal
FsRtlIsFatDbcsLegal@20
FsRtlIsHpfsDbcsLegal
FsRtlIsNameInExpression@16
FsRtlIsNtstatusExpected@4
@ -252,31 +252,31 @@ FsRtlLookupPerFileObjectContext
FsRtlLookupPerStreamContextInternal
FsRtlMdlRead
FsRtlMdlReadComplete
FsRtlMdlReadCompleteDev
FsRtlMdlReadDev
FsRtlMdlReadCompleteDev@12
FsRtlMdlReadDev@28
FsRtlMdlWriteComplete
FsRtlMdlWriteCompleteDev
FsRtlNormalizeNtstatus
FsRtlMdlWriteCompleteDev@16
FsRtlNormalizeNtstatus@8
FsRtlNotifyChangeDirectory
FsRtlNotifyCleanup
FsRtlNotifyCleanup@12
FsRtlNotifyFilterChangeDirectory
FsRtlNotifyFilterReportChange
FsRtlNotifyFullChangeDirectory@40
FsRtlNotifyFullReportChange
FsRtlNotifyInitializeSync
FsRtlNotifyInitializeSync@4
FsRtlNotifyReportChange
FsRtlNotifyUninitializeSync
FsRtlNotifyVolumeEvent
FsRtlNotifyUninitializeSync@4
FsRtlNotifyVolumeEvent@8
;FsRtlNumberOfRunsInBaseMcb
FsRtlNumberOfRunsInLargeMcb
FsRtlNumberOfRunsInMcb
FsRtlOplockFsctrl
FsRtlOplockIsFastIoPossible
FsRtlOplockFsctrl@12
FsRtlOplockIsFastIoPossible@4
FsRtlPostPagingFileStackOverflow
FsRtlPostStackOverflow
FsRtlPrepareMdlWrite
FsRtlPrepareMdlWriteDev
FsRtlPrivateLock
FsRtlPrepareMdlWriteDev@28
FsRtlPrivateLock@48
FsRtlProcessFileLock@12
FsRtlRegisterFileSystemFilterCallbacks
FsRtlRegisterUncProvider
@ -291,7 +291,7 @@ FsRtlResetLargeMcb
;FsRtlSplitBaseMcb
FsRtlSplitLargeMcb
FsRtlSyncVolumes
FsRtlTeardownPerStreamContexts
FsRtlTeardownPerStreamContexts@4
;FsRtlTruncateBaseMcb
FsRtlTruncateLargeMcb
FsRtlTruncateMcb
@ -299,7 +299,7 @@ FsRtlTruncateMcb
FsRtlUninitializeFileLock@4
FsRtlUninitializeLargeMcb
FsRtlUninitializeMcb
FsRtlUninitializeOplock
FsRtlUninitializeOplock@4
HalDispatchTable=_HalDispatchTable
@HalExamineMBR@16
HalPrivateDispatchTable DATA
@ -802,7 +802,7 @@ NlsLeadByteInfo DATA
NlsMbCodePageTag DATA
NlsMbOemCodePageTag DATA
NlsOemCodePage DATA
NlsOemLeadByteInfo DATA
NlsOemLeadByteInfo=_NlsOemLeadByteInfo
NtAddAtom@12
NtAdjustPrivilegesToken@24
NtAlertThread@4
@ -1549,6 +1549,7 @@ mbstowcs
mbtowc
memchr
memcpy
memcmp
memmove
memset
qsort