diff options
author | midipix <writeonce@midipix.org> | 2015-07-27 04:01:18 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2015-07-27 04:01:18 -0400 |
commit | dd89bb8ad4fe184a34b5dbdda237e640fc82121b (patch) | |
tree | 5e80d2da35f5892f92be29f57982b2708e6bd99b /src/sync/ntapi_tt_wait_for_dummy_event.c | |
parent | dcdadc2702712fa750ed255ed1dfa354522797a0 (diff) | |
download | ntapi-dd89bb8ad4fe184a34b5dbdda237e640fc82121b.tar.bz2 ntapi-dd89bb8ad4fe184a34b5dbdda237e640fc82121b.tar.xz |
entered advanced internal development stage.
Diffstat (limited to 'src/sync/ntapi_tt_wait_for_dummy_event.c')
-rw-r--r-- | src/sync/ntapi_tt_wait_for_dummy_event.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/sync/ntapi_tt_wait_for_dummy_event.c b/src/sync/ntapi_tt_wait_for_dummy_event.c new file mode 100644 index 0000000..c7680c7 --- /dev/null +++ b/src/sync/ntapi_tt_wait_for_dummy_event.c @@ -0,0 +1,31 @@ +/********************************************************/ +/* ntapi: Native API core library */ +/* Copyright (C) 2013,2014,2015 Z. Gilboa */ +/* Released under GPLv2 and GPLv3; see COPYING.NTAPI. */ +/********************************************************/ + +#include <psxtypes/psxtypes.h> +#include <ntapi/nt_object.h> +#include <ntapi/nt_sync.h> +#include <ntapi/ntapi.h> +#include "ntapi_impl.h" + +int32_t __stdcall __ntapi_tt_wait_for_dummy_event(void) +{ + /* wait forever without setting a break point and without spinning */ + + int32_t status; + void * hevent; + + status = __ntapi->tt_create_inheritable_event( + &hevent, + NT_NOTIFICATION_EVENT, + NT_EVENT_NOT_SIGNALED); + + if (status != NT_STATUS_SUCCESS) + return status; + + return __ntapi->zw_wait_for_single_object(hevent,0,0); + + return status; +} |