summaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2012-03-20 02:37:02 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2012-03-20 02:43:48 +0100
commit84bf93fa103eb9e2ed914b67cd5d2c7058d30b42 (patch)
tree0a347a557ed9e16fd7fd901b3cf6537be633c2ca /kern
parent0410dd9e3fe657ef3d8334394180eac5956d407d (diff)
Use long types
* ddb/db_examine.c (db_xcdump): Do not cast addr before passing to db_read_bytes. * ddb/db_macro.c (db_arg_variable): Return long. * ddb/db_macro.h (db_arg_variable): Likewise. * ddb/db_sym.c (db_maxoff): Set type to unsigned long. * ddb/db_task_thread.c (db_set_default_thread, db_get_task_thread): Return long. * ddb/db_variables.h (db_variable): Make fcn function field to return long. (FCN_NULL): Make function type return long. * i386/i386/db_interface.c (int_regs): Set field sizes to long. * i386/i386/db_machdep.h (db_expr_t): Set type to long. * i386/i386/db_trace.c (db_i386_reg_value): Return long. Use long types. (i386_frame, i386_kregs, interrupt_frame, db_nextframe): Set field sizes to long. (db_regs, i386_kregs): Use long * pointers. (db_lookup_i386_kreg): Return long *. (db_numargs, db_nextframe, db_stack_trace_cmd, db_i386_stack_trace): Use long types. * i386/i386/debug_i386.c (dump_ss): Fix format. * i386/i386/ktss.c (ktss_init): Use long type. * i386/i386/pcb.c (set_user_regs): Likewise. * i386/i386/thread.h (i386_saved_state, v86_segs, i386_kernel_state, i386_interrupt_state): Set field sizes to long. * i386/i386/trap.c (kernel_trap, user_trap): Fix formats. * kern/ast.h (ast_t): Set type to long. * kern/boot_script.c (create_task, resume_task, prompt_resume_task, boot_script_set_variable): Use long types. * kern/boot_script.h (boot_script_set_variable): Use long type. * kern/bootstrap.c (bootstrap_create): Pass long type. * kern/lock.c (simple_lock, simple_lock_try): Use long type. * linux/dev/kernel/softirq.c (linux_soft_intr): Fix format.
Diffstat (limited to 'kern')
-rw-r--r--kern/ast.h2
-rw-r--r--kern/boot_script.c8
-rw-r--r--kern/boot_script.h2
-rw-r--r--kern/bootstrap.c2
-rw-r--r--kern/lock.c8
5 files changed, 11 insertions, 11 deletions
diff --git a/kern/ast.h b/kern/ast.h
index 695eaac..4c28b1e 100644
--- a/kern/ast.h
+++ b/kern/ast.h
@@ -68,7 +68,7 @@
#define AST_PER_THREAD (AST_HALT | AST_TERMINATE | MACHINE_AST_PER_THREAD)
-typedef unsigned int ast_t;
+typedef unsigned long ast_t;
extern volatile ast_t need_ast[NCPUS];
diff --git a/kern/boot_script.c b/kern/boot_script.c
index aa6833b..b2e9393 100644
--- a/kern/boot_script.c
+++ b/kern/boot_script.c
@@ -67,7 +67,7 @@ static int symtab_index = 0;
/* Create a task and suspend it. */
static int
-create_task (struct cmd *cmd, int *val)
+create_task (struct cmd *cmd, long *val)
{
int err = boot_script_task_create (cmd);
*val = (long) cmd->task;
@@ -76,14 +76,14 @@ create_task (struct cmd *cmd, int *val)
/* Resume a task. */
static int
-resume_task (struct cmd *cmd, int *val)
+resume_task (struct cmd *cmd, long *val)
{
return boot_script_task_resume (cmd);
}
/* Resume a task when the user hits return. */
static int
-prompt_resume_task (struct cmd *cmd, int *val)
+prompt_resume_task (struct cmd *cmd, long *val)
{
return boot_script_prompt_task_resume (cmd);
}
@@ -659,7 +659,7 @@ boot_script_exec ()
/* Create an entry for the variable NAME with TYPE and value VAL,
in the symbol table. */
int
-boot_script_set_variable (const char *name, int type, int val)
+boot_script_set_variable (const char *name, int type, long val)
{
struct sym *sym = sym_enter (name);
diff --git a/kern/boot_script.h b/kern/boot_script.h
index c436ac2..c5ad673 100644
--- a/kern/boot_script.h
+++ b/kern/boot_script.h
@@ -102,7 +102,7 @@ int boot_script_exec (void);
/* Create an entry in the symbol table for variable NAME,
whose type is TYPE and value is VAL. Returns 0 on success,
non-zero otherwise. */
-int boot_script_set_variable (const char *name, int type, int val);
+int boot_script_set_variable (const char *name, int type, long val);
/* Define the function NAME, which will return type RET_TYPE. */
int boot_script_define_function (const char *name, int ret_type,
diff --git a/kern/bootstrap.c b/kern/bootstrap.c
index 2b74073..c98b0a2 100644
--- a/kern/bootstrap.c
+++ b/kern/bootstrap.c
@@ -211,7 +211,7 @@ void bootstrap_create()
char *var = memcpy (alloca (len), *ep, len);
char *val = strchr (var, '=');
*val++ = '\0';
- losers = boot_script_set_variable (var, VAL_STR, (int) val);
+ losers = boot_script_set_variable (var, VAL_STR, (long) val);
if (losers)
panic ("cannot set boot-script variable %s: %s",
var, boot_script_error_string (losers));
diff --git a/kern/lock.c b/kern/lock.c
index 2bcfa8b..44d4448 100644
--- a/kern/lock.c
+++ b/kern/lock.c
@@ -163,8 +163,8 @@ void simple_lock(
info->l = l;
/* XXX we want our return address, if possible */
#if defined(__i386__)
- info->ra = *((unsigned int *)&l - 1);
-#endif /* __i386__ */
+ info->ra = *((unsigned long *)&l - 1);
+#endif /* i386 */
}
boolean_t simple_lock_try(
@@ -181,8 +181,8 @@ boolean_t simple_lock_try(
info->l = l;
/* XXX we want our return address, if possible */
#if defined(__i386__)
- info->ra = *((unsigned int *)&l - 1);
-#endif /* __i386__ */
+ info->ra = *((unsigned long *)&l - 1);
+#endif /* i386 */
return TRUE;
}