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
94fcaad7
Commit
94fcaad7
authored
Dec 24, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 24, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use standard list to store task queue.
parent
0c2b684c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
30 deletions
+13
-30
mshtml_private.h
dlls/mshtml/mshtml_private.h
+2
-3
task.c
dlls/mshtml/task.c
+11
-27
No files found.
dlls/mshtml/mshtml_private.h
View file @
94fcaad7
...
...
@@ -1018,7 +1018,7 @@ struct task_t {
LONG
target_magic
;
task_proc_t
proc
;
task_proc_t
destr
;
struct
task_t
*
next
;
struct
list
entry
;
};
typedef
struct
{
...
...
@@ -1028,8 +1028,7 @@ typedef struct {
typedef
struct
{
HWND
thread_hwnd
;
task_t
*
task_queue_head
;
task_t
*
task_queue_tail
;
struct
list
task_list
;
struct
list
timer_list
;
}
thread_data_t
;
...
...
dlls/mshtml/task.c
View file @
94fcaad7
...
...
@@ -69,14 +69,8 @@ HRESULT push_task(task_t *task, task_proc_t proc, task_proc_t destr, LONG magic)
task
->
target_magic
=
magic
;
task
->
proc
=
proc
;
task
->
destr
=
destr
?
destr
:
default_task_destr
;
task
->
next
=
NULL
;
if
(
thread_data
->
task_queue_tail
)
thread_data
->
task_queue_tail
->
next
=
task
;
else
thread_data
->
task_queue_head
=
task
;
thread_data
->
task_queue_tail
=
task
;
list_add_tail
(
&
thread_data
->
task_list
,
&
task
->
entry
);
PostMessageW
(
thread_data
->
thread_hwnd
,
WM_PROCESSTASK
,
0
,
0
);
return
S_OK
;
...
...
@@ -91,14 +85,11 @@ static task_t *pop_task(void)
if
(
!
thread_data
)
return
NULL
;
task
=
thread_data
->
task_queue_head
;
if
(
!
task
)
if
(
list_empty
(
&
thread_data
->
task_list
))
return
NULL
;
thread_data
->
task_queue_head
=
task
->
next
;
if
(
!
thread_data
->
task_queue_head
)
thread_data
->
task_queue_tail
=
NULL
;
task
=
LIST_ENTRY
(
thread_data
->
task_list
.
next
,
task_t
,
entry
);
list_remove
(
&
task
->
entry
);
return
task
;
}
...
...
@@ -116,7 +107,7 @@ void remove_target_tasks(LONG target)
thread_data_t
*
thread_data
=
get_thread_data
(
FALSE
);
struct
list
*
liter
,
*
ltmp
;
task_timer_t
*
timer
;
task_t
*
iter
,
*
tmp
;
task_t
*
task
;
if
(
!
thread_data
)
return
;
...
...
@@ -134,20 +125,12 @@ void remove_target_tasks(LONG target)
SetTimer
(
thread_data
->
thread_hwnd
,
TIMER_ID
,
max
(
(
int
)(
timer
->
time
-
tc
),
0
),
NULL
);
}
while
(
thread_data
->
task_queue_head
&&
thread_data
->
task_queue_head
->
target_magic
==
target
)
{
iter
=
pop_task
();
iter
->
destr
(
iter
);
}
for
(
iter
=
thread_data
->
task_queue_head
;
iter
;
iter
=
iter
->
next
)
{
while
(
iter
->
next
&&
iter
->
next
->
target_magic
==
target
)
{
tmp
=
iter
->
next
;
iter
->
next
=
tmp
->
next
;
tmp
->
destr
(
tmp
);
LIST_FOR_EACH_SAFE
(
liter
,
ltmp
,
&
thread_data
->
task_list
)
{
task
=
LIST_ENTRY
(
liter
,
task_t
,
entry
);
if
(
task
->
target_magic
==
target
)
{
list_remove
(
&
task
->
entry
);
task
->
destr
(
task
);
}
if
(
!
iter
->
next
)
thread_data
->
task_queue_tail
=
iter
;
}
}
...
...
@@ -390,6 +373,7 @@ thread_data_t *get_thread_data(BOOL create)
return
NULL
;
TlsSetValue
(
mshtml_tls
,
thread_data
);
list_init
(
&
thread_data
->
task_list
);
list_init
(
&
thread_data
->
timer_list
);
}
...
...
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