Replace `long' with `uword_t' in the runtime where applicable.
In these cases, signed long could have been translated literally as
sword_t to support LLP64 platforms, but uword_t seems clearer.
Thanks to Anton Kovalenko.
&((struct symbol *)native_pointer(TLS_INDEX_LOCK))->value;
FSHOW_SIGNAL((stderr, "entering dynbind tls alloc\n"));
set_pseudo_atomic_atomic(thread);
&((struct symbol *)native_pointer(TLS_INDEX_LOCK))->value;
FSHOW_SIGNAL((stderr, "entering dynbind tls alloc\n"));
set_pseudo_atomic_atomic(thread);
- get_spinlock(tls_index_lock,(long)th);
+ get_spinlock(tls_index_lock,(uword_t)th);
if(!sym->tls_index) {
sym->tls_index=SymbolValue(FREE_TLS_INDEX,0);
SetSymbolValue(FREE_TLS_INDEX, sym->tls_index+N_WORD_BYTES, 0);
if(!sym->tls_index) {
sym->tls_index=SymbolValue(FREE_TLS_INDEX,0);
SetSymbolValue(FREE_TLS_INDEX, sym->tls_index+N_WORD_BYTES, 0);
{
struct code *new_code;
lispobj first, l_code, l_new_code;
{
struct code *new_code;
lispobj first, l_code, l_new_code;
- long nheader_words, ncode_words, nwords;
+ uword_t nheader_words, ncode_words, nwords;
unsigned long displacement;
lispobj fheaderl, *prev_pointer;
unsigned long displacement;
lispobj fheaderl, *prev_pointer;
return;
}
if (more_p(ptr)) {
return;
}
if (more_p(ptr)) {
- addr = (lispobj *)native_pointer((long)parse_addr(ptr));
+ addr = (lispobj *)native_pointer((uword_t)parse_addr(ptr));
if (more_p(ptr)) {
count = parse_number(ptr);
}
if (more_p(ptr)) {
count = parse_number(ptr);
}
addr = end;
end += 2;
if (widetag_of(obj) == SIMPLE_FUN_HEADER_WIDETAG) {
addr = end;
end += 2;
if (widetag_of(obj) == SIMPLE_FUN_HEADER_WIDETAG) {
- print((long)addr | FUN_POINTER_LOWTAG);
+ print((uword_t)addr | FUN_POINTER_LOWTAG);
} else if (other_immediate_lowtag_p(obj)) {
print((lispobj)addr | OTHER_POINTER_LOWTAG);
} else {
} else if (other_immediate_lowtag_p(obj)) {
print((lispobj)addr | OTHER_POINTER_LOWTAG);
} else {
* be functions. */
#define os_trunc_to_page(addr) \
* be functions. */
#define os_trunc_to_page(addr) \
- (os_vm_address_t)(((long)(addr))&~(os_vm_page_size-1))
+ (os_vm_address_t)(((uword_t)(addr))&~(os_vm_page_size-1))
#define os_round_up_to_page(addr) \
os_trunc_to_page((addr)+(os_vm_page_size-1))
#define os_trunc_size_to_page(size) \
#define os_round_up_to_page(addr) \
os_trunc_to_page((addr)+(os_vm_page_size-1))
#define os_trunc_size_to_page(size) \
- (os_vm_size_t)(((long)(size))&~(os_vm_page_size-1))
+ (os_vm_size_t)(((uword_t)(size))&~(os_vm_page_size-1))
#define os_round_up_size_to_page(size) \
os_trunc_size_to_page((size)+(os_vm_page_size-1))
#define os_round_up_size_to_page(size) \
os_trunc_size_to_page((size)+(os_vm_page_size-1))
-static boolean string_to_long(char *token, long *value)
+static boolean string_to_long(char *token, uword_t *value)
char *ptr;
if (token == 0)
char *ptr;
if (token == 0)
+uword_t parse_number(ptr)
char **ptr;
{
char *token = parse_token(ptr);
char **ptr;
{
char *token = parse_token(ptr);
if (token == NULL) {
printf("expected a number\n");
if (token == NULL) {
printf("expected a number\n");
if (!string_to_long(token, &value)) {
printf("invalid number: ``%s''\n", token);
throw_to_monitor();
if (!string_to_long(token, &value)) {
printf("invalid number: ``%s''\n", token);
throw_to_monitor();
{
struct thread *thread=arch_os_get_current_thread();
char *token = parse_token(ptr);
{
struct thread *thread=arch_os_get_current_thread();
char *token = parse_token(ptr);
if (token == NULL) {
printf("expected an object\n");
if (token == NULL) {
printf("expected an object\n");
extern char *parse_token(char **ptr);
extern lispobj parse_lispobj(char **ptr);
extern char *parse_addr(char **ptr);
extern char *parse_token(char **ptr);
extern lispobj parse_lispobj(char **ptr);
extern char *parse_addr(char **ptr);
-extern long parse_number(char **ptr);
+extern uword_t parse_number(char **ptr);
core_compression_level);
write_lispobj(data, file);
core_compression_level);
write_lispobj(data, file);
- write_lispobj((long)addr / os_vm_page_size, file);
+ write_lispobj((uword_t)addr / os_vm_page_size, file);
write_lispobj((bytes + os_vm_page_size - 1) / os_vm_page_size, file);
}
write_lispobj((bytes + os_vm_page_size - 1) / os_vm_page_size, file);
}