Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
c627601c
Commit
c627601c
authored
Jul 26, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Convert the server start time to the abs_time_t type.
parent
3095a48d
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
20 additions
and
14 deletions
+20
-14
nt.c
dlls/ntdll/nt.c
+1
-1
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+1
-1
server.c
dlls/ntdll/server.c
+1
-1
time.c
dlls/ntdll/time.c
+4
-2
server_protocol.h
include/wine/server_protocol.h
+2
-2
object.h
server/object.h
+1
-1
protocol.def
server/protocol.def
+1
-1
request.c
server/request.c
+4
-3
thread.c
server/thread.c
+2
-1
trace.c
server/trace.c
+3
-1
No files found.
dlls/ntdll/nt.c
View file @
c627601c
...
...
@@ -683,7 +683,7 @@ NTSTATUS WINAPI NtQuerySystemInformation(
memset
(
&
sti
,
0
,
sizeof
(
sti
));
/* liKeSystemTime, liExpTimeZoneBias, uCurrentTimeZoneId */
RtlSecondsSince1970ToTime
(
server_start_time
,
&
sti
.
liKeBootT
ime
);
NTDLL_from_server_abstime
(
&
sti
.
liKeBootTime
,
&
server_start_t
ime
);
if
(
Length
<=
sizeof
(
sti
))
{
...
...
dlls/ntdll/ntdll_misc.h
View file @
c627601c
...
...
@@ -54,7 +54,7 @@ extern void virtual_init(void);
extern
void
virtual_init_threading
(
void
);
/* server support */
extern
time_t
server_start_time
;
extern
abs_
time_t
server_start_time
;
extern
void
server_init_process
(
void
);
extern
size_t
server_init_thread
(
int
unix_pid
,
int
unix_tid
,
void
*
entry_point
);
extern
void
DECLSPEC_NORETURN
server_protocol_error
(
const
char
*
err
,
...
);
...
...
dlls/ntdll/server.c
View file @
c627601c
...
...
@@ -85,7 +85,7 @@ struct cmsg_fd
};
#endif
/* HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS */
time_t
server_start_time
=
0
;
/* time of server startup */
abs_time_t
server_start_time
=
{
0
,
0
}
;
/* time of server startup */
extern
struct
wine_pthread_functions
pthread_functions
;
...
...
dlls/ntdll/time.c
View file @
c627601c
...
...
@@ -874,7 +874,8 @@ NTSTATUS WINAPI NtQueryPerformanceCounter( PLARGE_INTEGER Counter, PLARGE_INTEGE
* to one of 1.193182 MHz, with some care for arithmetic
* overflow ( will not overflow for 5000 years ) and
* good accuracy ( 105/88 = 1.19318182) */
Counter
->
QuadPart
=
(((
now
.
tv_sec
-
server_start_time
)
*
(
ULONGLONG
)
1000000
+
now
.
tv_usec
)
*
105
)
/
88
;
Counter
->
QuadPart
=
(((
now
.
tv_sec
-
server_start_time
.
sec
)
*
(
ULONGLONG
)
1000000
+
(
now
.
tv_usec
-
server_start_time
.
usec
))
*
105
)
/
88
;
if
(
Frequency
)
Frequency
->
QuadPart
=
1193182
;
return
STATUS_SUCCESS
;
}
...
...
@@ -889,7 +890,8 @@ ULONG WINAPI NtGetTickCount(void)
struct
timeval
current_time
;
gettimeofday
(
&
current_time
,
NULL
);
return
(
current_time
.
tv_sec
-
server_start_time
)
*
1000
+
current_time
.
tv_usec
/
1000
;
return
(
current_time
.
tv_sec
-
server_start_time
.
sec
)
*
1000
+
(
current_time
.
tv_usec
-
server_start_time
.
usec
)
/
1000
;
}
...
...
include/wine/server_protocol.h
View file @
c627601c
...
...
@@ -299,7 +299,7 @@ struct init_thread_reply
process_id_t
pid
;
thread_id_t
tid
;
data_size_t
info_size
;
time_t
server_start
;
abs_time_t
server_start
;
int
version
;
};
...
...
@@ -4385,6 +4385,6 @@ union generic_reply
struct
query_symlink_reply
query_symlink_reply
;
};
#define SERVER_PROTOCOL_VERSION 24
2
#define SERVER_PROTOCOL_VERSION 24
3
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/object.h
View file @
c627601c
...
...
@@ -213,6 +213,6 @@ extern int foreground;
extern
const
char
*
server_argv0
;
/* server start time used for GetTickCount() */
extern
time_t
server_start_time
;
extern
struct
timeval
server_start_time
;
#endif
/* __WINE_SERVER_OBJECT_H */
server/protocol.def
View file @
c627601c
...
...
@@ -284,7 +284,7 @@ struct token_groups
process_id_t pid; /* process id of the new thread's process */
thread_id_t tid; /* thread id of the new thread */
data_size_t info_size; /* total size of startup info */
time_t
server_start; /* server start time */
abs_time_t
server_start; /* server start time */
int version; /* protocol version */
@END
...
...
server/request.c
View file @
c627601c
...
...
@@ -114,7 +114,7 @@ static const struct fd_ops master_socket_fd_ops =
struct
thread
*
current
=
NULL
;
/* thread handling the current request */
unsigned
int
global_error
=
0
;
/* global error code for when no thread is current */
time_t
server_start_time
=
0
;
/* server startup time */
struct
timeval
server_start_time
=
{
0
,
0
}
;
/* server startup time */
static
struct
master_socket
*
master_socket
;
/* the master socket object */
...
...
@@ -465,7 +465,8 @@ unsigned int get_tick_count(void)
{
struct
timeval
t
;
gettimeofday
(
&
t
,
NULL
);
return
((
t
.
tv_sec
-
server_start_time
)
*
1000
)
+
(
t
.
tv_usec
/
1000
);
return
((
t
.
tv_sec
-
server_start_time
.
tv_sec
)
*
1000
)
+
((
t
.
tv_usec
-
server_start_time
.
tv_usec
)
/
1000
);
}
static
void
master_socket_dump
(
struct
object
*
obj
,
int
verbose
)
...
...
@@ -798,7 +799,7 @@ void open_master_socket(void)
msghdr
.
msg_iovlen
=
1
;
/* init startup time */
server_start_time
=
time
(
NULL
);
gettimeofday
(
&
server_start_time
,
NULL
);
}
/* master socket timer expiration handler */
...
...
server/thread.c
View file @
c627601c
...
...
@@ -889,7 +889,8 @@ DECL_HANDLER(init_thread)
reply
->
pid
=
get_process_id
(
process
);
reply
->
tid
=
get_thread_id
(
current
);
reply
->
version
=
SERVER_PROTOCOL_VERSION
;
reply
->
server_start
=
server_start_time
;
reply
->
server_start
.
sec
=
server_start_time
.
tv_sec
;
reply
->
server_start
.
usec
=
server_start_time
.
tv_usec
;
return
;
error
:
...
...
server/trace.c
View file @
c627601c
...
...
@@ -697,7 +697,9 @@ static void dump_init_thread_reply( const struct init_thread_reply *req )
fprintf
(
stderr
,
" pid=%04x,"
,
req
->
pid
);
fprintf
(
stderr
,
" tid=%04x,"
,
req
->
tid
);
fprintf
(
stderr
,
" info_size=%u,"
,
req
->
info_size
);
fprintf
(
stderr
,
" server_start=%ld,"
,
(
long
)
req
->
server_start
);
fprintf
(
stderr
,
" server_start="
);
dump_abs_time
(
&
req
->
server_start
);
fprintf
(
stderr
,
","
);
fprintf
(
stderr
,
" version=%d"
,
req
->
version
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment