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
3095a48d
Commit
3095a48d
authored
Jul 26, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Convert thread creation/exit times to the abs_time_t type.
parent
3ca608b1
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
16 deletions
+23
-16
thread.c
dlls/ntdll/thread.c
+2
-2
server_protocol.h
include/wine/server_protocol.h
+3
-3
process.c
server/process.c
+1
-0
protocol.def
server/protocol.def
+2
-2
thread.c
server/thread.c
+8
-5
thread.h
server/thread.h
+2
-2
trace.c
server/trace.c
+5
-2
No files found.
dlls/ntdll/thread.c
View file @
3095a48d
...
...
@@ -1077,8 +1077,8 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
status
=
wine_server_call
(
req
);
if
(
status
==
STATUS_SUCCESS
)
{
RtlSecondsSince1970ToTime
(
reply
->
creation_time
,
&
kusrt
.
CreateT
ime
);
RtlSecondsSince1970ToTime
(
reply
->
exit_time
,
&
kusrt
.
ExitT
ime
);
NTDLL_from_server_abstime
(
&
kusrt
.
CreateTime
,
&
reply
->
creation_t
ime
);
NTDLL_from_server_abstime
(
&
kusrt
.
ExitTime
,
&
reply
->
exit_t
ime
);
}
}
SERVER_END_REQ
;
...
...
include/wine/server_protocol.h
View file @
3095a48d
...
...
@@ -386,8 +386,8 @@ struct get_thread_info_reply
int
exit_code
;
int
priority
;
int
affinity
;
time_t
creation_time
;
time_t
exit_time
;
abs_time_t
creation_time
;
abs_time_t
exit_time
;
};
...
...
@@ -4385,6 +4385,6 @@ union generic_reply
struct
query_symlink_reply
query_symlink_reply
;
};
#define SERVER_PROTOCOL_VERSION 24
1
#define SERVER_PROTOCOL_VERSION 24
2
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/process.c
View file @
3095a48d
...
...
@@ -256,6 +256,7 @@ struct thread *create_process( int fd, struct thread *parent_thread, int inherit
list_init
(
&
process
->
dlls
);
gettimeofday
(
&
process
->
start_time
,
NULL
);
process
->
end_time
.
tv_sec
=
process
->
end_time
.
tv_usec
=
0
;
list_add_head
(
&
process_list
,
&
process
->
entry
);
if
(
!
(
process
->
id
=
process
->
group_id
=
alloc_ptid
(
process
)))
...
...
server/protocol.def
View file @
3095a48d
...
...
@@ -345,8 +345,8 @@ struct token_groups
int exit_code; /* thread exit code */
int priority; /* thread priority level */
int affinity; /* thread affinity mask */
time_t
creation_time; /* thread creation time */
time_t
exit_time; /* thread exit time */
abs_time_t
creation_time; /* thread creation time */
abs_time_t
exit_time; /* thread exit time */
@END
...
...
server/thread.c
View file @
3095a48d
...
...
@@ -144,11 +144,12 @@ inline static void init_thread_structure( struct thread *thread )
thread
->
priority
=
THREAD_PRIORITY_NORMAL
;
thread
->
affinity
=
1
;
thread
->
suspend
=
0
;
thread
->
creation_time
=
time
(
NULL
);
thread
->
exit_time
=
0
;
thread
->
desktop_users
=
0
;
thread
->
token
=
NULL
;
gettimeofday
(
&
thread
->
creation_time
,
NULL
);
thread
->
exit_time
.
tv_sec
=
thread
->
exit_time
.
tv_usec
=
0
;
list_init
(
&
thread
->
mutex_list
);
list_init
(
&
thread
->
system_apc
);
list_init
(
&
thread
->
user_apc
);
...
...
@@ -737,7 +738,7 @@ void kill_thread( struct thread *thread, int violent_death )
{
if
(
thread
->
state
==
TERMINATED
)
return
;
/* already killed */
thread
->
state
=
TERMINATED
;
thread
->
exit_time
=
time
(
NULL
);
gettimeofday
(
&
thread
->
exit_time
,
NULL
);
if
(
current
==
thread
)
current
=
NULL
;
if
(
debug_level
)
fprintf
(
stderr
,
"%04x: *killed* exit_code=%d
\n
"
,
...
...
@@ -946,8 +947,10 @@ DECL_HANDLER(get_thread_info)
reply
->
exit_code
=
(
thread
->
state
==
TERMINATED
)
?
thread
->
exit_code
:
STILL_ACTIVE
;
reply
->
priority
=
thread
->
priority
;
reply
->
affinity
=
thread
->
affinity
;
reply
->
creation_time
=
thread
->
creation_time
;
reply
->
exit_time
=
thread
->
exit_time
;
reply
->
creation_time
.
sec
=
thread
->
creation_time
.
tv_sec
;
reply
->
creation_time
.
usec
=
thread
->
creation_time
.
tv_usec
;
reply
->
exit_time
.
sec
=
thread
->
exit_time
.
tv_sec
;
reply
->
exit_time
.
usec
=
thread
->
exit_time
.
tv_usec
;
release_object
(
thread
);
}
...
...
server/thread.h
View file @
3095a48d
...
...
@@ -84,8 +84,8 @@ struct thread
int
suspend
;
/* suspend count */
obj_handle_t
desktop
;
/* desktop handle */
int
desktop_users
;
/* number of objects using the thread desktop */
time_t
creation_time
;
/* Thread creation time */
time_t
exit_time
;
/* Thread exit time */
struct
timeval
creation_time
;
/* Thread creation time */
struct
timeval
exit_time
;
/* Thread exit time */
struct
token
*
token
;
/* security token associated with this thread */
};
...
...
server/trace.c
View file @
3095a48d
...
...
@@ -766,8 +766,11 @@ static void dump_get_thread_info_reply( const struct get_thread_info_reply *req
fprintf
(
stderr
,
" exit_code=%d,"
,
req
->
exit_code
);
fprintf
(
stderr
,
" priority=%d,"
,
req
->
priority
);
fprintf
(
stderr
,
" affinity=%d,"
,
req
->
affinity
);
fprintf
(
stderr
,
" creation_time=%ld,"
,
(
long
)
req
->
creation_time
);
fprintf
(
stderr
,
" exit_time=%ld"
,
(
long
)
req
->
exit_time
);
fprintf
(
stderr
,
" creation_time="
);
dump_abs_time
(
&
req
->
creation_time
);
fprintf
(
stderr
,
","
);
fprintf
(
stderr
,
" exit_time="
);
dump_abs_time
(
&
req
->
exit_time
);
}
static
void
dump_set_thread_info_request
(
const
struct
set_thread_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