Blame src/sync/ntapi_tt_wait_for_dummy_event.c

dd89bb
/********************************************************/
dd89bb
/*  ntapi: Native API core library                      */
4256e2
/*  Copyright (C) 2013--2016  Z. Gilboa                 */
dd89bb
/*  Released under GPLv2 and GPLv3; see COPYING.NTAPI.  */
dd89bb
/********************************************************/
dd89bb
dd89bb
#include <psxtypes/psxtypes.h>
dd89bb
#include <ntapi/nt_object.h>
dd89bb
#include <ntapi/nt_sync.h>
dd89bb
#include <ntapi/ntapi.h>
dd89bb
#include "ntapi_impl.h"
dd89bb
dd89bb
int32_t __stdcall __ntapi_tt_wait_for_dummy_event(void)
dd89bb
{
dd89bb
	/* wait forever without setting a break point and without spinning */
dd89bb
dd89bb
	int32_t		status;
dd89bb
	void * 		hevent;
dd89bb
dd89bb
	status = __ntapi->tt_create_inheritable_event(
dd89bb
			&hevent,
dd89bb
			NT_NOTIFICATION_EVENT,
dd89bb
			NT_EVENT_NOT_SIGNALED);
dd89bb
dd89bb
	if (status != NT_STATUS_SUCCESS)
dd89bb
		return status;
dd89bb
dd89bb
	return __ntapi->zw_wait_for_single_object(hevent,0,0);
dd89bb
dd89bb
	return status;
dd89bb
}