1.0.8.1: Nicer C code
authorThiemo Seufer <ths@networkno.de>
Wed, 25 Jul 2007 21:37:31 +0000 (21:37 +0000)
committerThiemo Seufer <ths@networkno.de>
Wed, 25 Jul 2007 21:37:31 +0000 (21:37 +0000)
- More consistent formatting.
- Spelling fixes.
- Declare empty parameter lists as void.

24 files changed:
src/runtime/alpha-linux-os.h
src/runtime/alpha-osf1-os.h
src/runtime/fixnump.h
src/runtime/hppa-linux-os.h
src/runtime/interrupt.c
src/runtime/interrupt.h
src/runtime/mips-linux-os.h
src/runtime/os.h
src/runtime/ppc-bsd-os.h
src/runtime/ppc-darwin-os.h
src/runtime/ppc-linux-os.h
src/runtime/runtime.h
src/runtime/sparc-linux-os.h
src/runtime/sparc-sunos-os.h
src/runtime/thread.h
src/runtime/x86-64-bsd-os.h
src/runtime/x86-64-darwin-os.h
src/runtime/x86-64-linux-os.h
src/runtime/x86-bsd-os.h
src/runtime/x86-darwin-os.h
src/runtime/x86-linux-os.h
src/runtime/x86-sunos-os.h
src/runtime/x86-win32-os.h
version.lisp-expr

index d428042..40a25ea 100644 (file)
@@ -4,7 +4,8 @@
 typedef struct ucontext os_context_t;
 typedef long os_context_register_t;
 
