mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
Removed obsolete linux header files
svn path=/trunk/; revision=1417
This commit is contained in:
parent
1c236a2886
commit
b60489a76a
64 changed files with 75 additions and 1186 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: halddk.h,v 1.5 2000/07/24 23:48:24 ekohl Exp $
|
||||
/* $Id: halddk.h,v 1.6 2000/10/22 16:34:38 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -10,8 +10,8 @@
|
|||
*/
|
||||
|
||||
|
||||
#ifndef __INCLUDE_INTERNAL_HAL_DDK_H
|
||||
#define __INCLUDE_INTERNAL_HAL_DDK_H
|
||||
#ifndef __INCLUDE_DDK_HALDDK_H
|
||||
#define __INCLUDE_DDK_HALDDK_H
|
||||
|
||||
/* HalReturnToFirmware */
|
||||
#define FIRMWARE_HALT 1
|
||||
|
@ -461,6 +461,13 @@ HalInitializeProcessor (
|
|||
ULONG ProcessorNumber
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
STDCALL
|
||||
HalInitSystem (
|
||||
ULONG BootPhase,
|
||||
PLOADER_PARAMETER_BLOCK LoaderBlock
|
||||
);
|
||||
|
||||
BOOLEAN
|
||||
STDCALL
|
||||
HalMakeBeep (
|
||||
|
@ -684,4 +691,4 @@ STDCALL
|
|||
WRITE_PORT_USHORT (PUSHORT Port, USHORT Value);
|
||||
|
||||
|
||||
#endif /* __INCLUDE_INTERNAL_HAL_DDK_H */
|
||||
#endif /* __INCLUDE_DDK_HALDDK_H */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: Makefile,v 1.2 2000/10/08 12:43:56 ekohl Exp $
|
||||
# $Id: Makefile,v 1.3 2000/10/22 16:36:48 ekohl Exp $
|
||||
#
|
||||
# ReactOS Operating System
|
||||
#
|
||||
|
@ -450,6 +450,7 @@ $(TARGETNAME).nostrip.exe: $(TARGETNAME).o $(TARGETNAME).a $(IE_DATA)
|
|||
-nostartfiles -nostdlib \
|
||||
-mdll \
|
||||
-o junk.tmp \
|
||||
-Wl,--subsystem,native \
|
||||
-Wl,--image-base,0xc0000000 \
|
||||
-Wl,--file-alignment,0x1000 \
|
||||
-Wl,--section-alignment,0x1000 \
|
||||
|
@ -468,6 +469,7 @@ $(TARGETNAME).nostrip.exe: $(TARGETNAME).o $(TARGETNAME).a $(IE_DATA)
|
|||
-Wl,-T,ntoskrnl.lnk \
|
||||
-mdll \
|
||||
-o $(TARGETNAME).nostrip.exe \
|
||||
-Wl,--subsystem,native \
|
||||
-Wl,--image-base,0xc0000000 \
|
||||
-Wl,--file-alignment,0x1000 \
|
||||
-Wl,--section-alignment,0x1000 \
|
||||
|
@ -484,6 +486,7 @@ $(TARGETNAME).exe: $(TARGETNAME).o $(TARGETNAME).a
|
|||
-nostartfiles -nostdlib \
|
||||
-mdll \
|
||||
-o junk.tmp \
|
||||
-Wl,--subsystem,native \
|
||||
-Wl,--image-base,0xc0000000 \
|
||||
-Wl,--file-alignment,0x1000 \
|
||||
-Wl,--section-alignment,0x1000 \
|
||||
|
@ -502,6 +505,7 @@ $(TARGETNAME).exe: $(TARGETNAME).o $(TARGETNAME).a
|
|||
-nostartfiles -nostdlib \
|
||||
-mdll \
|
||||
-o $(TARGETNAME).exe \
|
||||
-Wl,--subsystem,native \
|
||||
-Wl,--image-base,0xc0000000 \
|
||||
-Wl,--file-alignment,0x1000 \
|
||||
-Wl,--section-alignment,0x1000 \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: registry.c,v 1.45 2000/10/16 15:22:45 jean Exp $
|
||||
/* $Id: registry.c,v 1.46 2000/10/22 16:36:48 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -16,7 +16,6 @@
|
|||
#include <defines.h>
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/ob.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
|
|
@ -11,11 +11,8 @@
|
|||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
|
||||
#include <internal/debug.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/ntoskrnl.h> /* for sprintf */
|
||||
|
||||
|
||||
static PCHAR SeverityCodes[] = {"SUC", "INF", "ERR", "WRN"};
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: print.c,v 1.9 2000/05/25 15:55:08 ekohl Exp $
|
||||
/* $Id: print.c,v 1.10 2000/10/22 16:36:49 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -12,7 +12,6 @@
|
|||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <string.h>
|
||||
#include <internal/kd.h>
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: resource.c,v 1.14 2000/07/04 01:27:58 ekohl Exp $
|
||||
/* $Id: resource.c,v 1.15 2000/10/22 16:36:49 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -40,8 +40,6 @@
|
|||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/ke.h>
|
||||
#include <stddef.h>
|
||||
#include <internal/string.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: sysinfo.c,v 1.6 2000/08/26 16:19:40 ekohl Exp $
|
||||
/* $Id: sysinfo.c,v 1.7 2000/10/22 16:36:49 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -12,8 +12,6 @@
|
|||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <ddk/zwtypes.h>
|
||||
#include <string.h>
|
||||
#include <internal/ex.h>
|
||||
#include <internal/ldr.h>
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* $Id: time.c,v 1.10 2000/06/07 13:04:34 ekohl Exp $
|
||||
/* $Id: time.c,v 1.11 2000/10/22 16:36:49 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* FILE: kernel/excutive/time.c
|
||||
* FILE: ntoskrnl/ex/time.c
|
||||
* PURPOSE: Time
|
||||
* PROGRAMMER: David Welch (welch@mcmail.com)
|
||||
* UPDATE HISTORY:
|
||||
|
@ -13,7 +13,6 @@
|
|||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/ex.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <internal/debug.h>
|
||||
|
||||
|
|
|
@ -16,12 +16,11 @@
|
|||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/mm.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/mmhal.h>
|
||||
#include <internal/i386/segment.h>
|
||||
#include <internal/i386/hal.h>
|
||||
|
||||
|
||||
/* TYPES ******************************************************************/
|
||||
|
||||
typedef struct
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#ifndef __INTERNAL_DEBUG
|
||||
#define __INTERNAL_DEBUG
|
||||
|
||||
#include <internal/string.h>
|
||||
#include <internal/ntoskrnl.h>
|
||||
|
||||
#define UNIMPLEMENTED do {DbgPrint("%s at %s:%d is unimplemented, have a nice day\n",__FUNCTION__,__FILE__,__LINE__); for(;;); } while(0);
|
||||
|
|
|
@ -7,7 +7,4 @@
|
|||
#error "Unknown processor"
|
||||
#endif
|
||||
|
||||
BOOLEAN STDCALL HalInitSystem (ULONG BootPhase,
|
||||
PLOADER_PARAMETER_BLOCK LoaderBlock);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,491 +0,0 @@
|
|||
#ifndef _I386_STRING_H_
|
||||
#define _I386_STRING_H_
|
||||
|
||||
#if 0
|
||||
|
||||
/*
|
||||
* On a 486 or Pentium, we are better off not using the
|
||||
* byte string operations. But on a 386 or a PPro the
|
||||
* byte string ops are faster than doing it by hand
|
||||
* (MUCH faster on a Pentium).
|
||||
*
|
||||
* Also, the byte strings actually work correctly. Forget
|
||||
* the i486 routines for now as they may be broken..
|
||||
*/
|
||||
#if FIXED_486_STRING && (CPU == 486 || CPU == 586)
|
||||
#include <asm/string-486.h>
|
||||
#else
|
||||
|
||||
/*
|
||||
* This string-include defines all string functions as inline
|
||||
* functions. Use gcc. It also assumes ds=es=data space, this should be
|
||||
* normal. Most of the string-functions are rather heavily hand-optimized,
|
||||
* see especially strtok,strstr,str[c]spn. They should work, but are not
|
||||
* very easy to understand. Everything is done entirely within the register
|
||||
* set, making the functions fast and clean. String instructions have been
|
||||
* used through-out, making for "slightly" unclear code :-)
|
||||
*
|
||||
* NO Copyright (C) 1991, 1992 Linus Torvalds,
|
||||
* consider these trivial functions to be PD.
|
||||
*/
|
||||
|
||||
#define __HAVE_ARCH_STRCPY
|
||||
extern inline char * strcpy(char * dest,const char *src)
|
||||
{
|
||||
int d0, d1, d2;
|
||||
__asm__ __volatile__(
|
||||
"cld\n"
|
||||
"1:\tlodsb\n\t"
|
||||
"stosb\n\t"
|
||||
"testb %%al,%%al\n\t"
|
||||
"jne 1b"
|
||||
: "=&S" (d0), "=&D" (d1), "=&a" (d2)
|
||||
:"0" (src),"1" (dest) : "memory");
|
||||
return dest;
|
||||
}
|
||||
|
||||
#define __HAVE_ARCH_STRNCPY
|
||||
extern inline char * strncpy(char * dest,const char *src,size_t count)
|
||||
{
|
||||
int d0, d1, d2, d3;
|
||||
__asm__ __volatile__(
|
||||
"cld\n"
|
||||
"1:\tdecl %2\n\t"
|
||||
"js 2f\n\t"
|
||||
"lodsb\n\t"
|
||||
"stosb\n\t"
|
||||
"testb %%al,%%al\n\t"
|
||||
"jne 1b\n\t"
|
||||
"rep\n\t"
|
||||
"stosb\n"
|
||||
"2:"
|
||||
: "=&S" (d0), "=&D" (d1), "=&c" (d2), "=&a" (d3)
|
||||
:"0" (src),"1" (dest),"2" (count) : "memory");
|
||||
return dest;
|
||||
}
|
||||
|
||||
#define __HAVE_ARCH_STRCAT
|
||||
extern inline char * strcat(char * dest,const char * src)
|
||||
{
|
||||
int d0, d1, d2, d3;
|
||||
__asm__ __volatile__(
|
||||
"cld\n\t"
|
||||
"repne\n\t"
|
||||
"scasb\n\t"
|
||||
"decl %1\n"
|
||||
"1:\tlodsb\n\t"
|
||||
"stosb\n\t"
|
||||
"testb %%al,%%al\n\t"
|
||||
"jne 1b"
|
||||
: "=&S" (d0), "=&D" (d1), "=&a" (d2), "=&c" (d3)
|
||||
: "0" (src), "1" (dest), "2" (0), "3" (0xffffffff):"memory");
|
||||
return dest;
|
||||
}
|
||||
|
||||
#define __HAVE_ARCH_STRNCAT
|
||||
extern inline char * strncat(char * dest,const char * src,size_t count)
|
||||
{
|
||||
int d0, d1, d2, d3;
|
||||
__asm__ __volatile__(
|
||||
"cld\n\t"
|
||||
"repne\n\t"
|
||||
"scasb\n\t"
|
||||
"decl %1\n\t"
|
||||
"movl %8,%3\n"
|
||||
"1:\tdecl %3\n\t"
|
||||
"js 2f\n\t"
|
||||
"lodsb\n\t"
|
||||
"stosb\n\t"
|
||||
"testb %%al,%%al\n\t"
|
||||
"jne 1b\n"
|
||||
"2:\txorl %2,%2\n\t"
|
||||
"stosb"
|
||||
: "=&S" (d0), "=&D" (d1), "=&a" (d2), "=&c" (d3)
|
||||
: "0" (src),"1" (dest),"2" (0),"3" (0xffffffff), "g" (count)
|
||||
: "memory");
|
||||
return dest;
|
||||
}
|
||||
|
||||
#define __HAVE_ARCH_STRCMP
|
||||
extern inline int strcmp(const char * cs,const char * ct)
|
||||
{
|
||||
int d0, d1;
|
||||
register int __res;
|
||||
__asm__ __volatile__(
|
||||
"cld\n"
|
||||
"1:\tlodsb\n\t"
|
||||
"scasb\n\t"
|
||||
"jne 2f\n\t"
|
||||
"testb %%al,%%al\n\t"
|
||||
"jne 1b\n\t"
|
||||
"xorl %%eax,%%eax\n\t"
|
||||
"jmp 3f\n"
|
||||
"2:\tsbbl %%eax,%%eax\n\t"
|
||||
"orb $1,%%al\n"
|
||||
"3:"
|
||||
:"=a" (__res), "=&S" (d0), "=&D" (d1)
|
||||
:"1" (cs),"2" (ct));
|
||||
return __res;
|
||||
}
|
||||
|
||||
#define __HAVE_ARCH_STRNCMP
|
||||
extern inline int strncmp(const char * cs,const char * ct,size_t count)
|
||||
{
|
||||
register int __res;
|
||||
int d0, d1, d2;
|
||||
__asm__ __volatile__(
|
||||
"cld\n"
|
||||
"1:\tdecl %3\n\t"
|
||||
"js 2f\n\t"
|
||||
"lodsb\n\t"
|
||||
"scasb\n\t"
|
||||
"jne 3f\n\t"
|
||||
"testb %%al,%%al\n\t"
|
||||
"jne 1b\n"
|
||||
"2:\txorl %%eax,%%eax\n\t"
|
||||
"jmp 4f\n"
|
||||
"3:\tsbbl %%eax,%%eax\n\t"
|
||||
"orb $1,%%al\n"
|
||||
"4:"
|
||||
:"=a" (__res), "=&S" (d0), "=&D" (d1), "=&c" (d2)
|
||||
:"1" (cs),"2" (ct),"3" (count));
|
||||
return __res;
|
||||
}
|
||||
|
||||
#define __HAVE_ARCH_STRCHR
|
||||
extern inline char * strchr(const char * s, int c)
|
||||
{
|
||||
int d0;
|
||||
register char * __res;
|
||||
__asm__ __volatile__(
|
||||
"cld\n\t"
|
||||
"movb %%al,%%ah\n"
|
||||
"1:\tlodsb\n\t"
|
||||
"cmpb %%ah,%%al\n\t"
|
||||
"je 2f\n\t"
|
||||
"testb %%al,%%al\n\t"
|
||||
"jne 1b\n\t"
|
||||
"movl $1,%1\n"
|
||||
"2:\tmovl %1,%0\n\t"
|
||||
"decl %0"
|
||||
:"=a" (__res), "=&S" (d0) : "1" (s),"0" (c));
|
||||
return __res;
|
||||
}
|
||||
|
||||
#define __HAVE_ARCH_STRRCHR
|
||||
extern inline char * strrchr(const char * s, int c)
|
||||
{
|
||||
int d0, d1;
|
||||
register char * __res;
|
||||
__asm__ __volatile__(
|
||||
"cld\n\t"
|
||||
"movb %%al,%%ah\n"
|
||||
"1:\tlodsb\n\t"
|
||||
"cmpb %%ah,%%al\n\t"
|
||||
"jne 2f\n\t"
|
||||
"leal -1(%%esi),%0\n"
|
||||
"2:\ttestb %%al,%%al\n\t"
|
||||
"jne 1b"
|
||||
:"=g" (__res), "=&S" (d0), "=&a" (d1) :"0" (0),"1" (s),"2" (c));
|
||||
return __res;
|
||||
}
|
||||
|
||||
#define __HAVE_ARCH_STRLEN
|
||||
extern inline size_t strlen(const char * s)
|
||||
{
|
||||
int d0;
|
||||
register int __res;
|
||||
__asm__ __volatile__(
|
||||
"cld\n\t"
|
||||
"repne\n\t"
|
||||
"scasb\n\t"
|
||||
"notl %0\n\t"
|
||||
"decl %0"
|
||||
:"=c" (__res), "=&D" (d0) :"1" (s),"a" (0), "0" (0xffffffff));
|
||||
return __res;
|
||||
}
|
||||
|
||||
extern inline void * __memcpy(void * to, const void * from, size_t n)
|
||||
{
|
||||
int d0, d1, d2;
|
||||
__asm__ __volatile__(
|
||||
"cld\n\t"
|
||||
"rep ; movsl\n\t"
|
||||
"testb $2,%b4\n\t"
|
||||
"je 1f\n\t"
|
||||
"movsw\n"
|
||||
"1:\ttestb $1,%b4\n\t"
|
||||
"je 2f\n\t"
|
||||
"movsb\n"
|
||||
"2:"
|
||||
: "=&c" (d0), "=&D" (d1), "=&S" (d2)
|
||||
:"0" (n/4), "q" (n),"1" ((long) to),"2" ((long) from)
|
||||
: "memory");
|
||||
return (to);
|
||||
}
|
||||
|
||||
/*
|
||||
* This looks horribly ugly, but the compiler can optimize it totally,
|
||||
* as the count is constant.
|
||||
*/
|
||||
extern inline void * __constant_memcpy(void * to, const void * from, size_t n)
|
||||
{
|
||||
switch (n) {
|
||||
case 0:
|
||||
return to;
|
||||
case 1:
|
||||
*(unsigned char *)to = *(const unsigned char *)from;
|
||||
return to;
|
||||
case 2:
|
||||
*(unsigned short *)to = *(const unsigned short *)from;
|
||||
return to;
|
||||
case 3:
|
||||
*(unsigned short *)to = *(const unsigned short *)from;
|
||||
*(2+(unsigned char *)to) = *(2+(const unsigned char *)from);
|
||||
return to;
|
||||
case 4:
|
||||
*(unsigned long *)to = *(const unsigned long *)from;
|
||||
return to;
|
||||
case 6: /* for Ethernet addresses */
|
||||
*(unsigned long *)to = *(const unsigned long *)from;
|
||||
*(2+(unsigned short *)to) = *(2+(const unsigned short *)from);
|
||||
return to;
|
||||
case 8:
|
||||
*(unsigned long *)to = *(const unsigned long *)from;
|
||||
*(1+(unsigned long *)to) = *(1+(const unsigned long *)from);
|
||||
return to;
|
||||
case 12:
|
||||
*(unsigned long *)to = *(const unsigned long *)from;
|
||||
*(1+(unsigned long *)to) = *(1+(const unsigned long *)from);
|
||||
*(2+(unsigned long *)to) = *(2+(const unsigned long *)from);
|
||||
return to;
|
||||
case 16:
|
||||
*(unsigned long *)to = *(const unsigned long *)from;
|
||||
*(1+(unsigned long *)to) = *(1+(const unsigned long *)from);
|
||||
*(2+(unsigned long *)to) = *(2+(const unsigned long *)from);
|
||||
*(3+(unsigned long *)to) = *(3+(const unsigned long *)from);
|
||||
return to;
|
||||
case 20:
|
||||
*(unsigned long *)to = *(const unsigned long *)from;
|
||||
*(1+(unsigned long *)to) = *(1+(const unsigned long *)from);
|
||||
*(2+(unsigned long *)to) = *(2+(const unsigned long *)from);
|
||||
*(3+(unsigned long *)to) = *(3+(const unsigned long *)from);
|
||||
*(4+(unsigned long *)to) = *(4+(const unsigned long *)from);
|
||||
return to;
|
||||
}
|
||||
#define COMMON(x) \
|
||||
__asm__ __volatile__( \
|
||||
"cld\n\t" \
|
||||
"rep ; movsl" \
|
||||
x \
|
||||
: "=&c" (d0), "=&D" (d1), "=&S" (d2) \
|
||||
: "0" (n/4),"1" ((long) to),"2" ((long) from) \
|
||||
: "memory");
|
||||
{
|
||||
int d0, d1, d2;
|
||||
switch (n % 4) {
|
||||
case 0: COMMON(""); return to;
|
||||
case 1: COMMON("\n\tmovsb"); return to;
|
||||
case 2: COMMON("\n\tmovsw"); return to;
|
||||
default: COMMON("\n\tmovsw\n\tmovsb"); return to;
|
||||
}
|
||||
}
|
||||
|
||||
#undef COMMON
|
||||
}
|
||||
|
||||
#define __HAVE_ARCH_MEMCPY
|
||||
#define memcpy(t, f, n) \
|
||||
(__builtin_constant_p(n) ? \
|
||||
__constant_memcpy((t),(f),(n)) : \
|
||||
__memcpy((t),(f),(n)))
|
||||
|
||||
#define __HAVE_ARCH_MEMMOVE
|
||||
extern inline void * memmove(void * dest,const void * src, size_t n)
|
||||
{
|
||||
int d0, d1, d2;
|
||||
if (dest<src)
|
||||
__asm__ __volatile__(
|
||||
"cld\n\t"
|
||||
"rep\n\t"
|
||||
"movsb"
|
||||
: "=&c" (d0), "=&S" (d1), "=&D" (d2)
|
||||
:"0" (n),"1" (src),"2" (dest)
|
||||
: "memory");
|
||||
else
|
||||
__asm__ __volatile__(
|
||||
"std\n\t"
|
||||
"rep\n\t"
|
||||
"movsb\n\t"
|
||||
"cld"
|
||||
: "=&c" (d0), "=&S" (d1), "=&D" (d2)
|
||||
:"0" (n),
|
||||
"1" (n-1+(const char *)src),
|
||||
"2" (n-1+(char *)dest)
|
||||
:"memory");
|
||||
return dest;
|
||||
}
|
||||
|
||||
#define memcmp __builtin_memcmp
|
||||
|
||||
#define __HAVE_ARCH_MEMCHR
|
||||
extern inline void * memchr(const void * cs,int c,size_t count)
|
||||
{
|
||||
int d0;
|
||||
register void * __res;
|
||||
if (!count)
|
||||
return NULL;
|
||||
__asm__ __volatile__(
|
||||
"cld\n\t"
|
||||
"repne\n\t"
|
||||
"scasb\n\t"
|
||||
"je 1f\n\t"
|
||||
"movl $1,%0\n"
|
||||
"1:\tdecl %0"
|
||||
:"=D" (__res), "=&c" (d0) : "a" (c),"0" (cs),"1" (count));
|
||||
return __res;
|
||||
}
|
||||
|
||||
extern inline void * __memset_generic(void * s, char c,size_t count)
|
||||
{
|
||||
int d0, d1;
|
||||
__asm__ __volatile__(
|
||||
"cld\n\t"
|
||||
"rep\n\t"
|
||||
"stosb"
|
||||
: "=&c" (d0), "=&D" (d1)
|
||||
:"a" (c),"1" (s),"0" (count)
|
||||
:"memory");
|
||||
return s;
|
||||
}
|
||||
|
||||
/* we might want to write optimized versions of these later */
|
||||
#define __constant_count_memset(s,c,count) __memset_generic((s),(c),(count))
|
||||
|
||||
/*
|
||||
* memset(x,0,y) is a reasonably common thing to do, so we want to fill
|
||||
* things 32 bits at a time even when we don't know the size of the
|
||||
* area at compile-time..
|
||||
*/
|
||||
extern inline void * __constant_c_memset(void * s, unsigned long c, size_t count)
|
||||
{
|
||||
int d0, d1;
|
||||
__asm__ __volatile__(
|
||||
"cld\n\t"
|
||||
"rep ; stosl\n\t"
|
||||
"testb $2,%b3\n\t"
|
||||
"je 1f\n\t"
|
||||
"stosw\n"
|
||||
"1:\ttestb $1,%b3\n\t"
|
||||
"je 2f\n\t"
|
||||
"stosb\n"
|
||||
"2:"
|
||||
: "=&c" (d0), "=&D" (d1)
|
||||
:"a" (c), "q" (count), "0" (count/4), "1" ((long) s)
|
||||
:"memory");
|
||||
return (s);
|
||||
}
|
||||
|
||||
/* Added by Gertjan van Wingerde to make minix and sysv module work */
|
||||
#define __HAVE_ARCH_STRNLEN
|
||||
extern inline size_t strnlen(const char * s, size_t count)
|
||||
{
|
||||
int d0;
|
||||
register int __res;
|
||||
__asm__ __volatile__(
|
||||
"movl %2,%0\n\t"
|
||||
"jmp 2f\n"
|
||||
"1:\tcmpb $0,(%0)\n\t"
|
||||
"je 3f\n\t"
|
||||
"incl %0\n"
|
||||
"2:\tdecl %1\n\t"
|
||||
"cmpl $-1,%1\n\t"
|
||||
"jne 1b\n"
|
||||
"3:\tsubl %2,%0"
|
||||
:"=a" (__res), "=&d" (d0)
|
||||
:"c" (s),"1" (count));
|
||||
return __res;
|
||||
}
|
||||
/* end of additional stuff */
|
||||
|
||||
/*
|
||||
* This looks horribly ugly, but the compiler can optimize it totally,
|
||||
* as we by now know that both pattern and count is constant..
|
||||
*/
|
||||
extern inline void * __constant_c_and_count_memset(void * s, unsigned long pattern, size_t count)
|
||||
{
|
||||
switch (count) {
|
||||
case 0:
|
||||
return s;
|
||||
case 1:
|
||||
*(unsigned char *)s = pattern;
|
||||
return s;
|
||||
case 2:
|
||||
*(unsigned short *)s = pattern;
|
||||
return s;
|
||||
case 3:
|
||||
*(unsigned short *)s = pattern;
|
||||
*(2+(unsigned char *)s) = pattern;
|
||||
return s;
|
||||
case 4:
|
||||
*(unsigned long *)s = pattern;
|
||||
return s;
|
||||
}
|
||||
#define COMMON(x) \
|
||||
__asm__ __volatile__("cld\n\t" \
|
||||
"rep ; stosl" \
|
||||
x \
|
||||
: "=&c" (d0), "=&D" (d1) \
|
||||
: "a" (pattern),"0" (count/4),"1" ((long) s) \
|
||||
: "memory")
|
||||
{
|
||||
int d0, d1;
|
||||
switch (count % 4) {
|
||||
case 0: COMMON(""); return s;
|
||||
case 1: COMMON("\n\tstosb"); return s;
|
||||
case 2: COMMON("\n\tstosw"); return s;
|
||||
default: COMMON("\n\tstosw\n\tstosb"); return s;
|
||||
}
|
||||
}
|
||||
|
||||
#undef COMMON
|
||||
}
|
||||
|
||||
#define __constant_c_x_memset(s, c, count) \
|
||||
(__builtin_constant_p(count) ? \
|
||||
__constant_c_and_count_memset((s),(c),(count)) : \
|
||||
__constant_c_memset((s),(c),(count)))
|
||||
|
||||
#define __memset(s, c, count) \
|
||||
(__builtin_constant_p(count) ? \
|
||||
__constant_count_memset((s),(c),(count)) : \
|
||||
__memset_generic((s),(c),(count)))
|
||||
|
||||
#define __HAVE_ARCH_MEMSET
|
||||
#define memset(s, c, count) \
|
||||
(__builtin_constant_p(c) ? \
|
||||
__constant_c_x_memset((s),(0x01010101UL*(unsigned char)c),(count)) : \
|
||||
__memset((s),(c),(count)))
|
||||
|
||||
/*
|
||||
* find the first occurrence of byte 'c', or 1 past the area if none
|
||||
*/
|
||||
#define __HAVE_ARCH_MEMSCAN
|
||||
extern inline void * memscan(void * addr, int c, size_t size)
|
||||
{
|
||||
if (!size)
|
||||
return addr;
|
||||
__asm__("cld
|
||||
repnz; scasb
|
||||
jnz 1f
|
||||
dec %%edi
|
||||
1: "
|
||||
: "=D" (addr), "=c" (size)
|
||||
: "0" (addr), "1" (size), "a" (c));
|
||||
return addr;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
|
@ -36,13 +36,13 @@ typedef struct _MODULE_OBJECT
|
|||
CSHORT ObjectType;
|
||||
CSHORT ObjectSize;
|
||||
PVOID Base;
|
||||
ULONG Length;
|
||||
ULONG Length;
|
||||
unsigned int Flags;
|
||||
PVOID EntryPoint;
|
||||
LIST_ENTRY ListEntry;
|
||||
PWSTR Name;
|
||||
UNICODE_STRING Name;
|
||||
union
|
||||
{
|
||||
{
|
||||
struct
|
||||
{
|
||||
unsigned int NumberOfSyms;
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
/*
|
||||
* Some useful things
|
||||
*/
|
||||
|
||||
#ifndef _INTERNAL_STDDEF_H
|
||||
#define _INTERNAL_STDDEF_H
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL (0)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
@ -1,489 +0,0 @@
|
|||
#ifndef _I386_STRING_H_
|
||||
#define _I386_STRING_H_
|
||||
|
||||
wchar_t* wcsdup(wchar_t* src);
|
||||
|
||||
#if 0
|
||||
|
||||
#ifndef _LINUX_TYPES_H
|
||||
#include <internal/types.h>
|
||||
#endif
|
||||
|
||||
#ifndef _INTERNAL_STDDEF_H
|
||||
#include <internal/stddef.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
/*
|
||||
* This string-include defines all string functions as inline
|
||||
* functions. Use gcc. It also assumes ds=es=data space, this should be
|
||||
* normal. Most of the string-functions are rather heavily hand-optimized,
|
||||
* see especially strtok,strstr,str[c]spn. They should work, but are not
|
||||
* very easy to understand. Everything is done entirely within the register
|
||||
* set, making the functions fast and clean. String instructions have been
|
||||
* used through-out, making for "slightly" unclear code :-)
|
||||
*
|
||||
* NO Copyright (C) 1991, 1992 Linus Torvalds,
|
||||
* consider these trivial functions to be PD.
|
||||
*/
|
||||
|
||||
#define __HAVE_ARCH_STRCPY
|
||||
extern inline char * strcpy(char * dest,const char *src)
|
||||
{
|
||||
int d0, d1, d2;
|
||||
__asm__ __volatile__(
|
||||
"cld\n"
|
||||
"1:\tlodsb\n\t"
|
||||
"stosb\n\t"
|
||||
"testb %%al,%%al\n\t"
|
||||
"jne 1b"
|
||||
: "=&S" (d0), "=&D" (d1), "=&a" (d2)
|
||||
:"0" (src),"1" (dest) : "memory");
|
||||
return dest;
|
||||
}
|
||||
|
||||
#define __HAVE_ARCH_STRNCPY
|
||||
extern inline char * strncpy(char * dest,const char *src,size_t count)
|
||||
{
|
||||
int d0, d1, d2, d3;
|
||||
__asm__ __volatile__(
|
||||
"cld\n"
|
||||
"1:\tdecl %2\n\t"
|
||||
"js 2f\n\t"
|
||||
"lodsb\n\t"
|
||||
"stosb\n\t"
|
||||
"testb %%al,%%al\n\t"
|
||||
"jne 1b\n\t"
|
||||
"rep\n\t"
|
||||
"stosb\n"
|
||||
"2:"
|
||||
: "=&S" (d0), "=&D" (d1), "=&c" (d2), "=&a" (d3)
|
||||
:"0" (src),"1" (dest),"2" (count) : "memory");
|
||||
return dest;
|
||||
}
|
||||
|
||||
#define __HAVE_ARCH_STRCAT
|
||||
extern inline char * strcat(char * dest,const char * src)
|
||||
{
|
||||
int d0, d1, d2, d3;
|
||||
__asm__ __volatile__(
|
||||
"cld\n\t"
|
||||
"repne\n\t"
|
||||
"scasb\n\t"
|
||||
"decl %1\n"
|
||||
"1:\tlodsb\n\t"
|
||||
"stosb\n\t"
|
||||
"testb %%al,%%al\n\t"
|
||||
"jne 1b"
|
||||
: "=&S" (d0), "=&D" (d1), "=&a" (d2), "=&c" (d3)
|
||||
: "0" (src), "1" (dest), "2" (0), "3" (0xffffffff):"memory");
|
||||
return dest;
|
||||
}
|
||||
|
||||
#define __HAVE_ARCH_STRNCAT
|
||||
extern inline char * strncat(char * dest,const char * src,size_t count)
|
||||
{
|
||||
int d0, d1, d2, d3;
|
||||
__asm__ __volatile__(
|
||||
"cld\n\t"
|
||||
"repne\n\t"
|
||||
"scasb\n\t"
|
||||
"decl %1\n\t"
|
||||
"movl %8,%3\n"
|
||||
"1:\tdecl %3\n\t"
|
||||
"js 2f\n\t"
|
||||
"lodsb\n\t"
|
||||
"stosb\n\t"
|
||||
"testb %%al,%%al\n\t"
|
||||
"jne 1b\n"
|
||||
"2:\txorl %2,%2\n\t"
|
||||
"stosb"
|
||||
: "=&S" (d0), "=&D" (d1), "=&a" (d2), "=&c" (d3)
|
||||
: "0" (src),"1" (dest),"2" (0),"3" (0xffffffff), "g" (count)
|
||||
: "memory");
|
||||
return dest;
|
||||
}
|
||||
|
||||
#define __HAVE_ARCH_STRCMP
|
||||
extern inline int strcmp(const char * cs,const char * ct)
|
||||
{
|
||||
int d0, d1;
|
||||
register int __res;
|
||||
__asm__ __volatile__(
|
||||
"cld\n"
|
||||
"1:\tlodsb\n\t"
|
||||
"scasb\n\t"
|
||||
"jne 2f\n\t"
|
||||
"testb %%al,%%al\n\t"
|
||||
"jne 1b\n\t"
|
||||
"xorl %%eax,%%eax\n\t"
|
||||
"jmp 3f\n"
|
||||
"2:\tsbbl %%eax,%%eax\n\t"
|
||||
"orb $1,%%al\n"
|
||||
"3:"
|
||||
:"=a" (__res), "=&S" (d0), "=&D" (d1)
|
||||
:"1" (cs),"2" (ct));
|
||||
return __res;
|
||||
}
|
||||
|
||||
#define __HAVE_ARCH_STRNCMP
|
||||
extern inline int strncmp(const char * cs,const char * ct,size_t count)
|
||||
{
|
||||
register int __res;
|
||||
int d0, d1, d2;
|
||||
__asm__ __volatile__(
|
||||
"cld\n"
|
||||
"1:\tdecl %3\n\t"
|
||||
"js 2f\n\t"
|
||||
"lodsb\n\t"
|
||||
"scasb\n\t"
|
||||
"jne 3f\n\t"
|
||||
"testb %%al,%%al\n\t"
|
||||
"jne 1b\n"
|
||||
"2:\txorl %%eax,%%eax\n\t"
|
||||
"jmp 4f\n"
|
||||
"3:\tsbbl %%eax,%%eax\n\t"
|
||||
"orb $1,%%al\n"
|
||||
"4:"
|
||||
:"=a" (__res), "=&S" (d0), "=&D" (d1), "=&c" (d2)
|
||||
:"1" (cs),"2" (ct),"3" (count));
|
||||
return __res;
|
||||
}
|
||||
|
||||
#define __HAVE_ARCH_STRCHR
|
||||
extern inline char * strchr(const char * s, int c)
|
||||
{
|
||||
int d0;
|
||||
register char * __res;
|
||||
__asm__ __volatile__(
|
||||
"cld\n\t"
|
||||
"movb %%al,%%ah\n"
|
||||
"1:\tlodsb\n\t"
|
||||
"cmpb %%ah,%%al\n\t"
|
||||
"je 2f\n\t"
|
||||
"testb %%al,%%al\n\t"
|
||||
"jne 1b\n\t"
|
||||
"movl $1,%1\n"
|
||||
"2:\tmovl %1,%0\n\t"
|
||||
"decl %0"
|
||||
:"=a" (__res), "=&S" (d0) : "1" (s),"0" (c));
|
||||
return __res;
|
||||
}
|
||||
|
||||
#define __HAVE_ARCH_STRRCHR
|
||||
extern inline char * strrchr(const char * s, int c)
|
||||
{
|
||||
int d0, d1;
|
||||
register char * __res;
|
||||
__asm__ __volatile__(
|
||||
"cld\n\t"
|
||||
"movb %%al,%%ah\n"
|
||||
"1:\tlodsb\n\t"
|
||||
"cmpb %%ah,%%al\n\t"
|
||||
"jne 2f\n\t"
|
||||
"leal -1(%%esi),%0\n"
|
||||
"2:\ttestb %%al,%%al\n\t"
|
||||
"jne 1b"
|
||||
:"=g" (__res), "=&S" (d0), "=&a" (d1) :"0" (0),"1" (s),"2" (c));
|
||||
return __res;
|
||||
}
|
||||
|
||||
#define __HAVE_ARCH_STRLEN
|
||||
extern inline size_t strlen(const char * s)
|
||||
{
|
||||
int d0;
|
||||
register int __res;
|
||||
__asm__ __volatile__(
|
||||
"cld\n\t"
|
||||
"repne\n\t"
|
||||
"scasb\n\t"
|
||||
"notl %0\n\t"
|
||||
"decl %0"
|
||||
:"=c" (__res), "=&D" (d0) :"1" (s),"a" (0), "0" (0xffffffff));
|
||||
return __res;
|
||||
}
|
||||
|
||||
extern inline void * __memcpy(void * to, const void * from, size_t n)
|
||||
{
|
||||
int d0, d1, d2;
|
||||
__asm__ __volatile__(
|
||||
"cld\n\t"
|
||||
"rep ; movsl\n\t"
|
||||
"testb $2,%b4\n\t"
|
||||
"je 1f\n\t"
|
||||
"movsw\n"
|
||||
"1:\ttestb $1,%b4\n\t"
|
||||
"je 2f\n\t"
|
||||
"movsb\n"
|
||||
"2:"
|
||||
: "=&c" (d0), "=&D" (d1), "=&S" (d2)
|
||||
:"0" (n/4), "q" (n),"1" ((long) to),"2" ((long) from)
|
||||
: "memory");
|
||||
return (to);
|
||||
}
|
||||
|
||||
/*
|
||||
* This looks horribly ugly, but the compiler can optimize it totally,
|
||||
* as the count is constant.
|
||||
*/
|
||||
extern inline void * __constant_memcpy(void * to, const void * from, size_t n)
|
||||
{
|
||||
switch (n) {
|
||||
case 0:
|
||||
return to;
|
||||
case 1:
|
||||
*(unsigned char *)to = *(const unsigned char *)from;
|
||||
return to;
|
||||
case 2:
|
||||
*(unsigned short *)to = *(const unsigned short *)from;
|
||||
return to;
|
||||
case 3:
|
||||
*(unsigned short *)to = *(const unsigned short *)from;
|
||||
*(2+(unsigned char *)to) = *(2+(const unsigned char *)from);
|
||||
return to;
|
||||
case 4:
|
||||
*(unsigned long *)to = *(const unsigned long *)from;
|
||||
return to;
|
||||
case 6: /* for Ethernet addresses */
|
||||
*(unsigned long *)to = *(const unsigned long *)from;
|
||||
*(2+(unsigned short *)to) = *(2+(const unsigned short *)from);
|
||||
return to;
|
||||
case 8:
|
||||
*(unsigned long *)to = *(const unsigned long *)from;
|
||||
*(1+(unsigned long *)to) = *(1+(const unsigned long *)from);
|
||||
return to;
|
||||
case 12:
|
||||
*(unsigned long *)to = *(const unsigned long *)from;
|
||||
*(1+(unsigned long *)to) = *(1+(const unsigned long *)from);
|
||||
*(2+(unsigned long *)to) = *(2+(const unsigned long *)from);
|
||||
return to;
|
||||
case 16:
|
||||
*(unsigned long *)to = *(const unsigned long *)from;
|
||||
*(1+(unsigned long *)to) = *(1+(const unsigned long *)from);
|
||||
*(2+(unsigned long *)to) = *(2+(const unsigned long *)from);
|
||||
*(3+(unsigned long *)to) = *(3+(const unsigned long *)from);
|
||||
return to;
|
||||
case 20:
|
||||
*(unsigned long *)to = *(const unsigned long *)from;
|
||||
*(1+(unsigned long *)to) = *(1+(const unsigned long *)from);
|
||||
*(2+(unsigned long *)to) = *(2+(const unsigned long *)from);
|
||||
*(3+(unsigned long *)to) = *(3+(const unsigned long *)from);
|
||||
*(4+(unsigned long *)to) = *(4+(const unsigned long *)from);
|
||||
return to;
|
||||
}
|
||||
#define COMMON(x) \
|
||||
__asm__ __volatile__( \
|
||||
"cld\n\t" \
|
||||
"rep ; movsl" \
|
||||
x \
|
||||
: "=&c" (d0), "=&D" (d1), "=&S" (d2) \
|
||||
: "0" (n/4),"1" ((long) to),"2" ((long) from) \
|
||||
: "memory");
|
||||
{
|
||||
int d0, d1, d2;
|
||||
switch (n % 4) {
|
||||
case 0: COMMON(""); return to;
|
||||
case 1: COMMON("\n\tmovsb"); return to;
|
||||
case 2: COMMON("\n\tmovsw"); return to;
|
||||
default: COMMON("\n\tmovsw\n\tmovsb"); return to;
|
||||
}
|
||||
}
|
||||
|
||||
#undef COMMON
|
||||
}
|
||||
|
||||
#define __HAVE_ARCH_MEMCPY
|
||||
#define memcpy(t, f, n) \
|
||||
(__builtin_constant_p(n) ? \
|
||||
__constant_memcpy((t),(f),(n)) : \
|
||||
__memcpy((t),(f),(n)))
|
||||
|
||||
#define __HAVE_ARCH_MEMMOVE
|
||||
extern inline void * memmove(void * dest,const void * src, size_t n)
|
||||
{
|
||||
int d0, d1, d2;
|
||||
if (dest<src)
|
||||
__asm__ __volatile__(
|
||||
"cld\n\t"
|
||||
"rep\n\t"
|
||||
"movsb"
|
||||
: "=&c" (d0), "=&S" (d1), "=&D" (d2)
|
||||
:"0" (n),"1" (src),"2" (dest)
|
||||
: "memory");
|
||||
else
|
||||
__asm__ __volatile__(
|
||||
"std\n\t"
|
||||
"rep\n\t"
|
||||
"movsb\n\t"
|
||||
"cld"
|
||||
: "=&c" (d0), "=&S" (d1), "=&D" (d2)
|
||||
:"0" (n),
|
||||
"1" (n-1+(const char *)src),
|
||||
"2" (n-1+(char *)dest)
|
||||
:"memory");
|
||||
return dest;
|
||||
}
|
||||
|
||||
#define memcmp __builtin_memcmp
|
||||
|
||||
#define __HAVE_ARCH_MEMCHR
|
||||
extern inline void * memchr(const void * cs,int c,size_t count)
|
||||
{
|
||||
int d0;
|
||||
register void * __res;
|
||||
if (!count)
|
||||
return NULL;
|
||||
__asm__ __volatile__(
|
||||
"cld\n\t"
|
||||
"repne\n\t"
|
||||
"scasb\n\t"
|
||||
"je 1f\n\t"
|
||||
"movl $1,%0\n"
|
||||
"1:\tdecl %0"
|
||||
:"=D" (__res), "=&c" (d0) : "a" (c),"0" (cs),"1" (count));
|
||||
return __res;
|
||||
}
|
||||
|
||||
extern inline void * __memset_generic(void * s, char c,size_t count)
|
||||
{
|
||||
int d0, d1;
|
||||
__asm__ __volatile__(
|
||||
"cld\n\t"
|
||||
"rep\n\t"
|
||||
"stosb"
|
||||
: "=&c" (d0), "=&D" (d1)
|
||||
:"a" (c),"1" (s),"0" (count)
|
||||
:"memory");
|
||||
return s;
|
||||
}
|
||||
|
||||
/* we might want to write optimized versions of these later */
|
||||
#define __constant_count_memset(s,c,count) __memset_generic((s),(c),(count))
|
||||
|
||||
/*
|
||||
* memset(x,0,y) is a reasonably common thing to do, so we want to fill
|
||||
* things 32 bits at a time even when we don't know the size of the
|
||||
* area at compile-time..
|
||||
*/
|
||||
extern inline void * __constant_c_memset(void * s, unsigned long c, size_t count)
|
||||
{
|
||||
int d0, d1;
|
||||
__asm__ __volatile__(
|
||||
"cld\n\t"
|
||||
"rep ; stosl\n\t"
|
||||
"testb $2,%b3\n\t"
|
||||
"je 1f\n\t"
|
||||
"stosw\n"
|
||||
"1:\ttestb $1,%b3\n\t"
|
||||
"je 2f\n\t"
|
||||
"stosb\n"
|
||||
"2:"
|
||||
: "=&c" (d0), "=&D" (d1)
|
||||
:"a" (c), "q" (count), "0" (count/4), "1" ((long) s)
|
||||
:"memory");
|
||||
return (s);
|
||||
}
|
||||
|
||||
/* Added by Gertjan van Wingerde to make minix and sysv module work */
|
||||
#define __HAVE_ARCH_STRNLEN
|
||||
extern inline size_t strnlen(const char * s, size_t count)
|
||||
{
|
||||
int d0;
|
||||
register int __res;
|
||||
__asm__ __volatile__(
|
||||
"movl %2,%0\n\t"
|
||||
"jmp 2f\n"
|
||||
"1:\tcmpb $0,(%0)\n\t"
|
||||
"je 3f\n\t"
|
||||
"incl %0\n"
|
||||
"2:\tdecl %1\n\t"
|
||||
"cmpl $-1,%1\n\t"
|
||||
"jne 1b\n"
|
||||
"3:\tsubl %2,%0"
|
||||
:"=a" (__res), "=&d" (d0)
|
||||
:"c" (s),"1" (count));
|
||||
return __res;
|
||||
}
|
||||
/* end of additional stuff */
|
||||
|
||||
/*
|
||||
* This looks horribly ugly, but the compiler can optimize it totally,
|
||||
* as we by now know that both pattern and count is constant..
|
||||
*/
|
||||
extern inline void * __constant_c_and_count_memset(void * s, unsigned long pattern, size_t count)
|
||||
{
|
||||
switch (count) {
|
||||
case 0:
|
||||
return s;
|
||||
case 1:
|
||||
*(unsigned char *)s = pattern;
|
||||
return s;
|
||||
case 2:
|
||||
*(unsigned short *)s = pattern;
|
||||
return s;
|
||||
case 3:
|
||||
*(unsigned short *)s = pattern;
|
||||
*(2+(unsigned char *)s) = pattern;
|
||||
return s;
|
||||
case 4:
|
||||
*(unsigned long *)s = pattern;
|
||||
return s;
|
||||
}
|
||||
#define COMMON(x) \
|
||||
__asm__ __volatile__("cld\n\t" \
|
||||
"rep ; stosl" \
|
||||
x \
|
||||
: "=&c" (d0), "=&D" (d1) \
|
||||
: "a" (pattern),"0" (count/4),"1" ((long) s) \
|
||||
: "memory")
|
||||
{
|
||||
int d0, d1;
|
||||
switch (count % 4) {
|
||||
case 0: COMMON(""); return s;
|
||||
case 1: COMMON("\n\tstosb"); return s;
|
||||
case 2: COMMON("\n\tstosw"); return s;
|
||||
default: COMMON("\n\tstosw\n\tstosb"); return s;
|
||||
}
|
||||
}
|
||||
|
||||
#undef COMMON
|
||||
}
|
||||
|
||||
#define __constant_c_x_memset(s, c, count) \
|
||||
(__builtin_constant_p(count) ? \
|
||||
__constant_c_and_count_memset((s),(c),(count)) : \
|
||||
__constant_c_memset((s),(c),(count)))
|
||||
|
||||
#define __memset(s, c, count) \
|
||||
(__builtin_constant_p(count) ? \
|
||||
__constant_count_memset((s),(c),(count)) : \
|
||||
__memset_generic((s),(c),(count)))
|
||||
|
||||
#define __HAVE_ARCH_MEMSET
|
||||
#define memset(s, c, count) \
|
||||
(__builtin_constant_p(c) ? \
|
||||
__constant_c_x_memset((s),(0x01010101UL*(unsigned char)c),(count)) : \
|
||||
__memset((s),(c),(count)))
|
||||
|
||||
/*
|
||||
* find the first occurrence of byte 'c', or 1 past the area if none
|
||||
*/
|
||||
#define __HAVE_ARCH_MEMSCAN
|
||||
extern inline void * memscan(void * addr, int c, size_t size)
|
||||
{
|
||||
if (!size)
|
||||
return addr;
|
||||
__asm__("cld
|
||||
repnz; scasb
|
||||
jnz 1f
|
||||
dec %%edi
|
||||
1: "
|
||||
: "=D" (addr), "=c" (size)
|
||||
: "0" (addr), "1" (size), "a" (c));
|
||||
return addr;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -12,8 +12,6 @@
|
|||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/io.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/ob.h>
|
||||
#include <internal/mm.h>
|
||||
#include <internal/ps.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: create.c,v 1.32 2000/10/07 13:41:51 dwelch Exp $
|
||||
/* $Id: create.c,v 1.33 2000/10/22 16:36:50 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -15,7 +15,6 @@
|
|||
#include <internal/ob.h>
|
||||
#include <internal/io.h>
|
||||
#include <internal/id.h>
|
||||
#include <internal/string.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
@ -137,10 +136,8 @@ IopCreateFile (
|
|||
}
|
||||
DeviceObject = IoGetAttachedDevice(DeviceObject);
|
||||
}
|
||||
RtlInitUnicodeString (
|
||||
& (FileObject->FileName),
|
||||
wcsdup (RemainingPath)
|
||||
);
|
||||
RtlCreateUnicodeString(&(FileObject->FileName),
|
||||
RemainingPath);
|
||||
}
|
||||
DPRINT(
|
||||
"FileObject->FileName.Buffer %S\n",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: device.c,v 1.22 2000/09/12 10:12:11 jean Exp $
|
||||
/* $Id: device.c,v 1.23 2000/10/22 16:36:50 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -12,13 +12,10 @@
|
|||
/* INCLUDES ****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
|
||||
#include <internal/io.h>
|
||||
#include <internal/ob.h>
|
||||
#include <internal/ldr.h>
|
||||
#include <internal/id.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: irp.c,v 1.30 2000/10/11 20:50:34 dwelch Exp $
|
||||
/* $Id: irp.c,v 1.31 2000/10/22 16:36:50 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -31,7 +31,6 @@
|
|||
/* INCLUDES ****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <string.h>
|
||||
#include <internal/io.h>
|
||||
#include <internal/ps.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: rw.c,v 1.32 2000/10/11 20:50:34 dwelch Exp $
|
||||
/* $Id: rw.c,v 1.33 2000/10/22 16:36:50 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -13,8 +13,6 @@
|
|||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/io.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/ob.h>
|
||||
|
||||
#define NDEBUG
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: symlink.c,v 1.16 2000/08/24 19:09:12 ekohl Exp $
|
||||
/* $Id: symlink.c,v 1.17 2000/10/22 16:36:50 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -14,7 +14,6 @@
|
|||
#include <limits.h>
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/ob.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: kdebug.c,v 1.15 2000/10/07 13:41:51 dwelch Exp $
|
||||
/* $Id: kdebug.c,v 1.16 2000/10/22 16:36:50 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -12,8 +12,6 @@
|
|||
#include <ddk/ntddk.h>
|
||||
#include <internal/ntoskrnl.h>
|
||||
#include <internal/kd.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
|
||||
|
||||
/* serial debug connection */
|
||||
|
|
|
@ -12,8 +12,6 @@
|
|||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/i386/segment.h>
|
||||
#include <internal/ps.h>
|
||||
#include <internal/ke.h>
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
#include <ddk/ntddk.h>
|
||||
#include <internal/ntoskrnl.h>
|
||||
#include <internal/ps.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/hal.h>
|
||||
#include <internal/i386/segment.h>
|
||||
#include <internal/mmhal.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: main.c,v 1.65 2000/10/07 20:55:15 ekohl Exp $
|
||||
/* $Id: main.c,v 1.66 2000/10/22 16:36:50 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -15,8 +15,6 @@
|
|||
#include <internal/ntoskrnl.h>
|
||||
#include <reactos/buildno.h>
|
||||
#include <internal/mm.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/module.h>
|
||||
#include <internal/ldr.h>
|
||||
#include <internal/ex.h>
|
||||
|
@ -24,11 +22,11 @@
|
|||
#include <internal/hal.h>
|
||||
#include <internal/ke.h>
|
||||
#include <internal/io.h>
|
||||
|
||||
#include <internal/mmhal.h>
|
||||
#include <internal/i386/segment.h>
|
||||
#include <napi/shared_data.h>
|
||||
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: timer.c,v 1.35 2000/10/07 13:41:52 dwelch Exp $
|
||||
/* $Id: timer.c,v 1.36 2000/10/22 16:36:50 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -19,9 +19,6 @@
|
|||
|
||||
#include <limits.h>
|
||||
#include <ddk/ntddk.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <stdio.h>
|
||||
#include <internal/ke.h>
|
||||
#include <internal/id.h>
|
||||
#include <internal/ps.h>
|
||||
|
|
|
@ -24,9 +24,6 @@
|
|||
#include <internal/ntoskrnl.h>
|
||||
#include <internal/ob.h>
|
||||
#include <internal/ps.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <napi/teb.h>
|
||||
#include <internal/ldr.h>
|
||||
#include <napi/teb.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: loader.c,v 1.64 2000/10/08 16:32:53 dwelch Exp $
|
||||
/* $Id: loader.c,v 1.65 2000/10/22 16:36:51 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -28,8 +28,6 @@
|
|||
#include <internal/mmhal.h>
|
||||
#include <internal/ob.h>
|
||||
#include <internal/ps.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
@ -79,7 +77,6 @@ VOID LdrInitModuleManagement(VOID)
|
|||
HANDLE DirHandle, ModuleHandle;
|
||||
NTSTATUS Status;
|
||||
WCHAR NameBuffer[60];
|
||||
ANSI_STRING AnsiString;
|
||||
UNICODE_STRING ModuleName;
|
||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||
PIMAGE_DOS_HEADER DosHeader;
|
||||
|
@ -102,8 +99,7 @@ VOID LdrInitModuleManagement(VOID)
|
|||
IoDriverObjectType->QueryName = NULL;
|
||||
IoDriverObjectType->OkayToClose = NULL;
|
||||
IoDriverObjectType->Create = LdrCreateModule;
|
||||
RtlInitAnsiString(&AnsiString, "Module");
|
||||
RtlAnsiStringToUnicodeString(&IoDriverObjectType->TypeName, &AnsiString, TRUE);
|
||||
RtlInitUnicodeString(&IoDriverObjectType->TypeName, L"Module");
|
||||
|
||||
/* Create Modules object directory */
|
||||
wcscpy(NameBuffer, MODULE_ROOT_NAME);
|
||||
|
@ -145,7 +141,8 @@ VOID LdrInitModuleManagement(VOID)
|
|||
ModuleObject->Base = (PVOID) KERNEL_BASE;
|
||||
ModuleObject->Flags = MODULE_FLAG_PE;
|
||||
InsertTailList(&ModuleListHead, &ModuleObject->ListEntry);
|
||||
ModuleObject->Name = wcsdup(L"ntoskrnl.exe");
|
||||
RtlCreateUnicodeString(&ModuleObject->Name,
|
||||
L"ntoskrnl.exe");
|
||||
DosHeader = (PIMAGE_DOS_HEADER) KERNEL_BASE;
|
||||
ModuleObject->Image.PE.FileHeader =
|
||||
(PIMAGE_FILE_HEADER) ((DWORD) ModuleObject->Base +
|
||||
|
@ -300,7 +297,6 @@ LdrLoadModule(PUNICODE_STRING Filename)
|
|||
PMODULE_OBJECT ModuleObject;
|
||||
FILE_STANDARD_INFORMATION FileStdInfo;
|
||||
WCHAR NameBuffer[60];
|
||||
// PWSTR RemainingPath;
|
||||
UNICODE_STRING ModuleName;
|
||||
|
||||
/* Check for module already loaded */
|
||||
|
@ -816,7 +812,7 @@ LdrPEProcessModule(PVOID ModuleLoadBase, PUNICODE_STRING pModuleName)
|
|||
ModuleObject->Base = DriverBase;
|
||||
ModuleObject->Flags = MODULE_FLAG_PE;
|
||||
InsertTailList(&ModuleListHead, &ModuleObject->ListEntry);
|
||||
ModuleObject->Name = wcsdup(NameBuffer);
|
||||
RtlCreateUnicodeString(&ModuleObject->Name, NameBuffer);
|
||||
ModuleObject->EntryPoint = (PVOID) ((DWORD)DriverBase +
|
||||
PEOptionalHeader->AddressOfEntryPoint);
|
||||
ModuleObject->Length = DriverSize;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: rtl.c,v 1.10 2000/08/28 21:49:11 ekohl Exp $
|
||||
/* $Id: rtl.c,v 1.11 2000/10/22 16:36:51 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -15,8 +15,6 @@
|
|||
#include <internal/ntoskrnl.h>
|
||||
#include <internal/ob.h>
|
||||
#include <internal/ps.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/ldr.h>
|
||||
|
||||
#define NDEBUG
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
#include <internal/ntoskrnl.h>
|
||||
#include <internal/ob.h>
|
||||
#include <internal/ps.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/ldr.h>
|
||||
|
||||
#define NDEBUG
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
#include <internal/ntoskrnl.h>
|
||||
#include <internal/ob.h>
|
||||
#include <internal/ps.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <napi/teb.h>
|
||||
#include <internal/ldr.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: close.c,v 1.1 2000/06/04 17:27:39 ea Exp $
|
||||
/* $Id: close.c,v 1.2 2000/10/22 16:36:51 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -13,8 +13,6 @@
|
|||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/ob.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/port.h>
|
||||
#include <internal/dbg.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: complete.c,v 1.1 2000/06/04 17:27:39 ea Exp $
|
||||
/* $Id: complete.c,v 1.2 2000/10/22 16:36:51 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -13,8 +13,6 @@
|
|||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/ob.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/port.h>
|
||||
#include <internal/dbg.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: connect.c,v 1.1 2000/06/04 17:27:39 ea Exp $
|
||||
/* $Id: connect.c,v 1.2 2000/10/22 16:36:51 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -13,8 +13,6 @@
|
|||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/ob.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/port.h>
|
||||
#include <internal/dbg.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: create.c,v 1.1 2000/06/04 17:27:39 ea Exp $
|
||||
/* $Id: create.c,v 1.2 2000/10/22 16:36:51 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -13,8 +13,6 @@
|
|||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/ob.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/port.h>
|
||||
#include <internal/dbg.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: listen.c,v 1.1 2000/06/04 17:27:39 ea Exp $
|
||||
/* $Id: listen.c,v 1.2 2000/10/22 16:36:51 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -13,8 +13,6 @@
|
|||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/ob.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/port.h>
|
||||
#include <internal/dbg.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: port.c,v 1.2 2000/06/29 23:35:40 dwelch Exp $
|
||||
/* $Id: port.c,v 1.3 2000/10/22 16:36:51 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -18,8 +18,6 @@
|
|||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/ob.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/port.h>
|
||||
#include <internal/dbg.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: query.c,v 1.1 2000/06/04 17:27:39 ea Exp $
|
||||
/* $Id: query.c,v 1.2 2000/10/22 16:36:51 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -13,8 +13,6 @@
|
|||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/ob.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/port.h>
|
||||
#include <internal/dbg.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: queue.c,v 1.1 2000/06/04 17:27:39 ea Exp $
|
||||
/* $Id: queue.c,v 1.2 2000/10/22 16:36:51 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -13,8 +13,6 @@
|
|||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/ob.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/port.h>
|
||||
#include <internal/dbg.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: receive.c,v 1.1 2000/06/04 17:27:39 ea Exp $
|
||||
/* $Id: receive.c,v 1.2 2000/10/22 16:36:51 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -13,8 +13,6 @@
|
|||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/ob.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/port.h>
|
||||
#include <internal/dbg.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: reply.c,v 1.1 2000/06/04 17:27:39 ea Exp $
|
||||
/* $Id: reply.c,v 1.2 2000/10/22 16:36:51 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -13,8 +13,6 @@
|
|||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/ob.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/port.h>
|
||||
#include <internal/dbg.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: send.c,v 1.2 2000/06/29 23:35:40 dwelch Exp $
|
||||
/* $Id: send.c,v 1.3 2000/10/22 16:36:51 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -13,8 +13,6 @@
|
|||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/ob.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/port.h>
|
||||
#include <internal/dbg.h>
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
/* INCLUDES ****************************************************************/
|
||||
|
||||
#include <internal/stddef.h>
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/mm.h>
|
||||
#include <internal/mmhal.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: page.c,v 1.15 2000/10/07 13:41:53 dwelch Exp $
|
||||
/* $Id: page.c,v 1.16 2000/10/22 16:36:52 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -14,7 +14,6 @@
|
|||
#include <ddk/ntddk.h>
|
||||
#include <internal/mm.h>
|
||||
#include <internal/mmhal.h>
|
||||
#include <string.h>
|
||||
#include <internal/ex.h>
|
||||
#include <internal/ps.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: kmap.c,v 1.3 2000/08/20 17:02:08 dwelch Exp $
|
||||
/* $Id: kmap.c,v 1.4 2000/10/22 16:36:51 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -10,9 +10,6 @@
|
|||
/* INCLUDES ****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/stddef.h>
|
||||
#include <internal/mm.h>
|
||||
#include <internal/mmhal.h>
|
||||
#include <internal/bitops.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: mdl.c,v 1.25 2000/08/20 17:02:08 dwelch Exp $
|
||||
/* $Id: mdl.c,v 1.26 2000/10/22 16:36:51 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -14,7 +14,6 @@
|
|||
#include <ddk/ntddk.h>
|
||||
#include <internal/mm.h>
|
||||
#include <internal/mmhal.h>
|
||||
#include <string.h>
|
||||
#include <internal/ps.h>
|
||||
|
||||
#define NDEBUG
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: mm.c,v 1.38 2000/10/22 13:28:20 ekohl Exp $
|
||||
/* $Id: mm.c,v 1.39 2000/10/22 16:36:52 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -13,13 +13,9 @@
|
|||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/i386/segment.h>
|
||||
#include <internal/stddef.h>
|
||||
#include <internal/mm.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/ntoskrnl.h>
|
||||
#include <internal/bitops.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/io.h>
|
||||
#include <internal/ps.h>
|
||||
#include <internal/mmhal.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: mminit.c,v 1.9 2000/10/22 13:28:20 ekohl Exp $
|
||||
/* $Id: mminit.c,v 1.10 2000/10/22 16:36:52 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -13,13 +13,9 @@
|
|||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/i386/segment.h>
|
||||
#include <internal/stddef.h>
|
||||
#include <internal/mm.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/ntoskrnl.h>
|
||||
#include <internal/bitops.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/io.h>
|
||||
#include <internal/ps.h>
|
||||
#include <internal/mmhal.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: mpw.c,v 1.3 2000/08/18 22:27:03 dwelch Exp $
|
||||
/* $Id: mpw.c,v 1.4 2000/10/22 16:36:52 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -16,8 +16,6 @@
|
|||
#include <internal/ps.h>
|
||||
#include <internal/mm.h>
|
||||
#include <internal/mmhal.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: npool.c,v 1.31 2000/08/20 17:02:08 dwelch Exp $
|
||||
/* $Id: npool.c,v 1.32 2000/10/22 16:36:52 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -17,9 +17,6 @@
|
|||
/* INCLUDES ****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/stddef.h>
|
||||
#include <internal/mm.h>
|
||||
#include <internal/mmhal.h>
|
||||
#include <internal/bitops.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: pager.c,v 1.4 2000/07/19 14:18:19 dwelch Exp $
|
||||
/* $Id: pager.c,v 1.5 2000/10/22 16:36:52 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -16,8 +16,6 @@
|
|||
#include <internal/ke.h>
|
||||
#include <internal/mm.h>
|
||||
#include <internal/mmhal.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: section.c,v 1.38 2000/08/20 17:02:08 dwelch Exp $
|
||||
/* $Id: section.c,v 1.39 2000/10/22 16:36:52 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -17,7 +17,6 @@
|
|||
#include <internal/ob.h>
|
||||
#include <internal/io.h>
|
||||
#include <internal/ps.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: virtual.c,v 1.34 2000/08/20 17:02:09 dwelch Exp $
|
||||
/* $Id: virtual.c,v 1.35 2000/10/22 16:36:52 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -19,8 +19,6 @@
|
|||
#include <internal/ob.h>
|
||||
#include <internal/io.h>
|
||||
#include <internal/ps.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: dirobj.c,v 1.8 2000/03/26 22:00:09 dwelch Exp $
|
||||
/* $Id: dirobj.c,v 1.9 2000/10/22 16:36:52 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -11,11 +11,9 @@
|
|||
|
||||
/* INCLUDES ***************************************************************/
|
||||
|
||||
#include <wchar.h>
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/ob.h>
|
||||
#include <internal/io.h>
|
||||
#include <internal/string.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: handle.c,v 1.24 2000/08/19 01:21:17 ekohl Exp $
|
||||
/* $Id: handle.c,v 1.25 2000/10/22 16:36:53 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -13,8 +13,6 @@
|
|||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/ob.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/ps.h>
|
||||
|
||||
#define NDEBUG
|
||||
|
|
|
@ -11,11 +11,9 @@
|
|||
/* INCLUDES ***************************************************************/
|
||||
|
||||
#include <limits.h>
|
||||
#include <wchar.h>
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/ob.h>
|
||||
#include <internal/io.h>
|
||||
#include <internal/string.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
@ -82,7 +80,7 @@ VOID STDCALL ObAddEntryDirectory(PDIRECTORY_OBJECT Parent,
|
|||
KIRQL oldlvl;
|
||||
POBJECT_HEADER Header = BODY_TO_HEADER(Object);
|
||||
|
||||
RtlInitUnicodeString(&Header->Name, wcsdup(Name));
|
||||
RtlCreateUnicodeString(&Header->Name, Name);
|
||||
Header->Parent = Parent;
|
||||
|
||||
KeAcquireSpinLock(&Parent->Lock, &oldlvl);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: ntobj.c,v 1.6 2000/05/09 21:30:06 ekohl Exp $
|
||||
/* $Id: ntobj.c,v 1.7 2000/10/22 16:36:53 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -11,10 +11,8 @@
|
|||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <wchar.h>
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/ob.h>
|
||||
#include <string.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: object.c,v 1.28 2000/10/07 13:41:53 dwelch Exp $
|
||||
/* $Id: object.c,v 1.29 2000/10/22 16:36:53 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -11,10 +11,8 @@
|
|||
|
||||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <wchar.h>
|
||||
#include <ddk/ntddk.h>
|
||||
#include <internal/ob.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/ps.h>
|
||||
#include <internal/id.h>
|
||||
#include <internal/ke.h>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* PURPOSE: Security manager
|
||||
* FILE: kernel/ob/object.c
|
||||
* FILE: ntoskrnl/ob/security.c
|
||||
* PROGRAMER: ?
|
||||
* REVISION HISTORY:
|
||||
* 26/07/98: Added stubs for security functions
|
||||
|
@ -11,7 +11,6 @@
|
|||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
|
||||
#include <internal/ob.h>
|
||||
|
||||
#include <internal/debug.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: create.c,v 1.23 2000/10/07 13:41:54 dwelch Exp $
|
||||
/* $Id: create.c,v 1.24 2000/10/22 16:36:53 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -23,8 +23,6 @@
|
|||
#include <ddk/ntddk.h>
|
||||
#include <internal/ke.h>
|
||||
#include <internal/ob.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/hal.h>
|
||||
#include <internal/ps.h>
|
||||
#include <internal/ob.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: process.c,v 1.53 2000/10/07 13:41:54 dwelch Exp $
|
||||
/* $Id: process.c,v 1.54 2000/10/22 16:36:53 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -17,8 +17,6 @@
|
|||
#include <internal/mm.h>
|
||||
#include <internal/ke.h>
|
||||
#include <internal/ps.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/id.h>
|
||||
#include <napi/teb.h>
|
||||
#include <internal/ldr.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: thread.c,v 1.58 2000/10/11 20:50:35 dwelch Exp $
|
||||
/* $Id: thread.c,v 1.59 2000/10/22 16:36:53 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -23,8 +23,6 @@
|
|||
#include <ddk/ntddk.h>
|
||||
#include <internal/ke.h>
|
||||
#include <internal/ob.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
#include <internal/hal.h>
|
||||
#include <internal/ps.h>
|
||||
#include <internal/ob.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: mem.c,v 1.8 2000/02/21 22:41:45 ekohl Exp $
|
||||
/* $Id: mem.c,v 1.9 2000/10/22 16:36:53 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -12,8 +12,6 @@
|
|||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <string.h>
|
||||
#include <internal/string.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <wchar.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
@ -180,17 +178,6 @@ size_t wcscspn(const wchar_t *str,const wchar_t *reject)
|
|||
}
|
||||
|
||||
|
||||
/* this function is NOT exported */
|
||||
wchar_t* wcsdup(wchar_t* src)
|
||||
{
|
||||
wchar_t* dest;
|
||||
|
||||
dest = ExAllocatePool (NonPagedPool, (wcslen (src)+1)*2);
|
||||
wcscpy (dest,src);
|
||||
return (dest);
|
||||
}
|
||||
|
||||
|
||||
size_t wcslen(const wchar_t *s)
|
||||
{
|
||||
unsigned int len = 0;
|
||||
|
|
Loading…
Reference in a new issue