Commit graph

148 commits

Author SHA1 Message Date
Alex Ionescu 6829bd8c8b Implement PsSetLegoNotifyRoutine and PsRemoveCreateThreadNotifyroutine. Clean up ps/thread.c, move things to their own subsystem, do proper TEB Allocation with MmCreateTeb, remove TEB EPROCESS hack fields. Rename PsFrezeAllThreads to KeFreezeAllThreads and implement a working version.
svn path=/trunk/; revision=14663
2005-04-18 04:46:06 +00:00
Alex Ionescu f4d2ac0b1e Remove ps/create.c, it did not fit with the current model of abstraction. Major cleanup of ps/process.c, created ps/notify.c and ps/quota.c. Implemented NtOpenProcess, PsRemoveLoadImageNotifyRoutine, PsGetCurrentProcessSessionId
svn path=/trunk/; revision=14662
2005-04-18 02:12:30 +00:00
Alex Ionescu 7740536c18 Mini-merge from my local changes. Rewrite of Process Creation. Notable improvements:
- Subsystemization of Process Creation code. Memory code done by new Mm functions (not all used yet),
      Kernel code done by Ke*, etc.
    - Written to be compatible with the information in "Windows Internals".
    - Optimized and cleaned up.
    - ObInsertObject is now called at the end, fixing a plethora of wrong things that were covered with FIXMEs.
    - PEB is allocated with a Memory Area, and so will TEB soon, which allows 4KB allocation without 64KB gra
      nularity.
    - System DLL Mapping/Loading has been changed to be cached at system bootup, resulting in faster code.
    
Also changed Peb to report NT 5.0

NOTE: Messy, more to come soon. The full benefits of this patch won't be realized until the complete changes
      are in.

