projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gencgc: Introduce a new predicate, page_starts_contiguous_block_p().
[sbcl.git]
/
src
/
runtime
/
vars.c
diff --git
a/src/runtime/vars.c
b/src/runtime/vars.c
index
39f065b
..
21147fe
100644
(file)
--- a/
src/runtime/vars.c
+++ b/
src/runtime/vars.c
@@
-10,9
+10,11
@@
*/
#include <stdio.h>
*/
#include <stdio.h>
+#include <string.h>
#include <sys/types.h>
#include <stdlib.h>
#include <sys/types.h>
#include <stdlib.h>
+#include "sbcl.h"
#include "runtime.h"
#include "vars.h"
#include "os.h"
#include "runtime.h"
#include "vars.h"
#include "os.h"
@@
-27,7
+29,7
@@
struct var {
lispobj obj;
lispobj (*update_fn)(struct var *var);
char *name;
lispobj obj;
lispobj (*update_fn)(struct var *var);
char *name;
- long clock;
+ sword_t clock;
boolean map_back, permanent;
struct var *nnext; /* Next in name list */
boolean map_back, permanent;
struct var *nnext; /* Next in name list */
@@
-36,7
+38,7
@@
struct var {
static int hash_name(char *name)
{
static int hash_name(char *name)
{
- unsigned long value = 0;
+ uword_t value = 0;
while (*name != '\0') {
value = (value << 1) ^ *(unsigned char *)(name++);
while (*name != '\0') {
value = (value << 1) ^ *(unsigned char *)(name++);
@@
-48,7
+50,7
@@
static int hash_name(char *name)
static int hash_obj(lispobj obj)
{
static int hash_obj(lispobj obj)
{
- return (unsigned long)obj % OBJ_BUCKETS;
+ return (uword_t)obj % OBJ_BUCKETS;
}
void flush_vars()
}
void flush_vars()
@@
-72,8
+74,8
@@
void flush_vars()
free(var);
}
}
free(var);
}
}
- bzero(NameHash, sizeof(NameHash));
- bzero(ObjHash, sizeof(ObjHash));
+ memset(NameHash, 0, sizeof(NameHash));
+ memset(ObjHash, 0, sizeof(ObjHash));
tempcntr = 1;
for (var = perm; var != NULL; var = next) {
tempcntr = 1;
for (var = perm; var != NULL; var = next) {
@@
-153,7
+155,7
@@
struct var *define_var(char *name, lispobj obj, boolean perm)
}
struct var *define_dynamic_var(char *name, lispobj updatefn(struct var *),
}
struct var *define_dynamic_var(char *name, lispobj updatefn(struct var *),
- boolean perm)
+ boolean perm)
{
struct var *var = make_var(name, perm);
{
struct var *var = make_var(name, perm);
@@
-174,12
+176,12
@@
lispobj var_value(struct var *var)
return var->obj;
}
return var->obj;
}
-long var_clock(struct var *var)
+sword_t var_clock(struct var *var)
{
return var->clock;
}
{
return var->clock;
}
-void var_setclock(struct var *var, long val)
+void var_setclock(struct var *var, sword_t val)
{
var->clock = val;
}
{
var->clock = val;
}