Commit e9410791 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Reimplement local atom tables in user space.

parent e8309758
...@@ -153,6 +153,8 @@ static void test_NtAtom(void) ...@@ -153,6 +153,8 @@ static void test_NtAtom(void)
ok(!res, "We're unable to create an atom table with a valid table size retval: %x\n", res); ok(!res, "We're unable to create an atom table with a valid table size retval: %x\n", res);
if (!res) if (!res)
{ {
ok( *(DWORD *)AtomTable == 0x6d6f7441, "wrong signature %x\n", *(DWORD *)AtomTable );
res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom1); res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom1);
ok(!res, "We were unable to add a simple atom to the atom table, retval: %x\n", res); ok(!res, "We were unable to add a simple atom to the atom table, retval: %x\n", res);
......
...@@ -2154,12 +2154,6 @@ typedef struct _PORT_MESSAGE_HEADER { ...@@ -2154,12 +2154,6 @@ typedef struct _PORT_MESSAGE_HEADER {
typedef unsigned short RTL_ATOM, *PRTL_ATOM; typedef unsigned short RTL_ATOM, *PRTL_ATOM;
/* Wine doesn't implement atom table as NT does:
* - in NT, atom tables are user space tables, which ntdll directly accesses
* - on Wine, (even local) atom tables are wineserver objects, hence a HANDLE
*/
typedef struct atom_table *RTL_ATOM_TABLE, **PRTL_ATOM_TABLE;
typedef enum _ATOM_INFORMATION_CLASS { typedef enum _ATOM_INFORMATION_CLASS {
AtomBasicInformation = 0, AtomBasicInformation = 0,
AtomTableInformation = 1, AtomTableInformation = 1,
...@@ -2190,6 +2184,26 @@ typedef struct _RTL_HANDLE_TABLE ...@@ -2190,6 +2184,26 @@ typedef struct _RTL_HANDLE_TABLE
PVOID MaxHandle; /* 0x1c */ PVOID MaxHandle; /* 0x1c */
} RTL_HANDLE_TABLE; } RTL_HANDLE_TABLE;
typedef struct _RTL_ATOM_TABLE_ENTRY
{
struct _RTL_ATOM_TABLE_ENTRY *HashLink;
WORD HandleIndex;
WORD Atom;
WORD ReferenceCount;
UCHAR Flags;
UCHAR NameLength;
WCHAR Name[1];
} RTL_ATOM_TABLE_ENTRY, *PRTL_ATOM_TABLE_ENTRY;
typedef struct _RTL_ATOM_TABLE
{
ULONG Signature;
RTL_CRITICAL_SECTION CriticalSection;
RTL_HANDLE_TABLE HandleTable;
ULONG NumberOfBuckets;
RTL_ATOM_TABLE_ENTRY *Buckets[1];
} *RTL_ATOM_TABLE, **PRTL_ATOM_TABLE;
/*********************************************************************** /***********************************************************************
* Defines * Defines
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment