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
026dd2d8
Commit
026dd2d8
authored
Jul 20, 2006
by
Stefan Siebert
Committed by
Alexandre Julliard
Jul 21, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implementation of process CreationTime and ExitTime.
parent
51cd07c3
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
4 deletions
+33
-4
time.c
dlls/kernel/time.c
+6
-1
process.c
dlls/ntdll/process.c
+12
-1
server_protocol.h
include/wine/server_protocol.h
+3
-1
process.c
server/process.c
+4
-0
protocol.def
server/protocol.def
+2
-0
trace.c
server/trace.c
+6
-1
No files found.
dlls/kernel/time.c
View file @
026dd2d8
...
...
@@ -575,16 +575,21 @@ static void TIME_ClockTimeToFileTime(clock_t unix_time, LPFILETIME filetime)
* Also, there is a need to separate times used by different applications.
*
* BUGS
*
lpCreationTime and lpExitTime are not initialised in the Wine implementation.
*
KernelTime and UserTime are always for the current process
*/
BOOL
WINAPI
GetProcessTimes
(
HANDLE
hprocess
,
LPFILETIME
lpCreationTime
,
LPFILETIME
lpExitTime
,
LPFILETIME
lpKernelTime
,
LPFILETIME
lpUserTime
)
{
struct
tms
tms
;
KERNEL_USER_TIMES
pti
;
times
(
&
tms
);
TIME_ClockTimeToFileTime
(
tms
.
tms_utime
,
lpUserTime
);
TIME_ClockTimeToFileTime
(
tms
.
tms_stime
,
lpKernelTime
);
if
(
NtQueryInformationProcess
(
hprocess
,
ProcessTimes
,
&
pti
,
sizeof
(
pti
),
NULL
))
return
FALSE
;
LL2FILETIME
(
pti
.
CreateTime
.
QuadPart
,
lpCreationTime
);
LL2FILETIME
(
pti
.
ExitTime
.
QuadPart
,
lpExitTime
);
return
TRUE
;
}
...
...
dlls/ntdll/process.c
View file @
026dd2d8
...
...
@@ -228,9 +228,20 @@ NTSTATUS WINAPI NtQueryInformationProcess(
ret
=
STATUS_INVALID_HANDLE
;
else
{
/* FIXME :
real data
*/
/* FIXME :
User- and KernelTime have to be implemented
*/
memset
(
&
pti
,
0
,
sizeof
(
KERNEL_USER_TIMES
));
SERVER_START_REQ
(
get_process_info
)
{
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
);
}
}
SERVER_END_REQ
;
memcpy
(
ProcessInformation
,
&
pti
,
sizeof
(
KERNEL_USER_TIMES
));
len
=
sizeof
(
KERNEL_USER_TIMES
);
...
...
include/wine/server_protocol.h
View file @
026dd2d8
...
...
@@ -347,6 +347,8 @@ struct get_process_info_reply
int
priority
;
int
affinity
;
void
*
peb
;
abs_time_t
start_time
;
abs_time_t
end_time
;
};
...
...
@@ -4383,6 +4385,6 @@ union generic_reply
struct
query_symlink_reply
query_symlink_reply
;
};
#define SERVER_PROTOCOL_VERSION 23
8
#define SERVER_PROTOCOL_VERSION 23
9
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/process.c
View file @
026dd2d8
...
...
@@ -924,6 +924,10 @@ DECL_HANDLER(get_process_info)
reply
->
priority
=
process
->
priority
;
reply
->
affinity
=
process
->
affinity
;
reply
->
peb
=
process
->
peb
;
reply
->
start_time
.
sec
=
process
->
start_time
.
tv_sec
;
reply
->
start_time
.
usec
=
process
->
start_time
.
tv_usec
;
reply
->
end_time
.
sec
=
process
->
end_time
.
tv_sec
;
reply
->
end_time
.
usec
=
process
->
end_time
.
tv_usec
;
release_object
(
process
);
}
}
...
...
server/protocol.def
View file @
026dd2d8
...
...
@@ -317,6 +317,8 @@ struct token_groups
int priority; /* priority class */
int affinity; /* process affinity mask */
void* peb; /* PEB address in process address space */
abs_time_t start_time; /* process start time */
abs_time_t end_time; /* process end time */
@END
...
...
server/trace.c
View file @
026dd2d8
...
...
@@ -737,7 +737,12 @@ static void dump_get_process_info_reply( const struct get_process_info_reply *re
fprintf
(
stderr
,
" exit_code=%d,"
,
req
->
exit_code
);
fprintf
(
stderr
,
" priority=%d,"
,
req
->
priority
);
fprintf
(
stderr
,
" affinity=%d,"
,
req
->
affinity
);
fprintf
(
stderr
,
" peb=%p"
,
req
->
peb
);
fprintf
(
stderr
,
" peb=%p,"
,
req
->
peb
);
fprintf
(
stderr
,
" start_time="
);
dump_abs_time
(
&
req
->
start_time
);
fprintf
(
stderr
,
","
);
fprintf
(
stderr
,
" end_time="
);
dump_abs_time
(
&
req
->
end_time
);
}
static
void
dump_set_process_info_request
(
const
struct
set_process_info_request
*
req
)
...
...
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