ntdll: Renamed the NTDLL_get/from_server_timeout functions since they don't deal only with timeouts.
This commit is contained in:
parent
ce40ef18df
commit
3ca608b1b3
|
@ -39,8 +39,8 @@ extern void set_cpu_context( const CONTEXT *context );
|
|||
extern LPCSTR debugstr_us( const UNICODE_STRING *str );
|
||||
extern void dump_ObjectAttributes (const OBJECT_ATTRIBUTES *ObjectAttributes);
|
||||
|
||||
extern void NTDLL_get_server_timeout( abs_time_t *when, const LARGE_INTEGER *timeout );
|
||||
extern void NTDLL_from_server_timeout( LARGE_INTEGER *timeout, const abs_time_t *when );
|
||||
extern void NTDLL_get_server_abstime( abs_time_t *when, const LARGE_INTEGER *timeout );
|
||||
extern void NTDLL_from_server_abstime( LARGE_INTEGER *time, const abs_time_t *when );
|
||||
extern NTSTATUS NTDLL_wait_for_multiple_objects( UINT count, const HANDLE *handles, UINT flags,
|
||||
const LARGE_INTEGER *timeout, HANDLE signal_object );
|
||||
|
||||
|
|
|
@ -236,8 +236,8 @@ NTSTATUS WINAPI NtQueryInformationProcess(
|
|||
req->handle = ProcessHandle;
|
||||
if ((ret = wine_server_call( req )) == STATUS_SUCCESS)
|
||||
{
|
||||
NTDLL_from_server_timeout(&pti.CreateTime, &reply->start_time);
|
||||
NTDLL_from_server_timeout(&pti.ExitTime, &reply->end_time);
|
||||
NTDLL_from_server_abstime(&pti.CreateTime, &reply->start_time);
|
||||
NTDLL_from_server_abstime(&pti.ExitTime, &reply->end_time);
|
||||
}
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
|
|
|
@ -484,7 +484,7 @@ NTSTATUS WINAPI NtSetTimer(IN HANDLE handle,
|
|||
req->expire.sec = 0;
|
||||
req->expire.usec = 0;
|
||||
}
|
||||
else NTDLL_get_server_timeout( &req->expire, when );
|
||||
else NTDLL_get_server_abstime( &req->expire, when );
|
||||
|
||||
req->handle = handle;
|
||||
req->period = period;
|
||||
|
@ -564,7 +564,7 @@ NTSTATUS WINAPI NtQueryTimer(
|
|||
status = wine_server_call(req);
|
||||
|
||||
/* convert server time to absolute NTDLL time */
|
||||
NTDLL_from_server_timeout(&basic_info->RemainingTime, &reply->when);
|
||||
NTDLL_from_server_abstime(&basic_info->RemainingTime, &reply->when);
|
||||
basic_info->TimerState = reply->signaled;
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
|
@ -721,7 +721,7 @@ NTSTATUS NTDLL_wait_for_multiple_objects( UINT count, const HANDLE *handles, UIN
|
|||
req->flags = flags;
|
||||
req->cookie = &cookie;
|
||||
req->signal = signal_object;
|
||||
NTDLL_get_server_timeout( &req->timeout, timeout );
|
||||
NTDLL_get_server_abstime( &req->timeout, timeout );
|
||||
wine_server_add_data( req, handles, count * sizeof(HANDLE) );
|
||||
ret = wine_server_call( req );
|
||||
}
|
||||
|
@ -819,7 +819,7 @@ NTSTATUS WINAPI NtDelayExecution( BOOLEAN alertable, const LARGE_INTEGER *timeou
|
|||
{
|
||||
abs_time_t when;
|
||||
|
||||
NTDLL_get_server_timeout( &when, timeout );
|
||||
NTDLL_get_server_abstime( &when, timeout );
|
||||
|
||||
/* Note that we yield after establishing the desired timeout */
|
||||
NtYieldExecution();
|
||||
|
|
|
@ -435,11 +435,11 @@ static inline int IsLeapYear(int Year)
|
|||
}
|
||||
|
||||
/***********************************************************************
|
||||
* NTDLL_get_server_timeout
|
||||
* NTDLL_get_server_abstime
|
||||
*
|
||||
* Convert a NTDLL timeout into a timeval struct to send to the server.
|
||||
* Convert a NTDLL time into an abs_time_t struct to send to the server.
|
||||
*/
|
||||
void NTDLL_get_server_timeout( abs_time_t *when, const LARGE_INTEGER *timeout )
|
||||
void NTDLL_get_server_abstime( abs_time_t *when, const LARGE_INTEGER *timeout )
|
||||
{
|
||||
UINT remainder;
|
||||
|
||||
|
@ -484,14 +484,14 @@ void NTDLL_get_server_timeout( abs_time_t *when, const LARGE_INTEGER *timeout )
|
|||
|
||||
|
||||
/***********************************************************************
|
||||
* NTDLL_from_server_timeout
|
||||
* NTDLL_from_server_abstime
|
||||
*
|
||||
* Convert a timeval struct from the server into an NTDLL timeout.
|
||||
* Convert a timeval struct from the server into an NTDLL time.
|
||||
*/
|
||||
void NTDLL_from_server_timeout( LARGE_INTEGER *timeout, const abs_time_t *when )
|
||||
void NTDLL_from_server_abstime( LARGE_INTEGER *time, const abs_time_t *when )
|
||||
{
|
||||
timeout->QuadPart = when->sec * (ULONGLONG)TICKSPERSEC + TICKS_1601_TO_1970;
|
||||
timeout->QuadPart += when->usec * 10;
|
||||
time->QuadPart = when->sec * (ULONGLONG)TICKSPERSEC + TICKS_1601_TO_1970;
|
||||
time->QuadPart += when->usec * 10;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue