ReactOS 0.4.15-dev-8219-ge8b88cf
sync.c File Reference
#include "k32_vista.h"
#include <debug.h>
Include dependency graph for sync.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

VOID WINAPI AcquireSRWLockExclusive (PSRWLOCK Lock)
 
VOID WINAPI AcquireSRWLockShared (PSRWLOCK Lock)
 
VOID WINAPI InitializeConditionVariable (PCONDITION_VARIABLE ConditionVariable)
 
VOID WINAPI InitializeSRWLock (PSRWLOCK Lock)
 
VOID WINAPI ReleaseSRWLockExclusive (PSRWLOCK Lock)
 
VOID WINAPI ReleaseSRWLockShared (PSRWLOCK Lock)
 
FORCEINLINE PLARGE_INTEGER GetNtTimeout (PLARGE_INTEGER Time, DWORD Timeout)
 
BOOL WINAPI SleepConditionVariableCS (PCONDITION_VARIABLE ConditionVariable, PCRITICAL_SECTION CriticalSection, DWORD Timeout)
 
BOOL WINAPI SleepConditionVariableSRW (PCONDITION_VARIABLE ConditionVariable, PSRWLOCK Lock, DWORD Timeout, ULONG Flags)
 
VOID WINAPI WakeAllConditionVariable (PCONDITION_VARIABLE ConditionVariable)
 
VOID WINAPI WakeConditionVariable (PCONDITION_VARIABLE ConditionVariable)
 
BOOL WINAPI InitializeCriticalSectionEx (OUT LPCRITICAL_SECTION lpCriticalSection, IN DWORD dwSpinCount, IN DWORD flags)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 3 of file sync.c.

Function Documentation

◆ AcquireSRWLockExclusive()

VOID WINAPI AcquireSRWLockExclusive ( PSRWLOCK  Lock)

Definition at line 8 of file sync.c.

9{
11}
NTSYSAPI void WINAPI RtlAcquireSRWLockExclusive(RTL_SRWLOCK *)
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:127

Referenced by cache_insert(), compound_encode_send_decode(), create_new_rpc_auth(), deleg_lock_update(), delegation_flush_locks(), delegation_recovery_status(), delegation_remove(), delete_stale_component(), device_fetch(), do_open(), file_layout_fetch(), file_layout_recall(), file_layout_return(), get_volume_size_info(), handle_nfs41_set_size(), layout_commit(), nfs41_attr_cache_update(), nfs41_client_delegation_return_lru(), nfs41_client_renew(), nfs41_delegate_open(), nfs41_delegation_recall(), nfs41_delegation_remove_srvopen(), nfs41_delegation_return(), nfs41_delegation_to_open(), nfs41_name_cache_delegreturn(), nfs41_name_cache_insert(), nfs41_name_cache_remove(), nfs41_name_cache_rename(), nfs41_send_compound(), nfs41_session_create(), nfs41_session_free(), nfs41_session_renew(), nfs41_superblock_for_fh(), nfs41_superblock_space_changed(), open_lock_add(), open_lock_delegate(), open_state_rename(), open_unlock_delegate(), open_unlock_remove(), pnfs_data_server_client(), pnfs_layout_io_finished(), pnfs_layout_recall_fenced(), pnfs_layout_state_close(), pnfs_layout_state_open(), pnfs_read(), pnfs_write(), recover_delegation_open(), recover_delegation_want(), recover_locks(), recover_open(), referral_resolve(), rpc_reconnect(), rpc_renew_in_progress(), rpc_should_retry(), and server_addrs_add().

◆ AcquireSRWLockShared()

◆ GetNtTimeout()

FORCEINLINE PLARGE_INTEGER GetNtTimeout ( PLARGE_INTEGER  Time,
DWORD  Timeout 
)

Definition at line 50 of file sync.c.

51{
52 if (Timeout == INFINITE) return NULL;
53 Time->QuadPart = (ULONGLONG)Timeout * -10000;
54 return Time;
55}
#define NULL
Definition: types.h:112
#define INFINITE
Definition: serial.h:102
static PLARGE_INTEGER Time
Definition: time.c:105
static ULONG Timeout
Definition: ping.c:61
uint64_t ULONGLONG
Definition: typedefs.h:67
LONGLONG QuadPart
Definition: typedefs.h:114

Referenced by SleepConditionVariableCS(), and SleepConditionVariableSRW().

◆ InitializeConditionVariable()

VOID WINAPI InitializeConditionVariable ( PCONDITION_VARIABLE  ConditionVariable)

Definition at line 22 of file sync.c.

23{
25}
NTSYSAPI VOID NTAPI RtlInitializeConditionVariable(_Out_ PRTL_CONDITION_VARIABLE ConditionVariable)

Referenced by delegation_create(), layout_state_create(), nfs41_client_create(), and session_alloc().

◆ InitializeCriticalSectionEx()

BOOL WINAPI InitializeCriticalSectionEx ( OUT LPCRITICAL_SECTION  lpCriticalSection,
IN DWORD  dwSpinCount,
IN DWORD  flags 
)

Definition at line 107 of file sync.c.

