Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor 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
Thomas Hermes
VLC
Commits
8675f083
Commit
8675f083
authored
4 years ago
by
Steve Lhomme
Browse files
Options
Downloads
Patches
Plain Diff
win32: thread: remove unused detached thread support
Following
a10ac09d
parent
56c05e47
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/win32/thread.c
+5
-26
5 additions, 26 deletions
src/win32/thread.c
with
5 additions
and
26 deletions
src/win32/thread.c
+
5
−
26
View file @
8675f083
...
...
@@ -339,12 +339,6 @@ void vlc_atomic_notify_all(void *addr)
}
/*** Threads ***/
static
void
vlc_thread_destroy
(
vlc_thread_t
th
)
{
DeleteCriticalSection
(
&
th
->
wait
.
lock
);
free
(
th
);
}
static
#if VLC_WINSTORE_APP
DWORD
...
...
@@ -360,13 +354,11 @@ __stdcall vlc_entry (void *p)
th
->
data
=
th
->
entry
(
th
->
data
);
TlsSetValue
(
thread_key
,
NULL
);
if
(
th
->
id
==
NULL
)
/* Detached thread */
vlc_thread_destroy
(
th
);
return
0
;
}
static
int
vlc_clone
_attr
(
vlc_thread_t
*
p_handle
,
bool
detached
,
void
*
(
*
entry
)
(
void
*
),
void
*
data
,
int
priority
)
int
vlc_clone
(
vlc_thread_t
*
p_handle
,
void
*
(
*
entry
)
(
void
*
)
,
void
*
data
,
int
priority
)
{
struct
vlc_thread
*
th
=
malloc
(
sizeof
(
*
th
));
if
(
unlikely
(
th
==
NULL
))
...
...
@@ -396,13 +388,7 @@ static int vlc_clone_attr (vlc_thread_t *p_handle, bool detached,
return
err
;
}
if
(
detached
)
{
CloseHandle
(
h
);
th
->
id
=
NULL
;
}
else
th
->
id
=
h
;
th
->
id
=
h
;
if
(
p_handle
!=
NULL
)
*
p_handle
=
th
;
...
...
@@ -413,12 +399,6 @@ static int vlc_clone_attr (vlc_thread_t *p_handle, bool detached,
return
0
;
}
int
vlc_clone
(
vlc_thread_t
*
p_handle
,
void
*
(
*
entry
)
(
void
*
),
void
*
data
,
int
priority
)
{
return
vlc_clone_attr
(
p_handle
,
false
,
entry
,
data
,
priority
);
}
void
vlc_join
(
vlc_thread_t
th
,
void
**
result
)
{
DWORD
ret
;
...
...
@@ -433,7 +413,8 @@ void vlc_join (vlc_thread_t th, void **result)
if
(
result
!=
NULL
)
*
result
=
th
->
data
;
CloseHandle
(
th
->
id
);
vlc_thread_destroy
(
th
);
DeleteCriticalSection
(
&
th
->
wait
.
lock
);
free
(
th
);
}
unsigned
long
vlc_thread_id
(
void
)
...
...
@@ -514,8 +495,6 @@ void vlc_testcancel (void)
p
->
proc
(
p
->
data
);
th
->
data
=
NULL
;
/* TODO: special value? */
if
(
th
->
id
==
NULL
)
/* Detached thread */
vlc_thread_destroy
(
th
);
#if VLC_WINSTORE_APP
ExitThread
(
0
);
#else // !VLC_WINSTORE_APP
...
...
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