summaryrefslogtreecommitdiff
path: root/boehm-gc
diff options
context:
space:
mode:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2015-08-27 11:26:18 +0000
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2015-08-27 11:26:18 +0000
commitf4bb54a35988826793a1353596bbe8140d7471b0 (patch)
treed8bf934164a740887ab40d2283a0a0dc1d6f0953 /boehm-gc
parent050af05b9761f1979f11c151519e7244d5becd7c (diff)
downloadgcc-f4bb54a35988826793a1353596bbe8140d7471b0.tar.gz
Avoid unstructured procfs on Solaris
* os_dep.c [GC_SOLARIS_THREADS] (GC_dirty_init): Use /proc/<pid>/pagedata instead of PIOCOPENPD. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227254 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc')
-rw-r--r--boehm-gc/ChangeLog5
-rw-r--r--boehm-gc/os_dep.c8
2 files changed, 8 insertions, 5 deletions
diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog
index 4a7ca390993..e610484ad1e 100644
--- a/boehm-gc/ChangeLog
+++ b/boehm-gc/ChangeLog
@@ -1,3 +1,8 @@
+2015-08-27 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * os_dep.c [GC_SOLARIS_THREADS] (GC_dirty_init): Use
+ /proc/<pid>/pagedata instead of PIOCOPENPD.
+
2015-07-24 Michael Darling <darlingm@gmail.com>
PR other/66259
diff --git a/boehm-gc/os_dep.c b/boehm-gc/os_dep.c
index 470d4fc14dd..60cbc2b2976 100644
--- a/boehm-gc/os_dep.c
+++ b/boehm-gc/os_dep.c
@@ -3184,13 +3184,11 @@ void GC_dirty_init()
(GC_words_allocd + GC_words_allocd_before_gc));
# endif
}
- sprintf(buf, "/proc/%d", getpid());
- fd = open(buf, O_RDONLY);
- if (fd < 0) {
+ sprintf(buf, "/proc/%d/pagedata", getpid());
+ GC_proc_fd = open(buf, O_RDONLY);
+ if (GC_proc_fd < 0) {
ABORT("/proc open failed");
}
- GC_proc_fd = syscall(SYS_ioctl, fd, PIOCOPENPD, 0);
- close(fd);
syscall(SYS_fcntl, GC_proc_fd, F_SETFD, FD_CLOEXEC);
if (GC_proc_fd < 0) {
ABORT("/proc ioctl failed");