+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.
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') {
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);
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);