110{
112
113 /* FIXME: Flags ignored */
114
115 /* Initialize the critical section */
117 (PRTL_CRITICAL_SECTION)lpCriticalSection,
118 dwSpinCount);
119 if (!NT_SUCCESS(Status))
120 {
121 /* Set failure code */
123 return FALSE;
124 }
125
126 /* Success */
127 return TRUE;
128}
LONG NTSTATUS
Definition: precomp.h:26
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define SetLastError(x)
Definition: compat.h:752
Status
Definition: gdiplustypes.h:25
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
NTSYSAPI NTSTATUS NTAPI RtlInitializeCriticalSectionAndSpinCount(_In_ PRTL_CRITICAL_SECTION CriticalSection, _In_ ULONG SpinCount)

◆ InitializeSRWLock()

◆ ReleaseSRWLockExclusive()

VOID WINAPI ReleaseSRWLockExclusive ( PSRWLOCK  Lock)

Definition at line 36 of file sync.c.

37{
39}
NTSYSAPI void WINAPI RtlReleaseSRWLockExclusive(RTL_SRWLOCK *)

Referenced by cache_insert(), compound_encode_send_decode(), create_new_rpc_auth(), deleg_lock_update(), delegation_flush_locks(), delegation_recovery_status(), delegation_remove(), delete_stale_component(), device_fetch(), do_open(), file_layout_fetch(), file_layout_recall(), file_layout_return(), get_volume_size_info(), handle_nfs41_set_size(), layout_commit(), nfs41_attr_cache_update(), nfs41_client_delegation_return_lru(), nfs41_client_renew(), nfs41_delegate_open(), nfs41_delegation_recall(), nfs41_delegation_remove_srvopen(), nfs41_delegation_return(), nfs41_delegation_to_open(), nfs41_name_cache_delegreturn(), nfs41_name_cache_insert(), nfs41_name_cache_remove(), nfs41_name_cache_rename(), nfs41_send_compound(), nfs41_session_create(), nfs41_session_free(), nfs41_session_renew(), nfs41_superblock_for_fh(), nfs41_superblock_space_changed(), open_lock_add(), open_lock_delegate(), open_state_rename(), open_unlock_delegate(), open_unlock_remove(), pnfs_data_server_client(), pnfs_layout_io_finished(), pnfs_layout_recall_fenced(), pnfs_layout_state_close(), pnfs_layout_state_open(), pnfs_read(), pnfs_write(), recover_delegation_open(), recover_delegation_want(), recover_locks(), recover_open(), referral_resolve(), rpc_reconnect(), rpc_renew_in_progress(), rpc_should_retry(), and server_addrs_add().

◆ ReleaseSRWLockShared()

◆ SleepConditionVariableCS()

BOOL WINAPI SleepConditionVariableCS ( PCONDITION_VARIABLE  ConditionVariable,
PCRITICAL_SECTION  CriticalSection,
DWORD  Timeout 
)

Definition at line 59 of file sync.c.

60{
63
66 {
68 return FALSE;
69 }
70 return TRUE;
71}
FORCEINLINE PLARGE_INTEGER GetNtTimeout(PLARGE_INTEGER Time, DWORD Timeout)
Definition: sync.c:50
CRITICAL_SECTION CriticalSection
Definition: iprtprio.c:40
NTSYSAPI NTSTATUS NTAPI RtlSleepConditionVariableCS(_Inout_ PRTL_CONDITION_VARIABLE ConditionVariable, _Inout_ PRTL_CRITICAL_SECTION CriticalSection, _In_opt_ PLARGE_INTEGER TimeOut)
#define STATUS_TIMEOUT
Definition: ntstatus.h:81

Referenced by nfs41_recover_stateid(), nfs41_recovery_start_or_wait(), and nfs41_session_get_slot().

◆ SleepConditionVariableSRW()

BOOL WINAPI SleepConditionVariableSRW ( PCONDITION_VARIABLE  ConditionVariable,
PSRWLOCK  Lock,
DWORD  Timeout,
ULONG  Flags 
)

Definition at line 75 of file sync.c.

76{
79
82 {
84 return FALSE;
85 }
86 return TRUE;
87}
NTSYSAPI NTSTATUS NTAPI RtlSleepConditionVariableSRW(_Inout_ PRTL_CONDITION_VARIABLE ConditionVariable, _Inout_ PRTL_SRWLOCK SRWLock, _In_opt_ PLARGE_INTEGER TimeOut, _In_ ULONG Flags)
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170

Referenced by file_layout_return(), layout_fetch(), nfs41_delegate_open(), nfs41_delegation_return(), nfs41_delegation_to_open(), and nfs41_open_stateid_arg().

◆ WakeAllConditionVariable()

VOID WINAPI WakeAllConditionVariable ( PCONDITION_VARIABLE  ConditionVariable)

Definition at line 91 of file sync.c.

92{
94}
NTSYSAPI VOID NTAPI RtlWakeAllConditionVariable(_Inout_ PRTL_CONDITION_VARIABLE ConditionVariable)

Referenced by delegation_remove(), init_slot_table(), nfs41_delegation_to_open(), nfs41_recovery_finish(), nfs41_session_free_slot(), and resize_slot_table().

◆ WakeConditionVariable()

VOID WINAPI WakeConditionVariable ( PCONDITION_VARIABLE  ConditionVariable)

Definition at line 98 of file sync.c.

99{
101}
NTSYSAPI VOID NTAPI RtlWakeConditionVariable(_Inout_ PRTL_CONDITION_VARIABLE ConditionVariable)

Referenced by file_layout_return(), and layout_fetch().