svn path=/trunk/; revision=14660
2005-04-18 00:42:31 +00:00
Alex Ionescu 956f376f4f Implemented Guarded Mutex, a drop-in replacement for Fast Mutex (the correct one, not the one ROS incorrectly implements) on NT 5.2. Not fully tested yet, so nothing switched to it and probably not usable. Also made KeGetCurrentThread/Irql become inlined, since this should create quite a speed boost. Made KeLeaveCriticalRegion deliver APCs if possible, and made Crit regions macros usable from outside ntoskrnl thanks to a new NT 5.2 API (KiCheckForKernelApcDelivery). Guarded Mutex code based on Filip Navara.
svn path=/trunk/; revision=14625
2005-04-15 06:24:35 +00:00
Alex Ionescu 3b6c6f0a94 Kernel Gates. Ultra-lightweight and exclusive Wait Objects used in NT 5.2+ as high-speed events. Code is untested, so it's not added to the build until I'm back in May.
svn path=/trunk/; revision=14603
2005-04-13 01:12:08 +00:00
Thomas Bluemel 8d780ebc45 fixed a few race conditions during thread/process termination leading to dead-locks
svn path=/trunk/; revision=14268
2005-03-22 17:32:15 +00:00
Thomas Bluemel a642687b55 fixed thread/process termination bugs that might have caused crashes. due to a apc bug gui threads terminating gui threads doesn't work. Alex is going to take care of it.
svn path=/trunk/; revision=14261
2005-03-22 02:32:14 +00:00
Alex Ionescu c2c6049107 Update ETHREAD fields and termination port stucture to XP, and do necessary code changes. This makes reaping even faster. It's 2:30am, i hope there's no bugs ;-)
svn path=/trunk/; revision=14175
2005-03-18 07:19:30 +00:00
Alex Ionescu eb54434d27 Thread/Process Termination/Repeaing Rewrite + Fixes
---------------------------------------------------

    - ps/cid.c: 
            * Moved CID Lookup functions here
            
    - ps/security.c: 
            * Moved all security related functions here. Makes other files neater and security functions
              easier to locate.
              
    - ps/thread.c: 
            * Moved most of the Thread Scheduling/Dispatching code that belongs in the Kernel to /ke and
              renamed functions from Ps to Ki.
            * Implemented PsIsSystemThread.
            * Removed Reaper Thread Init (now obsolete).
            * Renamed PiDeleteThread to PspDeleteThread.
            * Moved Thread State functions from tinfo.c to here.
            
    - ps/process.c:
            * Removed Query/Set Process functions and moved to ps/query.c
            * Renamed PiDeletePRocess to PspDeleteProcess
            * Removed obsoleted Process Termination functions, moved persistent one to kill.c
    
    - ps/create.c:
            * Moved the security APIs to security.c
            * Correctly implemented PsCreateSystemThread to actually create system threads.
        
            
    - ps/suspend.c
            * Rewrote Nt Executive functions to use Kernel functions.
            * Moved Ps* Routines into ke/kthread.c and fixed them. The implementation was wrong in
              some aspects, especially the issue of the APC looping around the KeWaitXxx call and the
              fact that the routines excluded/ignored the FreezeCount.
            
    - ps/debug.c
            * Fixed completely broken implementation of Get/SetThreadContext. The old version crashed
              when called and did not work at all. Suspend Regression test now works.
            * Moved Context<->TrapFrame functions to ke/i386/
            * Combined Set/GetThreadContext APCs into a single one, and used special context structure.
            
    - ps/query.c:
            * Moved Thread/Process Query/Set Routines here.
            
    - ps/tinfo.c:
            * Removed.
            
    - ps/kill.c
            * Removed complicated Process Termination semantics and useless Attach/Detach in favor for
              a much more lightweight function which performs the same tasks as before and actually works.
              TaskManager can now terminate foreign processes.
            * Rewrote Thread Reaping to use the HyperCritical Work Queue instead of manually controlled
              thread. This results in much less code as well as an increase in speed and less micro
              management. The reaper is PspReapRoutine. Closing CMD.EXE now works properly without
              requiring masks that were added as hacks to allow it.
            * Renamed PiTerminateProcessThreads to PspTerminateProcessThreads. Fixed it to work with new
              termination code.
            * Added PspDeleteProcess to handle Process Object deletion. Kills the CID Handle here as done
              by Hartmut.
            * Added PspDeletethread here.
            * Renamed and rewrote PsTerminateCurrentThread to PspExitThread. Used NT Implementation out-
              lined in Windows Internals, Chapter 13. Uses less locks, a more concise order of actions,
              actually parses the Termination Ports, handles Dbgk notification. Timers are now rundown,
              and Mutex rundown is in a dedicated Kernel function. Final termination handled by KeTerminate
              Thread as documented.
            * Renamed PsTerminateOtherThread to PspTerminateThreadByPointer and modified implementation to
              be compatible with the changes above.
            * Renamed and regrouped Process Termination into PspExitProcess. Also implemented as described
              above, and moved each subsystem specific termination helper into its own subsytem.
            * Improved NtTerminateProcess and added more debugging messages.
            * Improved NtTerminateThread and added check against System Thread and made it compatible with
              new implementation.
            * Corrected PsTerminateSystemThread now that we support System Threads.
            * Corrected NtRegisterThreadTerminatePort to use same structure name as on windows for the 
              port, and added tag to pool allocation (documented in pooltag.txt)
    
    include/internal/*.h:
    
            * Defined Scheduler Functions and misc new functions or renamed functions.
            
    ke/apc.c:
    
            * Fixed critical bug where APCs were not delivered at all if the thread wastion and cancels any timers that are associated
              to a thread, as well as their APCs and DPCs.
      
    REGRESSIONS FOUND: NONE
    
    BUGS/REGRESSIOSN FIXED:
                * Thread/Get Set Context now works.
                * Suspend Regression test now works.
                * Task manager can now kill foreign processes, even hung ones (like it should).
                * ExitProcess/closing cmd.exe with the 'x' button now works correctly without hacks.
      KNOWN ISSUES: I left a bit of a mess in the headers and some stuff still needs to be moved into the right 
                  places. I just wanted to have this first part ready first, so that it won't get too big.

svn path=/trunk/; revision=14174
2005-03-18 05:53:04 +00:00
Alex Ionescu 6a7ba78c91 Dispatching & Queue Rewrite II:
- Rewrote wait code. It is now cleaner, more optimized and faster. All waiting
      functions are now clearly differentiated instead of sharing code. These functions
      are called up to a dozen times a second, so having dedicated code for each of
      them is a real boost in speed.
    - Fixed several queue issues, made a dedicated queue wait/wake function (you are not
      supposed to use KeWaitFor on a queue, and this is also a speed boost), and make it
      compatible with new wait code.
    - Optimized Work Queue code to be much smaller and better organized, by using an 
      array instead of hard-coded multiple static variables. Also, add support for the
      real NT structures and implementation, paving the road for Dynamic Work Items, which
      also have timeouts, and deadlock dection + debug info.
    - Simplified PsBlockThread and made it compatible with wait code.
    - Added support for priority boosting when unwaiting a thread; will use later, as well
      as put proper boosting for dispatch objects.
    - Inlined all dispatcher lock functions and header initialization for speed.
    - Moved executive wait code into ob.

svn path=/trunk/; revision=14047
2005-03-14 05:54:32 +00:00
Thomas Bluemel 865a496525 don't receive the previous mode before the current thread was created, this should finally fix the boot.
svn path=/trunk/; revision=14044
2005-03-14 01:47:18 +00:00
Thomas Bluemel d288e05d38 - fixed handle table structures
- implement generic executive handle tables (since there don't exist documents that describe the parameters of most of these functions (which are kernel internal only), i made them up as required)
- adjusted OB's handle manager to use ex handle tables
- adjusted the client id manager to use ex handle tables

svn path=/trunk/; revision=14007
2005-03-13 14:21:47 +00:00
Thomas Bluemel b2a42182ef Alex Ionescu <ionucu@videotron.ca>
- Removed ke/alert.c and moved its functions where they belong.
- Commented and organized KeInitializeThread.
- Began switch to true KOBJECT enumeration used in NT.
- Implemented KeAlertResumeThread and NtAlertResumeThread.
- Harmonized Formatting in ke/kthread.c

svn path=/trunk/; revision=13974
2005-03-12 19:23:04 +00:00
Filip Navara 57787bb881 Thomas Weidenmueller <w3seek@reactos.com>
- Implement support for vectored exception handlers.
- Add code for querying process cookie.

svn path=/trunk/; revision=13962
2005-03-12 08:54:41 +00:00
Alex Ionescu db4c78ea86 Reverting to 13775. Sorry for the mess. This is dedicated to Jane! 19934415.
svn path=/trunk/; revision=13777
2005-02-28 17:40:15 +00:00
Alex Ionescu ecfad8ec74 Test commit. Not official branch release -- it will follow shortly in 15 minutes. If this ends up in HEAD i will revert immediately (i have svn switched so it shouldn't)
svn path=/trunk/; revision=13776
2005-02-28 16:44:38 +00:00
Thomas Bluemel 4f0495a525 distinguish kmode and umode alertability
svn path=/trunk/; revision=13581
2005-02-15 13:40:10 +00:00
Thomas Bluemel b55653e57c 1. fixed NtCreateProcess to do some buffer checks and moved the implementation to an internal function so it can be shared with PsCreateSystemProcess(). Also don't leak so many resources on failures
2. processes should acuire a cid handle for their unique process id
3. fixed several instances in structures where process ids were DWORD/ULONG instead of HANDLEs

svn path=/trunk/; revision=13301
2005-01-26 00:03:05 +00:00
Filip Navara e6464bc179 Basic support for priority boosting.
svn path=/trunk/; revision=12965
2005-01-12 13:43:05 +00:00
Alex Ionescu 91fc5d1804 Fix incorrect LPC Object export...we export pointers not the object itself! Also remove more TIME stuff to be properly compatible with real structures.
svn path=/trunk/; revision=12748
2005-01-03 05:17:16 +00:00
Alex Ionescu 01efd62aff Fix more wrong structure defintions that don't match official ones, plus fix little bug I introduced.
svn path=/trunk/; revision=12744
2005-01-03 01:13:10 +00:00
Thomas Bluemel 9221b12484 get rid of the "global" system process handle since handles are only vaild in the context of the process that they belong to
svn path=/trunk/; revision=11944
2004-12-05 15:42:42 +00:00
Hartmut Birr 7eacfe074f - Used a fast mutex for the client id structure.
svn path=/trunk/; revision=11846
2004-11-27 19:41:55 +00:00
Thomas Bluemel b7100ed2fc 1. removed window station/desktop hacks from ntoskrnl
2. implemented window station/desktop inheritance on thread/process startup
3. implemented process locking
4. fixed some fields in the EPROCESS structure

svn path=/trunk/; revision=11712
2004-11-20 16:46:06 +00:00
Alex Ionescu a9c33470e5 Kernel:
- apc.c: Fixed some bugs and used Dispatcher Lock. Simplified some functions and renamed/inlined others.
- wait.c: Fixed some assumptions about Dispatcher Lock and Waiting/Alertability
- process.c: Fully implemented KeStackAttachProcess and KeStackDetachProcess. Made all functions use PKPROCESS and not PEPROCESS.
Memory Manager: Fixed calls to KeAttachProcess/DetachProcess to typecast PKPROCESS
Process Manager: Removed call to empty function in apc.c

svn path=/trunk/; revision=11622
2004-11-11 22:23:52 +00:00
Alex Ionescu 39a5847ee5 Rewrote APC Implementation.
TODO: KiSwapApcEnvironment, Honour SpecialApcDisable.
Special thanks to Thomas and Filip.

Fixed I/O Manager Bugs. APCs were not created with the right parameters in the right places, or had useless parameters being sent.

Added mmdrv and midimap to bootcd.

Fixed KTHREAD defintion.

Fixed some thread alertability issue in thread creation.

svn path=/trunk/; revision=11610
2004-11-10 02:51:00 +00:00
Filip Navara 095f2900e8 - Change ULONG to ULONG_PTR for StackLimit.
- Move code from KiUpdateSystemTime to KeUpdateSystemTime.
- Move code from KiUpdateProcessThreadTime to KeUpdateRunTime.
- Honour thread quantums while scheduling.

svn path=/trunk/; revision=11488
2004-10-30 23:48:57 +00:00
Alex Ionescu c30ca53066 Implemented KeAreApcsDisabled, KeFlushEntireTb, KeIsExecutingDpc, KeSetKernelStackSwapEnable, KeQueryPriorityThread, KeRevertToUserAffinityThread, KeSetIdealProcessorThread, KeSetSystemAffinityThread, KeTerminateThread, KeStackAttachProcess, KeUnstackDetachProcess
svn path=/trunk/; revision=11284
2004-10-13 01:42:14 +00:00
Gé van Geldorp 228cddee4a Don't use more than a single page for a TEB
svn path=/trunk/; revision=11143
2004-10-01 20:26:05 +00:00
Thomas Bluemel 2d01207958 1. get rid of the global thread list and group threads in processes instead
2. get rid of all reactos-specific fields in the E/KTHREAD structure and make them match the 2k layout
3. identify threads (and later processes) using a client id table (which should propably be replaced by a global handle table instead)
4. disabled thread event pair functions by default (NT4 only) as they require a field in the ETHREAD structure that is not present in later versions

svn path=/trunk/; revision=11105
2004-09-28 15:02:31 +00:00
Thomas Bluemel 40637ed24b initialize the job management and export PsJobType
svn path=/trunk/; revision=10987
2004-09-22 22:31:46 +00:00
Thomas Bluemel bebf5b5e5e 1. added EJOB structure
2. implemented PsGetProcessJob(), PsGetJobLock(), PsGetJobSessionId() and PsGetJobUIRestrictionsClass()

svn path=/trunk/; revision=10974
2004-09-22 14:53:26 +00:00
Hartmut Birr a9bae8fa65 - Removed the member OldProcess from the ETHREAD structure.
svn path=/trunk/; revision=10759
2004-08-31 20:17:18 +00:00
Mike Nordell 65c3f8c5a6 fix placement of STDCALL for function declarations
svn path=/trunk/; revision=10626
2004-08-21 12:34:58 +00:00
Alex Ionescu 5317d303e8 Small fixes to I/O Manager and Implemented IoMakeAssociatedIrp. Parts by Filip Navara.
svn path=/trunk/; revision=10465
2004-08-10 06:26:42 +00:00
Alex Ionescu 9fa7984747 Initial Support for Quota Pool Allocations.
Implemented ExAllocatePoolWithQuota, ExAllocatePoolWithQuotaTag, PsChargePoolQuota, PsChargeProcessNonPagedPoolQuota, PsChargeProcessPagedPoolQuota, PsChargeProcessPoolQuota.
Also implemented a basic ExAllocatePoolWithTagPriority, but needs Special Pool support for Driver Verifier functionality. The allocation works however.

svn path=/trunk/; revision=10429
2004-08-08 20:33:17 +00:00
James Tabor b2f73e07c8 Added thread counting with PsEnumThreadsByProcess and thread support in SystemProcessInformation.
svn path=/trunk/; revision=10257
2004-07-23 07:44:26 +00:00
Alex Ionescu 2afa5d7040 Implemented PsGetProcessCreateTimeQuadPart, PsGetProcessDebugPort, PsGetProcessExitProcessCalled, PsGetProcessExitStatus, PsGetProcessId, PsGetProcessImageFileName, PsGetProcessInheritedFromUniqueProcessId, PsGetProcessPeb,
PsGetProcessPriorityClass, PsGetProcessSectionBaseAddress,
PsGetProcessSecurityPort, PsGetProcessWin32Process,
PsGetProcessWin32WindowStation, PsIsProcessBeingDebugged,
PsGetCurrentProcessSessionId, PsGetProcessSessionId, PsSetProcessPriorityClass, PsSetProcessSecurityPort, PsSetProcessWin32Process, PsSetProcessWin32WindowStation

svn path=/trunk/; revision=10237
2004-07-20 23:58:35 +00:00
Alex Ionescu 2708010986 Added Ke Stub Prototypes
svn path=/trunk/; revision=9864
2004-06-24 21:03:56 +00:00
Alex Ionescu 68f96d4b10 Added Ex Prototypes
svn path=/trunk/; revision=9841
2004-06-23 21:02:35 +00:00
Eric Kohl 2ce08a79bb Fix some prototypes.
svn path=/trunk/; revision=8722
2004-03-14 18:13:19 +00:00
Thomas Bluemel 583de66b3e tamlin's work on compiling the kernel with another compiler than GCC. Patch by Mike Nordell.
svn path=/trunk/; revision=7460
2004-01-05 14:28:21 +00:00
KJK::Hyperion c8f27683f0 Screw branches, I'm committing to HEAD. Life is too short
svn path=/trunk/; revision=7320
2003-12-30 00:12:47 +00:00
Hartmut Birr 4e7d177b17 - Fixed the declaration of some thread functions.
svn path=/trunk/; revision=7045
2003-12-14 18:02:34 +00:00
Gunnar Dalsnes b4d0d3aaf0 apc work
svn path=/trunk/; revision=6807
2003-11-27 01:13:05 +00:00
Filip Navara 5753152b64 Fixed driver loading order, cleaned up relevant functions, and moved boot driver
initializing to separate function IopInitializeBootDrivers in io/driver.c.

These functions has been renamed:
LdrInitializeBootStartDriver -> IopInitializeBuiltinDriver (moved to io/driver.c)
LdrLoadAutoConfigDrivers -> IopInitializeSystemDrivers

How the driver loading works now:
- The root bus driver is enumerated by IoInit2 and it causes all drivers marked
as boot start to be initialized and attached to respective device tree node.
- Other boot drivers are initialized by IopInitializeBootDrivers (called from
ExpInitializeExecutive).
- After creating system root link (by IoCreateSystemRootLink) the device
tree is travesed by IopInitializePnpServices and all non-boot start drivers
all loaded.
- At last, system start drivers are loaded by IopInitializeSystemDrivers.

svn path=/trunk/; revision=6325
2003-10-15 17:04:39 +00:00
David Welch f2d9fe4842 - Patch from PM implementing ldt and tss iobitmap support.
svn path=/trunk/; revision=5685
2003-08-19 23:59:08 +00:00
David Welch 6e6bff4228 - Don't allocate/free a new callback on each callback to user mode.
svn path=/trunk/; revision=5230
2003-07-23 19:13:37 +00:00
Andrew Greenwood e6d0d671b8 Win 32 API header compatibility update
Files that should now compile with Win 32 API headers:
* sysinfo.c
* time.c
* work.c
* zone.c

If you suddenly discover that something no longer works due to a missing struct member, it's probably because I've renamed it to match the Win 32 API headers.

svn path=/trunk/; revision=5151
2003-07-17 16:57:39 +00:00
Andrew Greenwood acd21b1447 My first CVS commit. Hope I get this right. I did put a few files in the CVS dir manually... Innocent mistake... I'll clean it up after I'm done with this. Sorry!
Some of NTOSKRNL now compiles with __USE_W32API enabled. Note that this commit is purely so I know what to do, and also to allow other people to continue working on this if they wish to do so. I will continue hacking away at it.

It's not complete yet, but I've ensured that the changes I have made aren't incompatible with ReactOS as it stands at the moment. It compiles without __USE_W32API fine.

* Modified the tools/depend.mk file to force the use of forward slash (SEH variable?) otherwise it tries to run "toolsdepend.exe" without a slash.

* Moved a couple of routines from include/ddk/halfuncs.h to hal/halx86/include/hal.h

* Fixed conflicting types in ntoskrnl/ex/interlck.c

* Replaced .a with .u, #undef'd "lite" functions and defined NONAMELESSUNION in ntoskrnl/ex/resource.c so that it compiles with Win 32 API

* Added some more conditional defines to include/shared_data.h, ntoskrnl/include/internal/mm.h (and i386/mm.h), ntoskrnl/include/internal/ps.h

* Replaced .a with .u for OWNER_ENTRY and ERESOURCE in include/ddk/extypes.h (so they are compatible with Win 32 API headers)

* Various other small adjustments

Hope this works!

svn path=/trunk/; revision=5130
2003-07-15 16:26:18 +00:00
Eric Kohl ea01cf3f1f Enable automatic initialization and termination of Win32 threads and processes.
svn path=/trunk/; revision=4933
2003-06-20 16:26:53 +00:00
Eric Kohl 322b60c160 Added service table pointer to KTHREAD.
svn path=/trunk/; revision=4905
2003-06-16 16:45:52 +00:00
Casper Hornstrup ebabe56624 2003-06-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
Changes for compiling with w32api

	* include/ddk/service.h: Move ...
	* include/ntos/service.h: ... here.
	* include/ddk/kdfuncs.h: Move ...
	* include/ntos/kdfuncs.h: ... here.
	* include/ntos/halfuncs.h: New file.
	* ntoskrnl/include/internal/hal/hal.h,
	ntoskrnl/include/internal/hal/bus.h,
	ntoskrnl/include/internal/hal/mps.h: Remove.
	* hal/halx86/include/hal.h: Remove disabled code.
	* include/ntos.h: Include ntos/service.h, ntos/halfuncs.h, and
	ntos/kdfuncs.h.
	* include/ddk/fstypes.h (FILE_LOCK_TOC): Move ...
	* include/ntos/file.h: ... here.
	* include/ddk/halfuncs.h (HalAllProcessorsStarted,
	HalBeginSystemInterrupt, HalDisableSystemInterrupt,
	HalEnableSystemInterrupt, HalEndSystemInterrupt,
	HalInitializeProcessor, HalInitSystem, HalReportResourceUsage): Move to
	include/ntos/halfuncs.h.
	* include/ddk/iofuncs.h (IoAssignDriveLetters): Ditto.
	* include/ddk/kefuncs.h (KeInitializeApc): Match w32api prototype.
	(KeRaiseIrqlToSynchLevel): Move to include/ntos/halfuncs.h.
	* include/ddk/ketypes.h (KAPC_ENVIRONMENT): Move to include/ntos/types.h.
	(KDEVICE_QUEUE, KDEVICE_QUEUE_ENTRY): Match w32api prototype.
	(KINTERRUPT): Move to include/ntos/zwtypes.h.
	* include/ddk/mmtypes.h (PAGE_ROUND_UP, PAGE_ROUND_DOWN): Move ...
	* include/ntos/mm.h: ... here.
	* include/ddk/ntddk.h: Don't include ddk/kdfuncs.h.
	* include/ddk/pstypes.h (PKTHREAD, PRKTHREAD): Add.
	(PsInitialSystemProcess, PsProcessType, PsThreadType): Move ...
	include/ntos/ps.h: ... here.
	* lib/ntdll/rtl/i386/exception.c (SehpContinue): New.
	* ntoskrnl/rtl/i386/exception.c (SehpContinue): Ditto.
	* ntoskrnl/include/internal/ke.h: Include <ddk/ntifs.h>.
	* ntoskrnl/include/internal/ntoskrnl.h: Include internal/ke.h.
	* ntoskrnl/ex/napi.c: Use new structure SSDT_ENTRY.
	* ntoskrnl/ke/apc.c (KeInitializeApc): Match w32api prototype.
	* ntoskrnl/ke/kqueue.c: Use fields of new structures KDEVICE_QUEUE
	and KDEVICE_QUEUE_ENTRY.

svn path=/trunk/; revision=4861
2003-06-07 10:14:40 +00:00
Casper Hornstrup 2d947f6f92 2003-05-28 Casper S. Hornstrup <chorns@users.sourceforge.net>
Changes for compiling with w32api

	* include/ddk/haltypes.h: Move ...
	* include/ntos/haltypes.h: ... here.
	* include/ddk/obtypes.h: Move ...
	* include/ntos/obtypes.h: ... here.
	* include/ddk/i386/tss.h: Move ...
	* include/ntos/tss.h: ... here.
	* include/errors.h, include/windows.h: #include_next <windows.h>.
	* include/ntos.h: Include "ntos/haltypes.h", "ntos/obtypes.h", and
	"ntos/tss.h".
	* include/ddk/defines.h (EXPORTED, IMPORTED): Move to
	include/ntos/types.h.
	* include/ddk/exfuncs.h, include/ddk/mmtypes.h, include/ntos/except.h,
	include/ntos/file.h, include/ole32/guiddef.h, include/win32k/color.h,
	lib/msafd/include/debug.h, lib/user32/include/debug.h,
	lib/ws2_32/include/debug.h, lib/ws2help/debug.h,
	ntoskrnl/include/internal/debug.h, ntoskrnl/ke/i386/bthread.S,
	ntoskrnl/rtl/error.c: Don't define macros if previously defined.
	* include/ddk/halfuncs.h: Include <ntos/haltypes.h>.
	* include/ddk/iotypes.h: Include <ntos/obtypes.h>.
	* include/ddk/ketypes.h (MB_FLAGS_*, LOADER_MODULE, ADDRESS_RANGE,
	LOADER_PARAMETER_BLOCK): Move to include/ntos/types.h.
	* include/ddk/ntddk.h: #include_next <ddk/ntddk.h>.
	* include/ddk/ntifs.h: #include_next <ddk/ntifs.h>.
	* include/napi/shared_data.h (SharedUserData): Undefine before defining.
	* include/ntos/rtl.h (RtlUpcaseUnicodeString): Correct prototype.
	* include/ntos/zwtypes.h (THREAD_STATE): Add.
	* lib/ntdll/rtl/unicode.c (RtlUpcaseUnicodeString): Match new prototype.
	* ntoskrnl/rtl/unicode.c (RtlUpcaseUnicodeString): Ditto.
	* lib/string/Makefile: Include Makefile.$(ARCH). Don't include
	makefile.$(ARCH).
	* ntoskrnl/ex/sysinfo.c, ntoskrnl/include/internal/ntoskrnl.h,
	* ntoskrnl/include/internal/ob.h, ntoskrnl/ob/handle.c: Include <ntos.h>.
	* ntoskrnl/ke/i386/syscall.S: Don't include <ddk/defines.h>.
	(KernelMode, UserMode): Define.
	* ntoskrnl/ke/i386/stkswitch.S, ntoskrnl/ke/i386/tskswitch.S,
	ntoskrnl/ke/i386/v86m_sup.S: Include <ntos/tss.h>

svn path=/trunk/; revision=4789
2003-05-28 18:09:10 +00:00
Gunnar Dalsnes fc1366d624 set thread WaitReason when blocking
svn path=/trunk/; revision=4351
2003-03-19 23:12:41 +00:00
Casper Hornstrup 17c0b5798e Reverted latest changes.
svn path=/trunk/; revision=3473
2002-09-08 10:23:54 +00:00
Casper Hornstrup 387d432884 Use free Windows DDK and compile with latest MinGW releases.
svn path=/trunk/; revision=3466
2002-09-07 15:13:13 +00:00
David Welch 1a46ca7d8a 2002-08-17 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/ps/create.c (PiDeleteThread): Don't dereference
	the thread's process while holding the thread list lock.

2002-08-17  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/mm/section.c (MmMapViewOfSection): Check there is
	enough space for all parts of an image before mapping it; if
	there isn't enough space free at the preferred base address
	then try to choose a different one.

2002-08-17  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/mm/mpw.c (MmInitMpwThread): Run the MPW thread at
	idle priority.

2002-08-17  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/mm/kmap.c (ExUnmapPage, ExAllocatePageWithPhysPage,
	MiFreeNonPagedPoolRegion, MiAllocNonPagedPoolRegion): Maintain
	a hint of the next free page; makes running with whole page
	allocation more bearable.

2002-08-17  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/mm/anonmem.c (MmPageOutVirtualMemory): Show an
	out of swap space message if we are out of swap space.
	* ntoskrnl/mm/section.c (MmPageOutSectionView): Show an
	out of swap space message if we are out of swap space.
	* ntoskrnl/mm/pagefile.c (MmAllocSwapPage): Don't automatically
	show an out of swap space message on failure.
	* ntoskrnl/mm/pagefile.c (MmShowOutOfSpaceMessagePagingFile): New
	function to notify the user that the pagefile is full.

2002-08-17  David Welch  <welch@computer2.darkstar.org>

	* drivers/lib/zlib/Makefile: Create a dummy zlib.sym

svn path=/trunk/; revision=3335
2002-08-17 01:42:03 +00:00
David Welch 99c4e70f22 2002-08-16 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/mm/npool.c (ExAllocateWholePageBlock): Converted
	to use PHYSICAL_ADDRESS type for page address.

2002-08-16  David Welch  <welch@computer2.darkstar.org>

	* subsys/win32k/ntuser/class.c (W32kCreateClass): Corrected
	typo when calculating the offset into the class object to
	put the class name string.

2002-08-16  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/ps/thread.c (PsDispatchThreadNoLock): Don't call
	the reaper function directly; set an event to wake up a seperate
	reaper thread.
	* ntoskrnl/ps/thread.c (PsReaperThreadMain): New function that
	waits for a notification and then calls PsReapThreads.
	* ntoskrnl/ps/thread.c (PsInitThreadManagement): Create the
	reaper thread.

svn path=/trunk/; revision=3333
2002-08-16 01:39:17 +00:00
David Welch 8cec2e609d 2002-08-14 David Welch <welch@computer2.darkstar.org>
* subsys/smss/init.c (SmPagingFilesQueryRoutine): If possible
	take the size of the paging file from the registry.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/mm/section.c (MmCreateDataFileSection): Extend the
	section if necessary.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/mm/pagefile.c (NtCreatePagingFile): Set the file
	size using the FileAllocationInformation class.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/mm/anonmem.c (MmWritePageVirtualMemory): Implemented
	function to write anonymous memory pages to the swap file.
	* ntoskrnl/mm/anonmem.c (MmFreeVirtualMemoryPage): Free any
	swap page associated with the page.
	* ntoskrnl/mm/mpw.c (MmWriteDirtyPages): New function to find
	pages to write to disk.
	* ntoskrnl/mm/mpw.c (MmMpwThreadMain): Implemented MPW functionality.
	* ntoskrnl/mm/rmap.c (MmWritePagePhysicalAddress): New function
	to write a single page back to disk.
	* ntoskrnl/mm/rmap.c (MmSetCleanAllRmaps, MmSetDirtyAllRmaps,
	MmIsDirtyPageRmap): New rmap function to support the MPW thread.
	* ntoskrnl/mm/section.c (MmWritePageSectionView): Implemented
	function to write back section pages.
	* ntoskrnl/mm/section.c (MmFreeSectionPage): Free any swap
	entry associated with the page; mark pages shared with
	the cache as dirty if necessary.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/ldr/loader.c (LdrPEProcessModule): Set name of
	the module into the module text structure.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/io/rw.c (NtReadFile, NtWriteFile): Use the correct
	test for whether to wait for the completion of i/o.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/cm/ntfunc.c (NtFlushKey): Request synchronous i/o
	from NtOpenFile.
	* ntoskrnl/cm/regfile (CmiInitPermanentRegistryHive): Request
	synchronous i/o from NtCreateFile.
	* ntoskrnl/dbg/kdb_stabs.c (LdrpLoadModuleSymbols): Request
	synchronous i/o from NtOpenFile.
	* ntoskrnl/ldr/sysdll.c (LdrpMapSystemDll): Request synchronous i/o
	from NtOpenFile.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/cc/view.c (CcRosSuggestFreeCacheSegment): Maintain the
	correct reference count.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/cc/view.c (CcRosFlushCacheSegment): New function to
	write back a modified cache segment.
	* ntoskrnl/cc/view.c (CcRosFlushDirtyPages): New function to
	flush some dirty pages from the cache.
	* ntoskrnl/cc/view.c (CcRosMarkDirtyCacheSegment): New function to
	mark a cache segment modified while mapped into memory as dirty.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/cc/pin.c (CcMapData, CcUnpinData, CcSetDirtyPinnedData):
	Store the dirty status in the BCB; don't write back dirty data
	immediately.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* include/ntos/mm.h: Added SEC_XXXX defines from 'Windows NT/2000
	Native API Reference'

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* drivers/fs/vfat/ea.c (VfatSetExtendedAttributes): Empty
	placeholder for extended attribute functions.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* drivers/fs/vfat/finfo.c (VfatSetAllocationSizeInformation):
	Added function to set allocation size.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* drivers/fs/vfat/fcb.c (vfatFCBInitializeCache): Renamed
	to vfatFCBInitializeCacheFromVolume.
	* drivers/fs/vfat/fcb.c (vfatMakeFCBFromDirEntry): Don't
	initialise the cache with a file object representing the
	volume unless the FCB is for a directory.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* drivers/fs/vfat/create.c (VfatPagingFileCreate): Added a
	new function for handling paging file only code.
	* drivers/fs/vfat/create.c (VfatSupersedeFile): Added a
	new function for doing a file supersede.
	* drivers/fs/vfat/create.c (VfatCreateFile): Reformatted and
	adjusted control flow. Set allocation size and extended attributes
	on create.
	* drivers/fs/vfat/create.c (VfatCreate): Removed goto.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* drivers/fs/vfat/cleanup.c (VfatCleanupFile): Renamed
	updEntry to VfatUpdateEntry.
	* drivers/fs/vfat/close.c (VfatCloseFile): Renamed
	updEntry to VfatUpdateEntry.
	* drivers/fs/vfat/dirwr.c (updEntry): Renamed to
	VfatUpdateEntry.
	* drivers/fs/vfat/dirwr.c (addEntry): Renamed to
	VfatAddEntry.

2002-08-14  David Welch  <welch@computer2.darkstar.org>

	* apps/tests/sectest/sectest.c (main): Fixed formatting.

svn path=/trunk/; revision=3331
2002-08-14 20:58:39 +00:00
David Welch 95fbecfd46 2002-08-09 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/ps/create.c (NtCreateThread): Call PsSuspendThread
	if NtCreateThread has CreateSuspended as TRUE.
	* ntoskrnl/ps/suspend.c (PsSuspendThread, PsResumeThread,
	PiSuspendThreadKernelRoutine): Fixed suspend functionality.

2002-08-09  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/ke/i386/usertrap.c (print_user_address): Copy
	the LDR variable from the right address.

2002-08-09  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/ke/apc.c (KiDeliverNormalApc): Check for
	kernel APCs pending on exit from the kernel.
	* ntoskrnl/ke/apc.c (KiDeliverNormalApc, KiDeliverUserApc,
	KiDeliverApc): Set the APC's inserted flag to FALSE after
	removing it from the thread's queue.

2002-08-09  David Welch  <welch@computer2.darkstar.org>

	* lib/kernel32/thread/thread.c (ThreadStartup): Don't
	call DLL entrypoints; this is done by LdrInitializeThunk.
	* lib/ntdll/ldr/startup.c (LdrInitializeThunk): Call
	DLLs in initialization order; take the loader lock before
	calling.

2002-08-09  David Welch  <welch@computer2.darkstar.org>

	* apps/tests/thread/thread.c (main): Test suspend and
	resume functionality.

svn path=/trunk/; revision=3324
2002-08-09 17:23:57 +00:00
David Welch 5a801d58c3 2002-08-08 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/mm/section (NtQuerySection): Return the
	right result length.

2002-08-08  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/ke/usertrap.c (print_user_address): Check for
	a NULL LDR structure in the PEB; copy the LDR pointer in
	safely.

2002-08-08  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/ke/apc.c (KiDeliverUserApc): Deliver all present
	APCs; release the APC spinlock while acccessing user memory.

2002-08-08  David Welch  <welch@computer2.darkstar.org>

	* include/internal/ps.h: Adjusted offsets into the ETHREAD
	structure.
	* include/internal/ps.h: Removed redundant members from the
	KTHREAD structure.
	* ntoskrnl/ke/kthread.c (KeInitializeThread): Removed
	redundant members from the KTHREAD structure.

2002-08-08  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/dbg/kdb.c (KdbEnterDebuggerException): New
	function to enter the debugger on an exception.
	* ntoskrnl/kd/kdebug.c (KdInitSystem): Initialize the
	local kernel debugger if enabled.
	* ntoskrnl/ke/catch.c (KiDispatchException): Enter the
	local kernel debugger on an exception.

2002-08-08  David Welch  <welch@computer2.darkstar.org>

	* include/ntdll/ldr.h: Added definition for a DLL entrypoint.
	* lib/kernel32/process/create.c (KlCreateFirstThread): Put
	the argument to the NtProcessStartup function on the stack.
	* lib/kernel32/process/create.c (KlInitPeb): Read the
	base address of the new image from the PEB.
	* lib/kernel32/process/create.c (CreateProcessW): Start the
	first thread at the entrypoint of the new image.
	* lib/ntdll/ldr/startup.c (LdrInitializeThunk): If the
	function is called after the initial startup then just call the
	entrypoints for the loaded DLLs with DLL_THREAD_ATTACH. Don't
	call the entrypoint of the image.
	* lib/ntdll/rtl/process.c (RtlpCreateFirstThread): Put the
	argument to the NtProcessStartup function on the stack.
	* lib/ntdll/rtl/process.c (KlInitPeb): Read the base address of
	the new image from the PEB.
	* lib/ntdll/rtl/process.c (RtlCreateUserProcess): Start the
	first thread at the entrypoint of the new image.
	* ntoskrnl/ke/i386/bthread.S (PsBeginThreadWithContextInternal):
	Use the system call path to begin a usermode thread.
	* ntoskrnl/ke/i386/thread.c (Ke386InitThreadWithContext): Convert
	the supplied context into a trap frame.
	* ntoskrnl/ldr/init.c (LdrLoadInitialProcess): Put the PEB argument
	to the NtProcessStartup function on the new stack; start the
	first thread at the entrypoint of the image.
	* ntoskrnl/ps/create.c (NtCreateThread): Create an APC to call
	LdrInitializeThunk in the context of a new thread before its
	entrypoint.

2002-08-08  David Welch  <welch@computer2.darkstar.org>

	* drivers/fs/vfat/cleanup.c (VfatCleanupFile): Uninitialise
	the cache on file cleanup.
	* drivers/fs/vfat/fcb.c (vfatReleaseFcb): Don't uninitialise
	the cache on file close.
	* ntoskrnl/cc/copy.c: Renamed zero page global variable.
	* ntoskrnl/cc/view.c: Added cache delete function.

svn path=/trunk/; revision=3323
2002-08-08 17:54:16 +00:00
Eric Kohl cae7cd6a6c Renamed some thread states.
svn path=/trunk/; revision=3205
2002-07-10 15:15:00 +00:00
David Welch 3c453d5dc1 2002-07-04 David Welch <welch@computer2.darkstar.org>
* subsys/win32k/include/callback.h: Fixed callback argument
	definitions.
	* subsys/win32k/ntuser/winpos.c: Implemented some more of the windows
	sizing/moving code.
	* subsys/win32k/ntuser/painting.c: Implemented some more of the
	window painting code.
	* subsys/win32k/objects/coord.c: Implemented LPtoDP and DPtoLP.
	* subsys/win32k/objects/region.c: Added stubs for some more
	region functions.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/ps/process.c (NtCreateProcess): Duplicate the
	process desktop handle as well.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/se/token.c: Don't call the ZwXXX variant of
	system calls when in system context.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* ntoskrnl/Makefile: Added file with MDA output code.
	* ntoskrnl/kd/kdebug.c: Recognize MDA as a destination for
	debug output.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* lib/user32/windows/defwnd.c: Implemented some more of the
	default window handler.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* lib/user32/misc/stubs.c: Removed some stubs to seperate files.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* lib/user32/user32.def: Export ScreenToClient otherwise we
	get problems when code in user32 tries to call it.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* include/win32k/region.h: Added prototypes for some missing
	region functions.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* include/win32k/ntuser.h: Added prototypes for some missing
	NtUserXXX functions.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* include/user32/wininternal.h: Added some constants for
	private GetDCEx styles that WINE needs.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* include/user32/callback.h: Fixed callbacks for messages with
	parameters.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* include/napi/win32.h (W32THREAD): Added pointer to the
	thread's desktop.
	* include/napi/win32.h (W32PROCESS): Removed handle table,
	added a pointer to the process's window station.
	* subsys/win32k/ntuser/guicheck.c (W32kGuiCheck): Reference
	a process's window station on the first win32k system call. Reference
	a thread's desktop on the first win32k system call.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* include/messages.h: Added some missing WM_XXX constants.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* drivers/dd/ide/makefile: Compiling with debugging messages
	needs libgcc to be linked in.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* iface/addsys/genw32k.c: Generate a variable with the
	number of system calls.
	* iface/native/genntdll.c: Generate a proper stack frame for
	the user system call stubs.
	* ntoskrnl/ke/i386/syscall.S: Generate a proper stack frame for
	the handler for system calls.

2002-07-04  David Welch  <welch@computer2.darkstar.org>

	* Makefile: Build the GUI startup application.
	* subsys/system/gstart/gstart.c: Application to start up
	the GUI.

svn path=/trunk/; revision=3179
2002-07-04 19:56:38 +00:00
David Welch 3d3be3df27 2002-06-04 David Welch <welch@whitehall1-5.seh.ox.ac.uk>
* ntoskrnl/ke/i386/exp.c (KiDoubleFaultHandler): Print CR3
	correctly.

2002-06-04  David Welch  <welch@whitehall1-5.seh.ox.ac.uk>

	* ntoskrnl/include/internal/ps.h: Added KTHREAD_STACK_LIMIT definition.
	* ntoskrnl/ke/i386/tskswitch.S (Ki386ContextSwitch): Force all the
	pages of the kernel stack to be accessible from this process.

2002-06-04  David Welch  <welch@cwcom.net>

	* ntoskrnl/cc/view.c (ReadCacheSegmentChain): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/cc/copy.c (CcRosCreateCacheSegment): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/cc/copy.c (CcFreeCachePage): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/include/internal/mm.h: Changed prototypes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/include/internal/ps.h (KPROCESS): Changed type of
	page directory base to PHYSICAL_ADDRESS.
	* ntoskrnl/include/internal/i386/mm.h: Changed prototypes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/ke/kthread.c (KeFreeStackPage): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/ke/kthread.c (KeInitializeThread): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/ke/process.c (KeAttachProcess, KeDetachProcess): Changes
	to use PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/ke/kernel.c (PcrPages, KeApplicationProcessorInit): Changes
	to use PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/mm/balance.c (MM_ALLOCATION_REQUEST): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/mm/balance.c (MmReleasePageMemoryConsumer): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/mm/balance.c (MmRequestPageMemoryConsumer): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/mm/cont.c (MmFreeContinuousPage): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/mm/cont.c (MmAllocateContinuousAlignedMemory): Changes to
	use PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/mm/freelist.c (MmTransferOwnershipPage,
	MmGetLRUFirstUserPage, MmGetLRUNextUserPage, MmGetContinuousPages,
	MmInitializePageList, MmSetFlagsPage, MmSetRmapListHeadPage,
	MmGetRmapListHeadPage, MmMarkPageMapped, MmMarkPageUnmapped,
	MmGetFlagsPage, MmSetSavedSwapEntryPage, MmGetSavedSwapEntryPage,
	MmReferencePage, MmGetReferenceCountPage, MmIsUsablePage,
	MmDereferencePage, MmGetLockCountPage, MmLockPage, MmUnlockPage,
	MmAllocPage): Changes to use PHYSICAL_ADDRESS type for physical
	addresses.
	* ntoskrnl/mm/iospace.c (MmMapIoSpace): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/mm/kmap.c (ExAllocatePage, MiZeroPage, MiCopyFromUserPage,
	ExAllocatePageWithPhysPage): Changes to use PHYSICAL_ADDRESS type for
	physical addresses.
	* ntoskrnl/mm/marea.c (MmFreeMemoryArea): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/mm/mdl.c (MmUnlockPages, MmMapLockedPages,
	MmProbeAndLockPages): Changes to use PHYSICAL_ADDRESS type for
	physical addresses.
	* ntoskrnl/mm/mm.c (MmSharedDataPagePhysicalAddress,
	MmCommitPagedPoolAddress, MmNotPresentFault): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/mm/mminit.c (MmInitVirtualMemory): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/mm/ncache.c (MmAllocateNonCachedMemory,
	MmFreeNonCachedPage): Changes to use PHYSICAL_ADDRESS type for
	physical addresses.
	* ntoskrnl/mm/npool.c (grow_kernel_pool): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/mm/rmap.c (MmPageOutPhysicalAddress, MmInsertRmap,
	MmDeleteAllRmaps, MmDeleteRmap): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/mm/section.c (MiReadPage, MmNotPresentFaultSectionView,
	MmAccessFaultSectionView, MmPageOutDeleteMapping,
	MmPageOutSectionView, MmFreeSectionPage): Changes to use
	PHYSICAL_ADDRESS type for physical addresses.
	* ntoskrnl/mm/slab.c (ExGrowSlabCache): Changes to use
	PHYSICAL_ADDRESS type for physical address.
	* ntoskrnl/mm/virtual.c (MmPageOutVirtualMemory,
	MmNotPresentFaultVirtualMemory, MmFreeVirtualMemoryPage): Changes to
	use PHYSICAL_ADDRESS type for physical address.
	* ntoskrnl/mm/wset.c (MmTrimUserMemory): Changes to use
	PHYSICAL_ADDRESS type for physical address.
	* ntoskrnl/mm/page.c (Mmi386ReleaseMmInfo, MmCopyMmInfo,
	MmGetPhysicalAddressForProcess, MmCreateVirtualMapping,
	MmCreateVirtualMappingUnsafe, MmCreateVirtualMappingForProcess,
	MmDeleteVirtualMapping): Changes to use PHYSICAL_ADDRESS type for
	physical address.
	* ntoskrnl/ps/process (PsInitProcessManagment): Changes to use
	PHYSICAL_ADDRESS type for physical address.
	* ntoskrnl/ps/thread.c (PsAllocateCallbackStack): Changes to use
	PHYSICAL_ADDRESS type for physical address.

2002-06-04  David Welch  <welch@cwcom.net>

	* Lots of change since the ChangeLog was last updated.

svn path=/trunk/; revision=3000
2002-06-04 15:26:58 +00:00
David Welch fb21de32de Reverted the MPW changes (keep these in a seperate branch)
svn path=/trunk/; revision=2950
2002-05-14 21:19:21 +00:00
Casper Hornstrup c804ca06be Use ULONG_PTR instead of ULONG when doing pointer arithmetics.
Use ULONG_PTR for physical adresses and PVOID for virtual addresses.
Added several consistency checks in the memory memory manager.

svn path=/trunk/; revision=2946
2002-05-13 18:10:41 +00:00
Eric Kohl 9ca5a97711 Removed obsolete functions/protypes HalInitFirstTask() and HalSwitchTask().
Renamed misleading function HalReleaseTask() to KeReleaseThread().

svn path=/trunk/; revision=2625
2002-02-15 14:47:55 +00:00
David Welch 8dff4a88dc More user work
svn path=/trunk/; revision=2567
2002-01-27 01:11:24 +00:00
David Welch aebf70e07f Present large reads to the filesystem from CcCopyRead
svn path=/trunk/; revision=2561
2002-01-26 21:21:02 +00:00
David Welch 793bbe0455 Implemented NtW32Call and NtCallbackReturn
Updated some .cvsignore files

svn path=/trunk/; revision=2515
2002-01-15 02:51:32 +00:00
Jason Filby 2ddebe867f Moved W32THREAD to teb.h
svn path=/trunk/; revision=2392
2001-11-24 14:08:54 +00:00
Emanuele Aliberti fc64f4511b Added CVS Id.
svn path=/trunk/; revision=2234
2001-09-07 21:37:47 +00:00
Eric Kohl b3ab3efa96 Fixed callback calling conventions (part 2).
svn path=/trunk/; revision=2201
2001-08-27 01:29:07 +00:00
Eric Kohl 20f65a3fb9 Fixed callback calling conventions (part 1).
svn path=/trunk/; revision=2200
2001-08-26 17:30:21 +00:00
Casper Hornstrup 3f69ca4cc4 Major update of the build system:
- Created helper makefile for all targets
- Made most makefiles simpler by using the helper makefile
- Moved build tools into ./tools

Updated installation instructions

svn path=/trunk/; revision=2185
2001-08-21 20:13:17 +00:00
Eric Kohl e183b6028f Rewrote stack allocation.
svn path=/trunk/; revision=2144
2001-08-03 17:21:38 +00:00
Eric Kohl 6d64efee46 Moved interlocked and locale functions.
Implemented basic locale support.
Added some missing interlocked functions.

svn path=/trunk/; revision=2056
2001-07-12 17:23:42 +00:00
Casper Hornstrup 3a9de284ad Updated clean rules.
Implemented sequenced lists and lookaside lists.
Started on TCP/IP connection endpoints.
Save process window station in EPROCESS instead of PEB.
NOTICE: please do a make win32k_clean or you might experience a crash

svn path=/trunk/; revision=2036
2001-07-04 20:40:24 +00:00
Phillip Susi 39b80bfefd Fixed definition of EPROCESS to work with the forward declaration in ketypes.h
svn path=/trunk/; revision=1836
2001-04-26 13:29:58 +00:00
David Welch f29036d97b Further SMP work (associate an idle thread with each processor)
svn path=/trunk/; revision=1808
2001-04-17 04:11:01 +00:00
David Welch 2cfadf3b41 per processor TSS
svn path=/trunk/; revision=1807
2001-04-16 23:29:55 +00:00
David Welch 85f85e8462 Further SMP initialization work (now boots all processors on SMP bochs)
Preparation for per-processor GDT

svn path=/trunk/; revision=1805
2001-04-16 16:29:03 +00:00
David Welch 65b55ec6c6 SMP detection work
Changed initialization back
Changed to NT IRQLs
Check for return from main

svn path=/trunk/; revision=1797
2001-04-16 02:02:07 +00:00
Casper Hornstrup 94309de6e4 Added Intel MultiProcessor Specification support
svn path=/trunk/; revision=1789
2001-04-13 16:12:26 +00:00
David Welch 2a613a30c4 Removed obsolete header files
Updated copyright notices

svn path=/trunk/; revision=1703
2001-03-16 18:11:24 +00:00
David Welch 10f230ae0a Fixed bug in NtFreeVirtualMemory reported by Philip Susi
Added all thread information classes
Began work on fixing suspend/resume

svn path=/trunk/; revision=1554
2001-01-21 14:54:30 +00:00
David Welch 703924d130 (Finally) implemented Philip Susi's suggestion for non-counting block
Moved suspend/resume code to seperate file

svn path=/trunk/; revision=1543
2001-01-19 15:09:01 +00:00
David Welch 8445b12452 All task switching is done in software.
Beginnings of v86 mode support.
Corrected locking bug when terminating multithreaded process.

svn path=/trunk/; revision=1475
2000-12-23 02:37:41 +00:00
Eric Kohl 64ba922c19 Implemented NtResumeThread() and NtSuspendThread()
Cleanup

svn path=/trunk/; revision=1472
2000-12-22 13:32:06 +00:00
David Welch 488f0ac078 Some work on file caching
Some work on the minix filesystem
Some work on v86 mode support
Implemented NtGetContextThread

svn path=/trunk/; revision=1467
2000-12-10 23:42:01 +00:00
Eric Kohl 4ac4987dd2 Implemented some verify functions.
svn path=/trunk/; revision=1466
2000-12-10 19:15:45 +00:00
David Welch 9ab512dafc Correct implementation of user-mode APCs
svn path=/trunk/; revision=1401
2000-10-11 20:50:35 +00:00
David Welch a254e64d73 Added multiboot support to ntoskrnl
Updated loadros to boot new kernel
Corrected thread priority bugs
Removed Linux port io
Added system call entry/exit that updates PreviousMode
Changes to allow ntoskrnl to be built without optimization
Updated make system
Added PCR
Most components can be built without special spec file

svn path=/trunk/; revision=1385
2000-10-07 13:41:58 +00:00
Phillip Susi 4ca3269e59 Added pointer to win32k data in ETHREAD
svn path=/trunk/; revision=1338
2000-09-06 02:57:24 +00:00
David Welch d351d182ef Added working set functions
Seperated memory manager initialization
Seperated trap functions
Removed process/thread definitions from ddk headers
Changed indentation back to sane style (please don't change)

svn path=/trunk/; revision=1224
2000-07-04 08:52:47 +00:00
Eric Kohl 83e4b66c10 Fixed Ps macros
svn path=/trunk/; revision=1218
2000-07-01 22:38:15 +00:00
David Welch cc95f73421 Made header file usage more consistent
Tried to reduce dependancies between layers by moving ntoskrnl's private
header files inside its directory
Removed the need to include windows.h for ddk code
Removed obsolete testing code

svn path=/trunk/; revision=1213
2000-06-29 23:35:53 +00:00
Renamed from reactos/include/internal/ps.h (Browse further)