Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
einsteinathome
boinc
Commits
6b89c2d8
Commit
6b89c2d8
authored
Feb 24, 2015
by
Bernd Machenschalk
Browse files
MinGW doesn't like to cast 64Bit void* to DWORDs
parent
e5e4cdee
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/diagnostics_win.cpp
View file @
6b89c2d8
...
...
@@ -60,6 +60,11 @@ typedef NTSTATUS (WINAPI *tNTQSI)(
PULONG
ReturnLength
);
#ifdef __MINGW64__
#define PTRASINT UINT64
#else
#define PTRASINT DWORD
#endif
// Look in the registry for the specified value user the BOINC diagnostics
// hive.
...
...
@@ -215,7 +220,7 @@ int diagnostics_finish_thread_list() {
// Return a pointer to the thread entry.
//
PBOINC_THREADLISTENTRY
diagnostics_find_thread_entry
(
DWORD
dwThreadId
)
{
PBOINC_THREADLISTENTRY
diagnostics_find_thread_entry
(
PTRASINT
dwThreadId
)
{
PBOINC_THREADLISTENTRY
pThread
=
NULL
;
UINT
uiIndex
=
0
;
size_t
size
=
0
;
...
...
@@ -311,7 +316,7 @@ int diagnostics_update_thread_list() {
// Enumerate the threads
for
(
uiSystemIndex
=
0
;
uiSystemIndex
<
pProcesses
->
ThreadCount
;
uiSystemIndex
++
)
{
pThread
=
&
pProcesses
->
Threads
[
uiSystemIndex
];
pThreadEntry
=
diagnostics_find_thread_entry
((
DWORD
)
pThread
->
ClientId
.
UniqueThread
);
pThreadEntry
=
diagnostics_find_thread_entry
((
PTRASINT
)
pThread
->
ClientId
.
UniqueThread
);
if
(
pThreadEntry
)
{
pThreadEntry
->
crash_kernel_time
=
(
FLOAT
)
pThread
->
KernelTime
.
QuadPart
;
...
...
@@ -325,12 +330,12 @@ int diagnostics_update_thread_list() {
hThread
=
OpenThread
(
THREAD_ALL_ACCESS
,
FALSE
,
(
DWORD
)(
pThread
->
ClientId
.
UniqueThread
)
(
PTRASINT
)(
pThread
->
ClientId
.
UniqueThread
)
);
pThreadEntry
=
new
BOINC_THREADLISTENTRY
;
diagnostics_init_thread_entry
(
pThreadEntry
);
pThreadEntry
->
thread_id
=
(
DWORD
)(
pThread
->
ClientId
.
UniqueThread
);
pThreadEntry
->
thread_id
=
(
PTRASINT
)(
pThread
->
ClientId
.
UniqueThread
);
pThreadEntry
->
thread_handle
=
hThread
;
pThreadEntry
->
crash_kernel_time
=
(
FLOAT
)
pThread
->
KernelTime
.
QuadPart
;
pThreadEntry
->
crash_user_time
=
(
FLOAT
)
pThread
->
UserTime
.
QuadPart
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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