Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
spdlog
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
Libraries
spdlog
Commits
232df72b
Commit
232df72b
authored
Nov 20, 2021
by
lisr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use pthread_getthrds_np for AIX
parent
aac187d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
include/spdlog/details/os-inl.h
include/spdlog/details/os-inl.h
+7
-2
No files found.
include/spdlog/details/os-inl.h
View file @
232df72b
...
...
@@ -46,7 +46,7 @@
# include <sys/syscall.h> //Use gettid() syscall under linux to get thread id
# elif defined(_AIX)
# include <pthread.h> // for pthread_getthr
eadid
_np
# include <pthread.h> // for pthread_getthr
ds
_np
# elif defined(__DragonFly__) || defined(__FreeBSD__)
# include <pthread_np.h> // for pthread_getthreadid_np
...
...
@@ -337,7 +337,12 @@ SPDLOG_INLINE size_t _thread_id() SPDLOG_NOEXCEPT
# endif
return
static_cast
<
size_t
>
(
::
syscall
(
SYS_gettid
));
#elif defined(_AIX)
return
static_cast
<
size_t
>
(
::
pthread_self
());
struct
__pthrdsinfo
buf
;
int
reg_size
=
0
;
pthread_t
pt
=
pthread_self
();
int
retval
=
pthread_getthrds_np
(
&
pt
,
PTHRDSINFO_QUERY_TID
,
&
buf
,
sizeof
(
buf
),
NULL
,
&
reg_size
);
int
tid
=
(
!
retval
)
?
buf
.
__pi_tid
:
0
;
return
static_cast
<
size_t
>
(
tid
);
#elif defined(__DragonFly__) || defined(__FreeBSD__)
return
static_cast
<
size_t
>
(
::
pthread_getthreadid_np
());
#elif defined(__NetBSD__)
...
...
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