Alex Ionescu wrote:
> >
> > Well, yes, win32. I've been setup before, but I haven't
> > kept up with the tool chain.
> >
> > Do we still need the djcc stuff for building freeloader?
> >
> > What would be really cool was an MSI that would get me
> > a complete 'ReactoOS' build environment in one simple
> > step. Maybe I'll look into it.
>
> I'm currently working on this exact project!
I'm a newbie. I'm looking for it. Can you tell me something about it?? Thanks.
yang
___________________
Come from China
ion(a)svn.reactos.com wrote:
> + DPRINT("Waiting on Critical Section: %x\n", CriticalSection);
> + if (CriticalSection->DebugInfo) CriticalSection->DebugInfo->EntryCount++;
I'm just reading the diffs here, so I could be way
off, but shouldn't this use an InterlockedIncrement...
otherwise you could get a context switch between
in the middle of your increment to another threading
attempting to lock the critical section. It is just
debug information, but still...
Also, looking at the rest of the code, I notice that
spin count doesn't appear to be implemented.
I don't have a build environment even setup, so
take the attached patch with a grain of salt.
The changes in RtlpCreateCriticalSEctionSem()
are because the InterlockCompareExchangePointer()
should already have written the new event into
the data structure.
Maybe on day I'll manage to get my build environment
setup again.
- Joseph
Index: C:/Users/galb/ReactOS/reactos/lib/ntdll/rtl/critical.c
===================================================================
--- C:/Users/galb/ReactOS/reactos/lib/ntdll/rtl/critical.c (revision 12774)
+++ C:/Users/galb/ReactOS/reactos/lib/ntdll/rtl/critical.c (working copy)
@@ -133,7 +133,17 @@
{
HANDLE Thread = (HANDLE)NtCurrentTeb()->Cid.UniqueThread;
- /* Try to Lock it */
+ /* Try for SpinCount times to Lock it */
+ for(LONG i = 0; i < CriticalSection->SpinCount; i++)
+ {
+ if ( RtlTryEnterCriticalSection(CriticalSection) )
+ return STATUS_SUCCESS;
+ }
+
+ /*
+ * Still didn't get it; we have to bump the LockCount, which
+ * might get it for us, and then wait
+ */
if (InterlockedIncrement(&CriticalSection->LockCount)) {
/*
@@ -398,12 +408,12 @@
/* Increase the Debug Entry count */
DPRINT("Waiting on Critical Section: %x\n", CriticalSection);
- if (CriticalSection->DebugInfo)
CriticalSection->DebugInfo->EntryCount++;
+ if (CriticalSection->DebugInfo)
InterlockedIncrement(&CriticalSection->DebugInfo->EntryCount);
for (;;) {
/* Increase the number of times we've had contention */
- if (CriticalSection->DebugInfo)
CriticalSection->DebugInfo->ContentionCount++;
+ if (CriticalSection->DebugInfo)
InterlockedIncrement(&CriticalSection->DebugInfo->ContentionCount);
/* Wait on the Event */
DPRINT("Waiting on Event: %x\n", CriticalSection->LockSemaphore);
@@ -523,21 +533,14 @@
return;
}
- if (!(hEvent =
InterlockedCompareExchangePointer((PVOID*)&CriticalSection->LockSemaphore,
- (PVOID)hNewEvent,
- 0))) {
-
- /* We created a new event succesffuly */
- hEvent = hNewEvent;
- } else {
-
- /* Some just created an event */
- DPRINT("Closing already created event!\n");
- NtClose(hNewEvent);
+
+ if (
InterlockedCompareExchangePointer((PVOID*)&CriticalSection->LockSemaphore,
+ (PVOID)hNewEvent,
+ 0)) != 0) {
+ /* Someone else just created the event */
+ NtClose(hNewEvent);
}
-
- /* Set either the new or the old */
- CriticalSection->LockSemaphore = hEvent;
+
DPRINT("Event set!\n");
}
Hi,
Attached is a patch with uses the proper PSID/PISID types. Also, I've
noticed that we currently have duplicated code between /lib/rtl and
/ntoskrnl/se. The removals are also in this patch. Is it OK to remove
them, or is there some reason they must be duplicated?
Best regards,
Alex Ionescu
Hi
I am a new comer.
I began to read codes a few days ago, now I installed reactos 0.2.4 in vmware, but it can't do any thing even if I want to copy a file(both command line and GUI), when I do this in GUI, it show me a blue face or do nothing. what do you make up your reactos develop system? It means read, edit, and compile code in reactos. I was on win 32, which emulater is better to run reactos on it? any idea would be appreciated.
Hi,
I've add the following line to my test driver:
extern __attribute__((dllimport)) POBJECT_TYPE* ExEventObjectType;
DbgPrint("%x %x %x %x\n",
ExEventObjectType,
*(PULONG)ExEventObjectType,
MmGetSystemRoutineAddress(&NameU),
*(PULONG)MmGetSystemRoutineAddress(&NameU));
Running on W2K, I get this result:
GCC: 81ebd540 81ebd440 8047a888 81ebd540
MSVC: 8047a888 81ebd540 8047a888 81ebd540
Running on ROS:
GCC: c0692ef8 54545645 c00e0760 c0692ef8
MSVC: c00e0760 c0692ef8 c00e0760 c0692ef8
It seems that GCC and MSVC does handle imported data symbols different.
In MSVC is an imported data symbol a pointer to the variable and in GCC
the value of the variable.
- Hartmut
royce(a)svn.reactos.com wrote:
>don't pass vector<pointer> by value unless you are looking for trouble, also fixed Assert() to take stdargs to make it's usage simpler and less error-prone. Also fixed IsTrue(), etc, to take file and line info by args and created macros to pass that info automatically.
>
>
>
Casper, I made some changes to Assert() and the code that calls it, in
the hope that this is what you really wanted. I apologize sincerely if
you had wanted to do something else with message[], but if you do, I
think it would be easier to do so from within Assert(). I will revert
that part of this patch if you needed the buffer in Assert()'s callers.
> Fix incorrect LPC Object export...we export pointers not the object itself!
Why?
Aren't DATA symbols exported by DLLs pointers?
Emanuele
____________________________________________________________
Libero ADSL: 3 mesi gratis e navighi a 1.2 Mega. E poi hai l'Adsl senza limiti a meno di 1 euro al giorno.
Abbonati subito senza costi di attivazione su http://www.libero.it
Hi,
if you want to replace the Makefile build system, please consider using bjam:
http://boost.org/tools/build/jam_src/
It has the following advantages:
- automatic dependency checking
- resolves dependencies in memory without invoking
multiple levels of Makefiles
- supports nearly every compiler toolset out there, see:
http://boost.org/more/getting_started.html#Tools
On 02.01.2005 23:17:03 chorns(a)svn.reactos.com wrote:
> Add sample build script.
> Added files:
> branches/xmlbuildsystem/reactos/ReactOS.xml
ion(a)svn.reactos.com wrote:
> Fix my previous patch and fix ACCESS_TOKEN being declared as a structure. This is incompatible with DDK/W32API because ACCESS_TOKEN is a PVOID. The real structure is TOKEN. Also, structure has been updated.
>
I think Microsoft declared PACCESS_TOKEN as a void pointer in order to
hide the internals of ACCESS_TOKEN because the average developer does
not need to access it or they don't want to reveal more information than
needed.
Please don't break what's working and revert this patch!
We are using our own set of headers because we need to fix crippled
declarations and add missing ones. If you want to build ReactOS using
the MS SDK and DDK fix them instead of breaking our headers and code.
Regards,
Eric
ion(a)svn.reactos.com schrieb:
> Fix KeRaiseUserException and rename Object Information Structure
Alex,
Please explain why you renamed the DIRECTORY_BASIC_INFORMATION structure
to OBJECT_DIRECTORY_INFORMATION?
All publicly available sources call it DIRECTORY_BASIC_INFORMATION so I
think there is no need to rename it.
Please revert that modification because you are replacing a well-known
structure by an unknown one.
Regards,
Eric