From 6445d5ff7e35e9ed6e54ce420931ad9676be5e7d Mon Sep 17 00:00:00 2001 From: midipix Date: Fri, 28 Jun 2019 01:33:27 +0000 Subject: remove nt_sync_block and related interfaces in favor of pure atomic primitives. --- include/ntapi/nt_sync.h | 57 +------------------------------------------------ 1 file changed, 1 insertion(+), 56 deletions(-) (limited to 'include/ntapi/nt_sync.h') diff --git a/include/ntapi/nt_sync.h b/include/ntapi/nt_sync.h index 2057632..700be38 100644 --- a/include/ntapi/nt_sync.h +++ b/include/ntapi/nt_sync.h @@ -54,9 +54,6 @@ typedef enum _nt_io_completion_info_class { } nt_io_completion_info_class; -/* cache block size */ -#define NT_SYNC_BLOCK_SIZE 64 - /* timer access bits */ #define NT_TIMER_QUERY_STATE 0x00000001U #define NT_TIMER_MODIFY_STATE 0x00000002U @@ -89,9 +86,7 @@ typedef enum _nt_io_completion_info_class { #define NT_SYNC_NON_ALERTABLE 0x00000000U #define NT_SYNC_ALERTABLE 0x00000001U -/* sync block flag bits */ -#define NT_SYNC_BLOCK_YIELD_TO_SERVER 0x00000001U - +/* sync structures */ typedef struct _nt_timer_basic_information { nt_large_integer timer_remaining; int32_t signal_state; @@ -122,25 +117,6 @@ typedef struct _nt_io_completion_basic_information { } nt_io_completion_basic_information; -typedef union __attr_aligned__(NT_SYNC_BLOCK_SIZE) _nt_sync_block { - intptr_t cache_line[NT_SYNC_BLOCK_SIZE/sizeof(intptr_t)]; - struct { - int32_t tid; - int32_t pid; - uint32_t flags; - uint32_t srvtid; - int32_t lock_tries; - uint32_t ref_cnt; - uint32_t busy; - int32_t invalid; - nt_timeout lock_wait; - void * hwait; - void * hsignal; - void * hserver; - }; -} nt_sync_block; - - typedef void __stdcall nt_timer_apc_routine( void * timer_context, uint32_t timer_low_value, @@ -385,37 +361,6 @@ typedef int32_t __stdcall ntapi_tt_create_private_event( __in int32_t initial_state); -typedef void __stdcall ntapi_tt_sync_block_init( - __in nt_sync_block * sync_block, - __in uint32_t flags __optional, - __in int32_t srvtid __optional, - __in int32_t default_lock_tries __optional, - __in int64_t default_lock_wait __optional, - __in void * hsignal __optional); - - -typedef int32_t __stdcall ntapi_tt_sync_block_discard( - __in nt_sync_block * sync_block); - - -typedef int32_t __stdcall ntapi_tt_sync_block_lock( - __in nt_sync_block * sync_block, - __in int32_t lock_tries __optional, - __in int64_t lock_wait __optional, - __in uint32_t * sig_flag __optional); - - -typedef int32_t __stdcall ntapi_tt_sync_block_unlock( - __in nt_sync_block * sync_block); - - -typedef int32_t __stdcall ntapi_tt_sync_block_server_lock( - __in nt_sync_block * sync_block, - __in int32_t lock_tries __optional, - __in int64_t lock_wait __optional, - __in uint32_t * sig_flag __optional); - - typedef int32_t __stdcall ntapi_tt_wait_for_dummy_event(void); #endif -- cgit v1.2.3