mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
remove obsolete userobj code
svn path=/trunk/; revision=6761
This commit is contained in:
parent
e900128ead
commit
b478b61c31
6 changed files with 7 additions and 163 deletions
|
@ -1,46 +0,0 @@
|
|||
/* $Id: userobj.h,v 1.2 2003/05/18 17:22:31 ea Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* PURPOSE: USER Object manager interface definition
|
||||
* FILE: include/win32k/userobj.h
|
||||
* PROGRAMER: Rex Jolliff (rex@lvcablemodem.com)
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __WIN32K_USEROBJ_H
|
||||
#define __WIN32K_USEROBJ_H
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
|
||||
#define UO_CLASS_MAGIC 0x5141
|
||||
#define UO_WINDOW_MAGIC 0x5142
|
||||
#define UO_MAGIC_DONTCARE 0xffff
|
||||
|
||||
#define USER_OBJECT_TAG (ULONG)(('W'<<0) + ('3'<<8) + ('2'<<16) + ('U'<<24))
|
||||
|
||||
typedef struct tag_USER_OBJECT_HEADER
|
||||
{
|
||||
WORD magic;
|
||||
DWORD referenceCount;
|
||||
LIST_ENTRY listEntry;
|
||||
FAST_MUTEX mutex;
|
||||
} USER_OBJECT_HEADER, *PUSER_OBJECT_HEADER;
|
||||
|
||||
typedef PVOID PUSER_OBJECT;
|
||||
typedef HANDLE HUSEROBJ;
|
||||
|
||||
#define UserObjectHeaderToBody(header) ((PUSER_OBJECT)(((PCHAR)header)+sizeof(USER_OBJECT_HEADER)))
|
||||
#define UserObjectBodyToHeader(body) ((PUSER_OBJECT_HEADER)(((PCHAR)body)-sizeof(USER_OBJECT_HEADER)))
|
||||
#define UserObjectHeaderToHandle(header) ((HUSEROBJ)header)
|
||||
#define UserObjectHandleToHeader(handle) ((HUSEROBJ)handle)
|
||||
|
||||
PUSER_OBJECT FASTCALL USEROBJ_AllocObject (WORD size, WORD magic);
|
||||
BOOL FASTCALL USEROBJ_FreeObject (PUSER_OBJECT object, WORD magic);
|
||||
HUSEROBJ FASTCALL USEROBJ_PtrToHandle (PUSER_OBJECT object, WORD magic);
|
||||
PUSER_OBJECT FASTCALL USEROBJ_HandleToPtr (HUSEROBJ object, WORD magic);
|
||||
BOOL FASTCALL USEROBJ_LockObject (HUSEROBJ Obj);
|
||||
BOOL FASTCALL USEROBJ_UnlockObject (HUSEROBJ Obj);
|
||||
|
||||
#endif
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: callback.c,v 1.15 2003/11/21 16:36:26 weiden Exp $
|
||||
/* $Id: callback.c,v 1.16 2003/11/23 12:24:20 weiden Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -31,7 +31,6 @@
|
|||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <win32k/win32k.h>
|
||||
#include <win32k/userobj.h>
|
||||
#include <include/class.h>
|
||||
#include <include/error.h>
|
||||
#include <include/winsta.h>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: hotkey.c,v 1.4 2003/11/20 22:28:49 weiden Exp $
|
||||
/* $Id: hotkey.c,v 1.5 2003/11/23 12:24:21 weiden Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -31,7 +31,6 @@
|
|||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <win32k/win32k.h>
|
||||
#include <win32k/userobj.h>
|
||||
#include <internal/ex.h>
|
||||
#include <internal/ps.h>
|
||||
#include <include/error.h>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: input.c,v 1.19 2003/11/17 02:12:52 hyperion Exp $
|
||||
/* $Id: input.c,v 1.20 2003/11/23 12:24:21 weiden Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -31,7 +31,6 @@
|
|||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <win32k/win32k.h>
|
||||
#include <win32k/userobj.h>
|
||||
#include <include/class.h>
|
||||
#include <include/error.h>
|
||||
#include <include/winsta.h>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: metric.c,v 1.15 2003/11/23 11:39:48 navaraf Exp $
|
||||
/* $Id: metric.c,v 1.16 2003/11/23 12:24:21 weiden Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -31,7 +31,6 @@
|
|||
|
||||
#include <ddk/ntddk.h>
|
||||
#include <win32k/win32k.h>
|
||||
#include <win32k/userobj.h>
|
||||
#include <include/class.h>
|
||||
#include <include/error.h>
|
||||
#include <include/winsta.h>
|
||||
|
|
|
@ -16,13 +16,13 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: userobj.c,v 1.2 2003/05/18 17:16:17 ea Exp $
|
||||
/* $Id: userobj.c,v 1.3 2003/11/23 12:24:21 weiden Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* PURPOSE: USER Object manager interface definition
|
||||
* PURPOSE: USER Object counter
|
||||
* FILE: subsys/win32k/ntuser/userobj.c
|
||||
* PROGRAMER: Rex Jolliff (rex@lvcablemodem.com)
|
||||
* PROGRAMER:
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -31,112 +31,6 @@
|
|||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
#include <ddk/ntddk.h>
|
||||
#include <win32k/userobj.h>
|
||||
|
||||
static LIST_ENTRY UserObjectList;
|
||||
|
||||
PUSER_OBJECT FASTCALL USEROBJ_AllocObject (WORD size, WORD magic)
|
||||
{
|
||||
PUSER_OBJECT_HEADER newObject;
|
||||
|
||||
newObject = ExAllocatePoolWithTag(PagedPool,
|
||||
size + sizeof (USER_OBJECT_HEADER),
|
||||
USER_OBJECT_TAG);
|
||||
if (newObject == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
RtlZeroMemory(newObject, size + sizeof (USER_OBJECT_HEADER));
|
||||
|
||||
newObject->magic = magic;
|
||||
ExInitializeFastMutex (&newObject->mutex);
|
||||
InsertTailList (&UserObjectList, &newObject->listEntry);
|
||||
|
||||
return UserObjectHeaderToBody (newObject);
|
||||
}
|
||||
|
||||
BOOL FASTCALL USEROBJ_FreeObject (PUSER_OBJECT object, WORD magic)
|
||||
{
|
||||
PUSER_OBJECT_HEADER objectHeader;
|
||||
|
||||
if (object == NULL)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
objectHeader = UserObjectBodyToHeader (object);
|
||||
if (objectHeader->magic != magic)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
RemoveEntryList (&objectHeader->listEntry);
|
||||
ExFreePool (objectHeader);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
HUSEROBJ FASTCALL USEROBJ_PtrToHandle (PUSER_OBJECT object, WORD magic)
|
||||
{
|
||||
PUSER_OBJECT_HEADER objectHeader;
|
||||
|
||||
if (object == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
objectHeader = UserObjectBodyToHeader (object);
|
||||
if (objectHeader->magic != magic)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return UserObjectHeaderToHandle(objectHeader);
|
||||
}
|
||||
|
||||
PUSER_OBJECT FASTCALL USEROBJ_HandleToPtr (HUSEROBJ handle, WORD magic)
|
||||
{
|
||||
PUSER_OBJECT_HEADER objectHeader;
|
||||
|
||||
if (handle == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
objectHeader = UserObjectHandleToHeader (handle);
|
||||
if ((objectHeader->magic != magic) &&
|
||||
(magic != UO_MAGIC_DONTCARE))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return UserObjectHeaderToBody (objectHeader);
|
||||
}
|
||||
|
||||
BOOL FASTCALL USEROBJ_LockObject (HUSEROBJ objectHandle)
|
||||
{
|
||||
PUSER_OBJECT_HEADER objectHeader;
|
||||
|
||||
if (objectHandle == 0)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
objectHeader = UserObjectHandleToHeader (objectHandle);
|
||||
|
||||
ExAcquireFastMutexUnsafe (&objectHeader->mutex);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL FASTCALL USEROBJ_UnlockObject (HUSEROBJ objectHandle)
|
||||
{
|
||||
PUSER_OBJECT_HEADER objectHeader;
|
||||
|
||||
if (objectHandle == 0)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
objectHeader = UserObjectHandleToHeader (objectHandle);
|
||||
|
||||
ExReleaseFastMutexUnsafe (&objectHeader->mutex);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
Loading…
Reference in a new issue