Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
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
lvzhengyang
riscv-gcc-1
Commits
fd28f67b
Commit
fd28f67b
authored
Mar 25, 2002
by
Jeff Sturm
Committed by
Jeff Sturm
Mar 25, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* linux_threads.c (GC_get_nprocs): Close file descriptor.
From-SVN: r51321
parent
813b848c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
boehm-gc/ChangeLog
+4
-0
boehm-gc/linux_threads.c
+8
-0
No files found.
boehm-gc/ChangeLog
View file @
fd28f67b
2002-03-25 Jeff Sturm <jsturm@one-point.com>
* linux_threads.c (GC_get_nprocs): Close file descriptor.
2002-03-21 Loren J. Rittle <ljrittle@acm.org>
* include/private/gcconfig.h: Add unified test for FreeBSD.
...
...
boehm-gc/linux_threads.c
View file @
fd28f67b
...
...
@@ -1015,6 +1015,7 @@ int GC_get_nprocs()
WARN
(
"Couldn't read /proc/stat
\n
"
,
0
);
return
-
1
;
}
close
(
f
);
for
(
i
=
0
;
i
<
len
-
100
;
++
i
)
{
if
(
stat_buf
[
i
]
==
'\n'
&&
stat_buf
[
i
+
1
]
==
'c'
&&
stat_buf
[
i
+
2
]
==
'p'
&&
stat_buf
[
i
+
3
]
==
'u'
)
{
...
...
@@ -1358,6 +1359,9 @@ void * GC_start_routine(void * arg)
GC_printf1
(
"start_routine = 0x%lx
\n
"
,
start
);
# endif
start_arg
=
si
->
arg
;
# ifdef DEBUG_THREADS
GC_printf1
(
"sem_post from 0x%lx
\n
"
,
my_pthread
);
# endif
sem_post
(
&
(
si
->
registered
));
/* Last action on si. */
/* OK to deallocate. */
pthread_cleanup_push
(
GC_thread_exit_proc
,
0
);
...
...
@@ -1426,6 +1430,10 @@ WRAP_FUNC(pthread_create)(pthread_t *new_thread,
while
(
0
!=
sem_wait
(
&
(
si
->
registered
)))
{
if
(
EINTR
!=
errno
)
ABORT
(
"sem_wait failed"
);
}
# ifdef DEBUG_THREADS
GC_printf1
(
"sem_wait complete from thread 0x%X
\n
"
,
pthread_self
());
# endif
sem_destroy
(
&
(
si
->
registered
));
LOCK
();
GC_INTERNAL_FREE
(
si
);
...
...
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