[ros-kernel] Differences between ntdll and ntoskrnl Rtl functions

Skywing skywing at valhallalegends.com
Sun May 30 22:00:52 CEST 2004


The bitmaps being different is a bug.  Dunno about why the fastmutex
acquisition is commented in kmode for atom tables.

In general, the only things that should change are memory allocation calls
and in some cases synchronization calls (RTL_CRITICAL_SECTIONs -> some other
appropriate mechanism).  Even then, kernel mode RTL implements Rtl*Heap
functions, so stuff using Rtl*Heap for memory doesn't need modifying (though
the heap implementations themselves may).

Also, all RTL routines can rely on only being used from passive level -- but
I may be wrong on this for certain special case very simple routines (like
the large integer support stuff, perhaps).

-----Original Message-----
From: ros-kernel-bounces at reactos.com [mailto:ros-kernel-bounces at reactos.com]
On Behalf Of Gunnar Dalsnes
Sent: Saturday, May 29, 2004 10:24 PM
To: 'ReactOS Kernel List'
Subject: [ros-kernel] Differences between ntdll and ntoskrnl Rtl functions

Hi,

I'm currently creating a Rtl library, merging the common ntdll and ntoskrnl
Rtl routines. So far i have merged unicode.c, nls.c, random.c, compress.c
and largeint.c. I'm trying to sort out some differences in other files and
need help:

Bitmap.c:
ntdll:
Ptr = (PUCHAR)BitMapHeader->Buffer + (StartingIndex / 8); etc. etc.

Ntoskrnl:
Ptr = (PULONG)BitMapHeader->Buffer + (StartingIndex / 32); etc. etc.

Any reason for this difference?


Atom.c:
Ntdll:
static BOOLEAN
RtlpLockAtomTable(PRTL_ATOM_TABLE AtomTable)
{
   RtlEnterCriticalSection((PCRITICAL_SECTION)AtomTable->Lock);
   return TRUE;
}


static VOID
RtlpUnlockAtomTable(PRTL_ATOM_TABLE AtomTable)
{
   RtlLeaveCriticalSection((PCRITICAL_SECTION)AtomTable->Lock);
}

Ntoskrnl:
static BOOLEAN
RtlpLockAtomTable(PRTL_ATOM_TABLE AtomTable)
{
   //   ExAcquireFastMutex((PFAST_MUTEX)AtomTable->Lock);
   return TRUE;
}

static VOID
RtlpUnlockAtomTable(PRTL_ATOM_TABLE AtomTable)
{
   //   ExReleaseFastMutex((PFAST_MUTEX)AtomTable->Lock);
}

Any reason for why the locking of atom tables in ntoskrnl is commented out?

-Gunnar

_______________________________________________
Ros-kernel mailing list
Ros-kernel at reactos.com
http://reactos.com/mailman/listinfo/ros-kernel




More information about the Ros-kernel mailing list