Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
bb677d45
Commit
bb677d45
authored
Jan 31, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Linux: vlc_threadid() returns TID instead of kludging pthread_self()
parent
36de72f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
src/misc/threads.c
src/misc/threads.c
+9
-1
No files found.
src/misc/threads.c
View file @
bb677d45
...
...
@@ -41,6 +41,9 @@
#if defined( LIBVLC_USE_PTHREAD )
# include <sched.h>
# ifdef __linux__
# include <sys/syscall.h>
/* SYS_gettid */
# endif
#else
static
vlc_threadvar_t
cancel_key
;
#endif
...
...
@@ -68,11 +71,16 @@ void vlc_trace (const char *fn, const char *file, unsigned line)
static
inline
unsigned
long
vlc_threadid
(
void
)
{
#if defined(LIBVLC_USE_PTHREAD)
#if defined (LIBVLC_USE_PTHREAD)
# if defined (__linux__)
return
syscall
(
SYS_gettid
);
# else
union
{
pthread_t
th
;
unsigned
long
int
i
;
}
v
=
{
};
v
.
th
=
pthread_self
();
return
v
.
i
;
#endif
#elif defined (WIN32)
return
GetCurrentThreadId
();
...
...
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