[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
guile/guile-core/libguile gc_os_dep.c
From: |
Thien-Thi Nguyen |
Subject: |
guile/guile-core/libguile gc_os_dep.c |
Date: |
Sat, 25 Aug 2001 11:31:18 -0700 |
CVSROOT: /cvs
Module name: guile
Branch: branch_release-1-6
Changes by: Thien-Thi Nguyen <address@hidden> 01/08/25 11:31:18
Modified files:
guile-core/libguile: gc_os_dep.c
Log message:
(GC_noop1): Move before `GC_find_limit' where it is used; nfc.
Thanks to Bill Schottstaedt.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/gc_os_dep.c.diff?cvsroot=OldCVS&only_with_tag=branch_release-1-6&tr1=1.7.4.3&tr2=1.7.4.4&r1=text&r2=text
Patches:
Index: guile/guile-core/libguile/gc_os_dep.c
diff -u guile/guile-core/libguile/gc_os_dep.c:1.10
guile/guile-core/libguile/gc_os_dep.c:1.11
--- guile/guile-core/libguile/gc_os_dep.c:1.10 Thu Jul 26 09:58:30 2001
+++ guile/guile-core/libguile/gc_os_dep.c Sat Aug 25 11:20:56 2001
@@ -18,7 +18,7 @@
/*
* Copied from gc5.2, files "os_dep.c", "gc_priv.h", "mark.c" and "gcconfig.h",
- * and modified for Guile by Marius Vollmer.
+ * and modified for Guile by Marius Vollmer.
*/
#include <ctype.h>
@@ -225,7 +225,7 @@
# if defined(_AMIGA) && !defined(AMIGA)
# define AMIGA
# endif
-# ifdef AMIGA
+# ifdef AMIGA
# define M68K
# define mach_type_known
# endif
@@ -434,7 +434,7 @@
* Gustavo Rodriguez-Rivera points out that on most (all?) Unix machines,
* the value of environ is a pointer that can serve as STACKBOTTOM.
* I expect that HEURISTIC2 can be replaced by this approach, which
- * interferes far less with debugging.
+ * interferes far less with debugging.
*
* If no expression for STACKBOTTOM can be found, and neither of the above
* heuristics are usable, the collector can still be used with all of the above
@@ -737,7 +737,7 @@
# define OS_TYPE "SEQUENT"
extern int etext;
# define DATASTART ((ptr_t)((((word) (&etext)) + 0xfff) & ~0xfff))
-# define STACKBOTTOM ((ptr_t) 0x3ffff000)
+# define STACKBOTTOM ((ptr_t) 0x3ffff000)
# endif
# ifdef SUNOS5
# define OS_TYPE "SUNOS5"
@@ -826,7 +826,7 @@
/* cache miss stalls for the targetted load instructions. But it
*/
/* seems to interfere enough with other cache traffic that the net
*/
/* result is worse than prefetchnta.
*/
-# if 0
+# if 0
/* Using prefetches for write seems to have a slight negative
*/
/* impact on performance, at least for a PIII/500.
*/
# define PREFETCH_FOR_WRITE(x) \
@@ -836,7 +836,7 @@
# ifdef USE_3DNOW_PREFETCH
# define PREFETCH(x) \
__asm__ __volatile__ (" prefetch %0": : "m"(*(char
*)(x)))
-# define PREFETCH_FOR_WRITE(x)
+# define PREFETCH_FOR_WRITE(x)
__asm__ __volatile__ (" prefetchw %0": : "m"(*(char
*)(x)))
# endif
# endif
@@ -1371,7 +1371,7 @@
# if defined(LINUX) && !defined(POWERPC)
-# if 0
+# if 0
# include <linux/version.h>
# if (LINUX_VERSION_CODE <= 0x10400)
/* Ugly hack to get struct sigcontext_struct definition. Required */
@@ -1531,13 +1531,13 @@
# endif /*!OS/2 */
-/*
- * Find the base of the stack.
+/*
+ * Find the base of the stack.
* Used only in single-threaded environment.
* With threads, GC_mark_roots needs to know how to do this.
* Called with allocator lock held.
*/
-# ifdef MSWIN32
+# ifdef MSWIN32
# define is_writable(prot) ((prot) == PAGE_READWRITE \
|| (prot) == PAGE_WRITECOPY \
|| (prot) == PAGE_EXECUTE_READWRITE \
@@ -1551,7 +1551,7 @@
MEMORY_BASIC_INFORMATION buf;
word result;
word protect;
-
+
result = VirtualQuery(p, &buf, sizeof(buf));
if (result != sizeof(buf)) ABORT("Weird VirtualQuery result");
if (base != 0) *base = (ptr_t)(buf.AllocationBase);
@@ -1589,7 +1589,7 @@
{
PTIB ptib;
PPIB ppib;
-
+
if (DosGetInfoBlocks(&ptib, &ppib) != NO_ERROR) {
GC_err_printf0("DosGetInfoBlocks failed\n");
ABORT("DosGetInfoBlocks failed\n");
@@ -1604,7 +1604,7 @@
void *scm_get_stack_base()
{
struct Process *proc = (struct Process*)SysBase->ThisTask;
-
+
/* Reference: Amiga Guru Book Pages: 42,567,574 */
if (proc->pr_Task.tc_Node.ln_Type==NT_PROCESS
&& proc->pr_CLI != NULL) {
@@ -1651,7 +1651,7 @@
/* Some tools to implement HEURISTIC2 */
# define MIN_PAGE_SIZE 256 /* Smallest conceivable page size, bytes */
/* static */ jmp_buf GC_jmp_buf;
-
+
/*ARGSUSED*/
static void GC_fault_handler(sig)
int sig;
@@ -1673,7 +1673,7 @@
# else
static handler old_segv_handler, old_bus_handler;
# endif
-
+
static void GC_setup_temporary_fault_handler()
{
# if defined(SUNOS5SIGS) || defined(IRIX5) || defined(OSF1)
@@ -1710,7 +1710,7 @@
# endif
# endif
}
-
+
static void GC_reset_fault_handler()
{
# if defined(SUNOS5SIGS) || defined(IRIX5) || defined(OSF1)
@@ -1727,6 +1727,15 @@
# endif
}
+ /* Single argument version, robust against whole program analysis. */
+ static void
+ GC_noop1(x)
+ word x;
+ {
+ static VOLATILE word sink;
+ sink = x;
+ }
+
/* Return the first nonaddressible location > p (up) or */
/* the smallest location q s.t. [q,p] is addressible (!up). */
static ptr_t GC_find_limit(p, up)
@@ -1760,15 +1769,6 @@
return(result);
}
- /* Single argument version, robust against whole program analysis. */
- static void
- GC_noop1(x)
- word x;
- {
- static VOLATILE word sink;
- sink = x;
- }
-
# endif
#ifdef LINUX_STACKBOTTOM
@@ -1784,13 +1784,13 @@
{
/* We read the stack base value from /proc/self/stat. We do this */
/* using direct I/O system calls in order to avoid calling malloc */
- /* in case REDIRECT_MALLOC is defined. */
+ /* in case REDIRECT_MALLOC is defined. */
# define STAT_BUF_SIZE 4096
# ifdef USE_LD_WRAP
# define STAT_READ __real_read
# else
# define STAT_READ read
-# endif
+# endif
char stat_buf[STAT_BUF_SIZE];
int f;
char c;