Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
a7964a3f
Commit
a7964a3f
authored
Oct 02, 2015
by
Matthew Brandyberry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement GetThreadCount for AIX.
parent
0dd5ef8b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
gtest-port.cc
googletest/src/gtest-port.cc
+17
-0
No files found.
googletest/src/gtest-port.cc
View file @
a7964a3f
...
@@ -58,6 +58,10 @@
...
@@ -58,6 +58,10 @@
# include <sys/procfs.h>
# include <sys/procfs.h>
#endif // GTEST_OS_QNX
#endif // GTEST_OS_QNX
#if GTEST_OS_AIX
# include <procinfo.h>
#endif // GTEST_OS_AIX
#include "gtest/gtest-spi.h"
#include "gtest/gtest-spi.h"
#include "gtest/gtest-message.h"
#include "gtest/gtest-message.h"
#include "gtest/internal/gtest-internal.h"
#include "gtest/internal/gtest-internal.h"
...
@@ -146,6 +150,19 @@ size_t GetThreadCount() {
...
@@ -146,6 +150,19 @@ size_t GetThreadCount() {
}
}
}
}
#elif GTEST_OS_AIX
size_t
GetThreadCount
()
{
struct
procentry64
entry
;
pid_t
pid
=
getpid
();
int
status
=
getprocs64
(
&
entry
,
sizeof
(
entry
),
NULL
,
0
,
&
pid
,
1
);
if
(
status
==
1
)
{
return
entry
.
pi_thcount
;
}
else
{
return
0
;
}
}
#else
#else
size_t
GetThreadCount
()
{
size_t
GetThreadCount
()
{
...
...
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