1999-03-09 18:47:51 +01:00
|
|
|
/*
|
|
|
|
* Process synchronisation
|
|
|
|
*/
|
|
|
|
|
1999-06-12 16:55:11 +02:00
|
|
|
#include <stdio.h>
|
1999-03-09 18:47:51 +01:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <time.h>
|
|
|
|
#include "debugstr.h"
|
1999-05-23 12:25:25 +02:00
|
|
|
#include "debugtools.h"
|
1999-03-09 18:47:51 +01:00
|
|
|
|
|
|
|
#include "ntddk.h"
|
|
|
|
|
1999-04-19 16:56:29 +02:00
|
|
|
DEFAULT_DEBUG_CHANNEL(ntdll)
|
|
|
|
|
1999-03-09 18:47:51 +01:00
|
|
|
/*
|
|
|
|
* Semaphore
|
|
|
|
*/
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* NtCreateSemaphore [NTDLL]
|
|
|
|
*/
|
|
|
|
NTSTATUS WINAPI NtCreateSemaphore(
|
|
|
|
OUT PHANDLE SemaphoreHandle,
|
|
|
|
IN ACCESS_MASK DesiredAccess,
|
|
|
|
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
|
|
|
|
IN ULONG InitialCount,
|
|
|
|
IN ULONG MaximumCount)
|
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(%p,0x%08lx,%p(%s),0x%08lx,0x%08lx) stub!\n",
|
1999-03-09 18:47:51 +01:00
|
|
|
SemaphoreHandle, DesiredAccess, ObjectAttributes,
|
|
|
|
ObjectAttributes ? debugstr_w(ObjectAttributes->ObjectName->Buffer) : NULL,
|
|
|
|
InitialCount, MaximumCount);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* NtOpenSemaphore [NTDLL]
|
|
|
|
*/
|
|
|
|
NTSTATUS WINAPI NtOpenSemaphore(
|
|
|
|
IN HANDLE SemaphoreHandle,
|
|
|
|
IN ACCESS_MASK DesiredAcces,
|
|
|
|
IN POBJECT_ATTRIBUTES ObjectAttributes)
|
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(0x%08x,0x%08lx,%p(%s)) stub!\n",
|
1999-03-09 18:47:51 +01:00
|
|
|
SemaphoreHandle, DesiredAcces, ObjectAttributes,
|
|
|
|
ObjectAttributes ? debugstr_w(ObjectAttributes->ObjectName->Buffer) : NULL);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* NtQuerySemaphore [NTDLL]
|
|
|
|
*/
|
|
|
|
NTSTATUS WINAPI NtQuerySemaphore(
|
|
|
|
HANDLE SemaphoreHandle,
|
|
|
|
PVOID SemaphoreInformationClass,
|
|
|
|
OUT PVOID SemaphoreInformation,
|
|
|
|
ULONG Length,
|
|
|
|
PULONG ReturnLength)
|
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(0x%08x,%p,%p,0x%08lx,%p) stub!\n",
|
1999-03-09 18:47:51 +01:00
|
|
|
SemaphoreHandle, SemaphoreInformationClass, SemaphoreInformation, Length, ReturnLength);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
/******************************************************************************
|
|
|
|
* NtReleaseSemaphore [NTDLL]
|
|
|
|
*/
|
|
|
|
NTSTATUS WINAPI NtReleaseSemaphore(
|
|
|
|
IN HANDLE SemaphoreHandle,
|
|
|
|
IN ULONG ReleaseCount,
|
|
|
|
IN PULONG PreviousCount)
|
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(0x%08x,0x%08lx,%p,) stub!\n",
|
1999-03-09 18:47:51 +01:00
|
|
|
SemaphoreHandle, ReleaseCount, PreviousCount);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Event
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
* NtCreateEvent [NTDLL.71]
|
|
|
|
*/
|
|
|
|
NTSTATUS WINAPI NtCreateEvent(
|
|
|
|
OUT PHANDLE EventHandle,
|
|
|
|
IN ACCESS_MASK DesiredAccess,
|
|
|
|
IN POBJECT_ATTRIBUTES ObjectAttributes,
|
|
|
|
IN BOOLEAN ManualReset,
|
|
|
|
IN BOOLEAN InitialState)
|
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(%p,0x%08lx,%p(%s),%08x,%08x): empty stub\n",
|
1999-03-09 18:47:51 +01:00
|
|
|
EventHandle,DesiredAccess,ObjectAttributes,
|
|
|
|
ObjectAttributes ? debugstr_w(ObjectAttributes->ObjectName->Buffer) : NULL,
|
|
|
|
ManualReset,InitialState);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* NtOpenEvent [NTDLL]
|
|
|
|
*/
|
|
|
|
NTSTATUS WINAPI NtOpenEvent(
|
|
|
|
OUT PHANDLE EventHandle,
|
|
|
|
IN ACCESS_MASK DesiredAccess,
|
|
|
|
IN POBJECT_ATTRIBUTES ObjectAttributes)
|
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(%p,0x%08lx,%p(%s)),stub!\n",
|
1999-03-09 18:47:51 +01:00
|
|
|
EventHandle,DesiredAccess,ObjectAttributes,
|
|
|
|
ObjectAttributes ? debugstr_w(ObjectAttributes->ObjectName->Buffer) : NULL);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* NtSetEvent [NTDLL]
|
|
|
|
*/
|
|
|
|
NTSTATUS WINAPI NtSetEvent(
|
|
|
|
IN HANDLE EventHandle,
|
|
|
|
PULONG NumberOfThreadsReleased)
|
|
|
|
{
|
1999-05-23 12:25:25 +02:00
|
|
|
FIXME("(0x%08x,%p)\n",
|
1999-03-09 18:47:51 +01:00
|
|
|
EventHandle, NumberOfThreadsReleased);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|