-static inline os_context_t *arch_os_get_context(void **void_context) {
+static inline os_context_t *arch_os_get_context(void **void_context)
+{
     return (os_context_t *) *void_context;
 }
 
index 058c494..567e55b 100644 (file)
@@ -3,7 +3,8 @@
 
 typedef struct ucontext os_context_t;
 
-static inline os_context_t *arch_os_get_context(void **void_context) {
+static inline os_context_t *arch_os_get_context(void **void_context)
+{
     return (os_context_t *) *void_context;
 }
 
index b3aadb7..9681520 100644 (file)
@@ -12,7 +12,8 @@
 #ifndef _FIXNUMP_H
 #define _FIXNUMP_H
 
-static inline int fixnump(lispobj obj) {
+static inline int fixnump(lispobj obj)
+{
     return((obj &
             (LOWTAG_MASK &
              (~(EVEN_FIXNUM_LOWTAG|ODD_FIXNUM_LOWTAG))))
index f0c23ac..961ec44 100644 (file)
@@ -6,7 +6,8 @@ typedef struct ucontext os_context_t;
    wide-sigcontext for 32-bit kernels */
 typedef unsigned long os_context_register_t;
 
-static inline os_context_t *arch_os_get_context(void **void_context) {
+static inline os_context_t *arch_os_get_context(void **void_context)
+{
     return (os_context_t *) *void_context;
 }
 
index 3597ee1..d9a9301 100644 (file)
@@ -597,7 +597,8 @@ interrupt_handle_now(int signal, siginfo_t *info, os_context_t *context)
  * already; we're just doing the Lisp-level processing now that we
  * put off then */
 static void
-run_deferred_handler(struct interrupt_data *data, void *v_context) {
+run_deferred_handler(struct interrupt_data *data, void *v_context)
+{
     /* The pending_handler may enable interrupts and then another
      * interrupt may hit, overwrite interrupt_data, so reset the
      * pending handler before calling it. Trust the handler to finish
@@ -1023,7 +1024,8 @@ interrupt_thread_handler(int num, siginfo_t *info, void *v_context)
  * functions and variables.
  */
 void
-undefined_alien_function() {
+undefined_alien_function(void)
+{
     funcall0(SymbolFunction(UNDEFINED_ALIEN_FUNCTION_ERROR));
 }
 
@@ -1112,7 +1114,7 @@ sigaction_nodefer_test_handler(int signal, siginfo_t *info, void *void_context)
 }
 
 static void
-see_if_sigaction_nodefer_works()
+see_if_sigaction_nodefer_works(void)
 {
     struct sigaction sa, old_sa;
 
@@ -1255,7 +1257,7 @@ install_handler(int signal, void handler(int, siginfo_t*, void*))
 }
 
 void
-interrupt_init()
+interrupt_init(void)
 {
 #ifndef LISP_FEATURE_WIN32
     int i;
@@ -1302,7 +1304,7 @@ lisp_memory_fault_error(os_context_t *context, os_vm_address_t addr)
 }
 #endif
 
-void
+static void
 unhandled_trap_error(os_context_t *context)
 {
     lispobj context_sap;
@@ -1315,7 +1317,7 @@ unhandled_trap_error(os_context_t *context)
     lose("UNHANDLED-TRAP-ERROR fell through");
 }
 
-/* Common logic far trapping instructions. How we actually handle each
+/* Common logic for trapping instructions. How we actually handle each
  * case is highly architecture dependent, but the overall shape is
  * this. */
 void
index 4e0a45f..d26df28 100644 (file)
@@ -26,9 +26,9 @@
 /* FIXME: do not rely on NSIG being a multiple of 8 */
 #define REAL_SIGSET_SIZE_BYTES ((NSIG/8))
 
-extern void check_blockables_blocked_or_lose();
-extern void check_gc_signals_unblocked_or_lose();
-extern void unblock_gc_signals();
+extern void check_blockables_blocked_or_lose(void);
+extern void check_gc_signals_unblocked_or_lose(void);
+extern void unblock_gc_signals(void);
 
 static inline void
 sigcopyset(sigset_t *new, sigset_t *old)
@@ -62,7 +62,7 @@ struct interrupt_data {
 };
 
 
-extern void interrupt_init();
+extern void interrupt_init(void);
 extern void fake_foreign_function_call(os_context_t* context);
 extern void undo_fake_foreign_function_call(os_context_t* context);
 extern void arrange_return_to_lisp_function(os_context_t *, lispobj);
@@ -96,7 +96,7 @@ extern void sigaddset_deferrable(sigset_t *s);
 /* Set all blockable signals into *s. */
 extern void sigaddset_blockable(sigset_t *s);
 
-extern void block_blockable_signals();
+extern void block_blockable_signals(void);
 
 /* The void* casting here avoids having to mess with the various types
  * of function argument lists possible for signal handlers:
index c28d9be..cc442b1 100644 (file)
@@ -4,7 +4,8 @@
 typedef struct ucontext os_context_t;
 typedef unsigned long long os_context_register_t;
 
-static inline os_context_t *arch_os_get_context(void **void_context) {
+static inline os_context_t *arch_os_get_context(void **void_context)
+{
     return (os_context_t *) *void_context;
 }
 
index 7eb58f1..a471ab6 100644 (file)
@@ -175,6 +175,6 @@ int os_get_errno(void);
 /* Return an absolute path to the runtime executable, or NULL if this
  * information is unavailable.  If a non-null pathname is returned, it
  * must be 'free'd. */
-extern char *os_get_runtime_executable_path();
+extern char *os_get_runtime_executable_path(void);
 
 #endif
index 5c8dde0..20babe3 100644 (file)
@@ -3,7 +3,8 @@
 
 typedef int os_context_register_t;
 
-static inline os_context_t *arch_os_get_context(void **void_context) {
+static inline os_context_t *arch_os_get_context(void **void_context)
+{
     return (os_context_t *) *void_context;
 }
 
index adbbdad..984e932 100644 (file)
@@ -3,7 +3,8 @@
 
 typedef unsigned int os_context_register_t;
 
-static inline os_context_t *arch_os_get_context(void **void_context) {
+static inline os_context_t *arch_os_get_context(void **void_context)
+{
     return (os_context_t *) *void_context;
 }
 
index 4f65e16..3ae5596 100644 (file)
@@ -4,7 +4,8 @@
 typedef struct ucontext os_context_t;
 typedef long os_context_register_t;
 
-static inline os_context_t *arch_os_get_context(void **void_context) {
+static inline os_context_t *arch_os_get_context(void **void_context)
+{
     return (os_context_t *) *void_context;
 }
 
index 2fce3fd..9525a17 100644 (file)
@@ -80,12 +80,14 @@ typedef unsigned int lispobj;
 #endif
 
 static inline int
-lowtag_of(lispobj obj) {
+lowtag_of(lispobj obj)
+{
     return obj & LOWTAG_MASK;
 }
 
 static inline int
-widetag_of(lispobj obj) {
+widetag_of(lispobj obj)
+{
     return obj & WIDETAG_MASK;
 }
 
@@ -128,6 +130,7 @@ native_pointer(lispobj obj)
 {
     return (lispobj *) ((pointer_sized_uint_t) (obj & ~LOWTAG_MASK));
 }
+
 /* inverse operation: create a suitably tagged lispobj from a native
  * pointer or integer.  Needs to be a macro due to the tedious C type
  * system */
index 76d9eb6..7214d15 100644 (file)
@@ -4,7 +4,8 @@
 typedef struct sigcontext os_context_t;
 typedef unsigned long os_context_register_t;
 
-static inline os_context_t *arch_os_get_context(void **void_context) {
+static inline os_context_t *arch_os_get_context(void **void_context)
+{
     asm volatile ("ta 0x03"); /* ta ST_FLUSH_WINDOWS */
     return (os_context_t *) (void_context + 37);
 }
index 4f099ac..b1dc334 100644 (file)
@@ -3,7 +3,8 @@
 
 typedef ucontext_t os_context_t;
 
-static inline os_context_t *arch_os_get_context(void **void_context) {
+static inline os_context_t *arch_os_get_context(void **void_context)
+{
     asm volatile ("ta 0x03"); /* ta ST_FLUSH_WINDOWS */
     return (os_context_t *) (*void_context);
 }
index 8f0436f..5d5eba9 100644 (file)
@@ -42,7 +42,8 @@ extern int dynamic_values_bytes;
 #endif
 
 static inline lispobj
-SymbolValue(u64 tagged_symbol_pointer, void *thread) {
+SymbolValue(u64 tagged_symbol_pointer, void *thread)
+{
     struct symbol *sym= (struct symbol *)
         (pointer_sized_uint_t)(tagged_symbol_pointer-OTHER_POINTER_LOWTAG);
 #ifdef LISP_FEATURE_SB_THREAD
@@ -57,7 +58,8 @@ SymbolValue(u64 tagged_symbol_pointer, void *thread) {
 }
 
 static inline lispobj
-SymbolTlValue(u64 tagged_symbol_pointer, void *thread) {
+SymbolTlValue(u64 tagged_symbol_pointer, void *thread)
+{
     struct symbol *sym= (struct symbol *)
         (pointer_sized_uint_t)(tagged_symbol_pointer-OTHER_POINTER_LOWTAG);
 #ifdef LISP_FEATURE_SB_THREAD
@@ -69,7 +71,8 @@ SymbolTlValue(u64 tagged_symbol_pointer, void *thread) {
 }
 
 static inline void
-SetSymbolValue(u64 tagged_symbol_pointer,lispobj val, void *thread) {
+SetSymbolValue(u64 tagged_symbol_pointer,lispobj val, void *thread)
+{
     struct symbol *sym= (struct symbol *)
         (pointer_sized_uint_t)(tagged_symbol_pointer-OTHER_POINTER_LOWTAG);
 #ifdef LISP_FEATURE_SB_THREAD
@@ -84,8 +87,10 @@ SetSymbolValue(u64 tagged_symbol_pointer,lispobj val, void *thread) {
 #endif
     sym->value = val;
 }
+
 static inline void
-SetTlSymbolValue(u64 tagged_symbol_pointer,lispobj val, void *thread) {
+SetTlSymbolValue(u64 tagged_symbol_pointer,lispobj val, void *thread)
+{
 #ifdef LISP_FEATURE_SB_THREAD
     struct symbol *sym= (struct symbol *)
         (pointer_sized_uint_t)(tagged_symbol_pointer-OTHER_POINTER_LOWTAG);
@@ -109,7 +114,8 @@ os_context_t *get_interrupt_context_for_thread(struct thread *th)
  * much stuff like struct thread and all_threads to be defined, which
  * usually aren't by that time.  So, it's here instead.  Sorry */
 
-static inline struct thread *arch_os_get_current_thread() {
+static inline struct thread *arch_os_get_current_thread(void)
+{
 #if defined(LISP_FEATURE_SB_THREAD)
 #if defined(LISP_FEATURE_X86)
     register struct thread *me=0;
index 327922a..aefdd30 100644 (file)
@@ -7,7 +7,8 @@
 
 typedef register_t os_context_register_t;
 
-static inline os_context_t *arch_os_get_context(void **void_context) {
+static inline os_context_t *arch_os_get_context(void **void_context)
+{
     return (os_context_t *) *void_context;
 }
 
index ff3d342..d68693d 100644 (file)
@@ -5,7 +5,8 @@
 
 typedef register_t os_context_register_t;
 
-static inline os_context_t *arch_os_get_context(void **void_context) {
+static inline os_context_t *arch_os_get_context(void **void_context)
+{
     return (os_context_t *) *void_context;
 }
 
index ba96988..48e3e25 100644 (file)
@@ -4,7 +4,8 @@
 typedef struct ucontext os_context_t;
 typedef long os_context_register_t;
 
-static inline os_context_t *arch_os_get_context(void **void_context) {
+static inline os_context_t *arch_os_get_context(void **void_context)
+{
     return (os_context_t *) *void_context;
 }
 
index 3ff9f52..406cf57 100644 (file)
@@ -8,7 +8,8 @@
 
 typedef int os_context_register_t;
 
-static inline os_context_t *arch_os_get_context(void **void_context) {
+static inline os_context_t *arch_os_get_context(void **void_context)
+{
     return (os_context_t *) *void_context;
 }
 
index 36581d3..aa2710c 100644 (file)
@@ -8,7 +8,8 @@
 
 typedef int os_context_register_t;
 
-static inline os_context_t *arch_os_get_context(void **void_context) {
+static inline os_context_t *arch_os_get_context(void **void_context)
+{
     return (os_context_t *) *void_context;
 }
 
index c24c962..6e688c6 100644 (file)
@@ -4,7 +4,8 @@
 typedef struct ucontext os_context_t;
 typedef greg_t os_context_register_t;
 
-static inline os_context_t *arch_os_get_context(void **void_context) {
+static inline os_context_t *arch_os_get_context(void **void_context)
+{
     return (os_context_t *) *void_context;
 }
 
index a7d6a92..dffcc33 100644 (file)
@@ -3,7 +3,8 @@
 
 typedef ucontext_t os_context_t;
 
-static inline os_context_t *arch_os_get_context(void **void_context) {
+static inline os_context_t *arch_os_get_context(void **void_context)
+{
     return (os_context_t *) *void_context;
 }
 
index 1f2e748..e703338 100644 (file)
@@ -4,7 +4,8 @@
 typedef CONTEXT os_context_t;
 typedef long os_context_register_t;
 
-static inline os_context_t *arch_os_get_context(void **void_context) {
+static inline os_context_t *arch_os_get_context(void **void_context)
+{
     return (os_context_t *) *void_context;
 }
 
index 3abece1..70e157b 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.8"
+"1.0.8.1"