Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
36a1a25f
Commit
36a1a25f
authored
25 years ago
by
Ulrich Weigand
Committed by
Alexandre Julliard
25 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Call THREAD_FreeTHDB as service thread callback.
parent
e9caf93b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/thread.h
+1
-0
1 addition, 0 deletions
include/thread.h
scheduler/thread.c
+11
-1
11 additions, 1 deletion
scheduler/thread.c
with
12 additions
and
1 deletion
include/thread.h
+
1
−
0
View file @
36a1a25f
...
...
@@ -85,6 +85,7 @@ typedef struct _THDB
void
*
server_tid
;
/* Server id for this thread */
void
(
*
startup
)(
void
);
/* Thread startup routine */
struct
_THDB
*
next
;
/* Global thread list */
DWORD
cleanup
;
/* Cleanup service handle */
}
THDB
;
/* The pseudo handle value returned by GetCurrentThread */
...
...
This diff is collapsed.
Click to expand it.
scheduler/thread.c
+
11
−
1
View file @
36a1a25f
...
...
@@ -20,6 +20,7 @@
#include
"selectors.h"
#include
"winnt.h"
#include
"server.h"
#include
"services.h"
#include
"stackframe.h"
#include
"debug.h"
#include
"queue.h"
...
...
@@ -152,10 +153,14 @@ error:
* Free data structures associated with a thread.
* Must be called from the context of another thread.
*/
void
THREAD_FreeTHDB
(
THDB
*
thdb
)
void
CALLBACK
THREAD_FreeTHDB
(
ULONG_PTR
arg
)
{
THDB
*
thdb
=
(
THDB
*
)
arg
;
THDB
**
pptr
=
&
THREAD_First
;
TRACE
(
thread
,
"(%p) called
\n
"
,
thdb
);
SERVICE_Delete
(
thdb
->
cleanup
);
PROCESS_CallUserSignalProc
(
USIG_THREAD_EXIT
,
0
,
0
);
CloseHandle
(
thdb
->
event
);
...
...
@@ -261,6 +266,11 @@ THDB *THREAD_Create( PDB *pdb, DWORD flags, DWORD stack_size, BOOL alloc_stack16
if
(
!
THREAD_InitTHDB
(
thdb
,
stack_size
,
alloc_stack16
,
sa
))
goto
error
;
thdb
->
next
=
THREAD_First
;
THREAD_First
=
thdb
;
/* Install cleanup handler */
thdb
->
cleanup
=
SERVICE_AddObject
(
*
server_handle
,
THREAD_FreeTHDB
,
(
ULONG_PTR
)
thdb
);
return
thdb
;
error:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment