From: Jan Kiszka <jan.kiszka@domain.hid>
To: Xenomai-core@domain.hid
Subject: [Xenomai-core] [PATCH 2/6] Whitespace fixes for asm-generic/system.h
Date: Sun, 02 Mar 2008 12:02:33 +0100 [thread overview]
Message-ID: <47CA8949.8030704@domain.hid> (raw)
In-Reply-To: <47C51A34.203@domain.hid>
[-- Attachment #1.1: Type: text/plain, Size: 26 bytes --]
No functional changes.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: system-h-whitespace-cleanups.patch --]
[-- Type: text/x-patch; name="system-h-whitespace-cleanups.patch", Size: 9802 bytes --]
---
include/asm-generic/system.h | 145 +++++++++++++++++++++----------------------
1 file changed, 73 insertions(+), 72 deletions(-)
Index: b/include/asm-generic/system.h
===================================================================
--- a/include/asm-generic/system.h
+++ b/include/asm-generic/system.h
@@ -56,13 +56,13 @@ extern "C" {
/* Tracer interface */
#define xnarch_trace_max_begin(v) rthal_trace_max_begin(v)
-#define xnarch_trace_max_end(v) rthal_trace_max_end(v)
+#define xnarch_trace_max_end(v) rthal_trace_max_end(v)
#define xnarch_trace_max_reset() rthal_trace_max_reset()
#define xnarch_trace_user_start() rthal_trace_user_start()
#define xnarch_trace_user_stop(v) rthal_trace_user_stop(v)
-#define xnarch_trace_user_freeze(v, once) rthal_trace_user_freeze(v, once)
+#define xnarch_trace_user_freeze(v, once) rthal_trace_user_freeze(v, once)
#define xnarch_trace_special(id, v) rthal_trace_special(id, v)
-#define xnarch_trace_special_u64(id, v) rthal_trace_special_u64(id, v)
+#define xnarch_trace_special_u64(id, v) rthal_trace_special_u64(id, v)
#define xnarch_trace_pid(pid, prio) rthal_trace_pid(pid, prio)
#define xnarch_trace_panic_freeze() rthal_trace_panic_freeze()
#define xnarch_trace_panic_dump() rthal_trace_panic_dump()
@@ -94,23 +94,23 @@ static inline unsigned xnarch_current_cp
typedef struct {
- unsigned long long spin_time;
- unsigned long long lock_time;
- const char *file;
- const char *function;
- unsigned line;
+ unsigned long long spin_time;
+ unsigned long long lock_time;
+ const char *file;
+ const char *function;
+ unsigned line;
} xnlockinfo_t;
typedef struct {
- atomic_t owner;
- const char *file;
- const char *function;
- unsigned line;
- int cpu;
- unsigned long long spin_time;
- unsigned long long lock_date;
+ atomic_t owner;
+ const char *file;
+ const char *function;
+ unsigned line;
+ int cpu;
+ unsigned long long spin_time;
+ unsigned long long lock_date;
} xnlock_t;
@@ -194,7 +194,7 @@ static inline void xnlock_dbg_invalid_re
typedef struct { atomic_t owner; } xnlock_t;
-#define XNARCH_LOCK_UNLOCKED (xnlock_t) { { ~0 } }
+#define XNARCH_LOCK_UNLOCKED (xnlock_t) { { ~0 } }
#define XNLOCK_DBG_CONTEXT
#define XNLOCK_DBG_CONTEXT_ARGS
@@ -215,49 +215,48 @@ static inline void xnlock_dbg_invalid_re
#endif /* !(CONFIG_SMP && XENO_DEBUG(NUCLEUS)) */
-#define XNARCH_NR_CPUS RTHAL_NR_CPUS
+#define XNARCH_NR_CPUS RTHAL_NR_CPUS
-#define XNARCH_NR_IRQS RTHAL_NR_IRQS
-#define XNARCH_TIMER_IRQ RTHAL_TIMER_IRQ
-#define XNARCH_TIMER_DEVICE RTHAL_TIMER_DEVICE
-#define XNARCH_CLOCK_DEVICE RTHAL_CLOCK_DEVICE
+#define XNARCH_NR_IRQS RTHAL_NR_IRQS
+#define XNARCH_TIMER_IRQ RTHAL_TIMER_IRQ
+#define XNARCH_TIMER_DEVICE RTHAL_TIMER_DEVICE
+#define XNARCH_CLOCK_DEVICE RTHAL_CLOCK_DEVICE
-#define XNARCH_ROOT_STACKSZ 0 /* Only a placeholder -- no stack */
+#define XNARCH_ROOT_STACKSZ 0 /* Only a placeholder -- no stack */
#define XNARCH_PROMPT "Xenomai: "
-#define xnarch_loginfo(fmt,args...) printk(KERN_INFO XNARCH_PROMPT fmt , ##args)
-#define xnarch_logwarn(fmt,args...) printk(KERN_WARNING XNARCH_PROMPT fmt , ##args)
-#define xnarch_logerr(fmt,args...) printk(KERN_ERR XNARCH_PROMPT fmt , ##args)
-#define xnarch_printf(fmt,args...) printk(KERN_INFO XNARCH_PROMPT fmt , ##args)
+#define xnarch_loginfo(fmt, args...) printk(KERN_INFO XNARCH_PROMPT fmt, ##args)
+#define xnarch_logwarn(fmt, args...) printk(KERN_WARNING XNARCH_PROMPT fmt, ##args)
+#define xnarch_logerr(fmt, args...) printk(KERN_ERR XNARCH_PROMPT fmt, ##args)
+#define xnarch_printf(fmt, args...) printk(KERN_INFO XNARCH_PROMPT fmt, ##args)
typedef cpumask_t xnarch_cpumask_t;
#ifdef CONFIG_SMP
-#define xnarch_cpu_online_map cpu_online_map
+#define xnarch_cpu_online_map cpu_online_map
#else
-#define xnarch_cpu_online_map cpumask_of_cpu(0)
+#define xnarch_cpu_online_map cpumask_of_cpu(0)
#endif
-#define xnarch_num_online_cpus() num_online_cpus()
-#define xnarch_cpu_set(cpu, mask) cpu_set(cpu, (mask))
-#define xnarch_cpu_clear(cpu, mask) cpu_clear(cpu, (mask))
-#define xnarch_cpus_clear(mask) cpus_clear(mask)
-#define xnarch_cpu_isset(cpu, mask) cpu_isset(cpu, (mask))
-#define xnarch_cpus_and(dst, src1, src2) cpus_and((dst), (src1), (src2))
-#define xnarch_cpus_equal(mask1, mask2) cpus_equal((mask1), (mask2))
-#define xnarch_cpus_empty(mask) cpus_empty(mask)
-#define xnarch_cpumask_of_cpu(cpu) cpumask_of_cpu(cpu)
-#define xnarch_cpu_test_and_set(cpu,mask) cpu_test_and_set(cpu, (mask))
-
-#define xnarch_first_cpu(mask) first_cpu(mask)
-#define XNARCH_CPU_MASK_ALL CPU_MASK_ALL
+#define xnarch_num_online_cpus() num_online_cpus()
+#define xnarch_cpu_set(cpu, mask) cpu_set(cpu, (mask))
+#define xnarch_cpu_clear(cpu, mask) cpu_clear(cpu, (mask))
+#define xnarch_cpus_clear(mask) cpus_clear(mask)
+#define xnarch_cpu_isset(cpu, mask) cpu_isset(cpu, (mask))
+#define xnarch_cpus_and(dst, src1, src2) cpus_and((dst), (src1), (src2))
+#define xnarch_cpus_equal(mask1, mask2) cpus_equal((mask1), (mask2))
+#define xnarch_cpus_empty(mask) cpus_empty(mask)
+#define xnarch_cpumask_of_cpu(cpu) cpumask_of_cpu(cpu)
+#define xnarch_cpu_test_and_set(cpu, mask) cpu_test_and_set(cpu, (mask))
+#define xnarch_first_cpu(mask) first_cpu(mask)
+#define XNARCH_CPU_MASK_ALL CPU_MASK_ALL
typedef struct xnarch_heapcb {
- atomic_t numaps; /* # of active user-space mappings. */
+ atomic_t numaps; /* # of active user-space mappings. */
- int kmflags; /* Kernel memory flags (0 if vmalloc()). */
+ int kmflags; /* Kernel memory flags (0 if vmalloc()). */
- void *heapbase; /* Shared heap memory base. */
+ void *heapbase; /* Shared heap memory base. */
} xnarch_heapcb_t;
@@ -267,7 +266,7 @@ long long xnarch_tsc_to_ns(long long ts)
static inline long long xnarch_tsc_to_ns_rounded(long long ts)
{
- return (xnarch_llimd(ts, 1000000000, RTHAL_CPU_FREQ/2) + 1) / 2;
+ return (xnarch_llimd(ts, 1000000000, RTHAL_CPU_FREQ/2) + 1) / 2;
}
long long xnarch_ns_to_tsc(long long ns);
@@ -276,24 +275,26 @@ unsigned long long xnarch_get_cpu_time(v
static inline unsigned long long xnarch_get_cpu_freq(void)
{
- return RTHAL_CPU_FREQ;
+ return RTHAL_CPU_FREQ;
}
-#define xnarch_halt(emsg) \
-do { \
- rthal_emergency_console(); \
- xnarch_logerr("fatal: %s\n",emsg); \
- show_stack(NULL,NULL); \
- xnarch_trace_panic_dump(); \
- for (;;) cpu_relax(); \
-} while(0)
+#define xnarch_halt(emsg) \
+ do { \
+ rthal_emergency_console(); \
+ xnarch_logerr("fatal: %s\n", emsg); \
+ show_stack(NULL,NULL); \
+ xnarch_trace_panic_dump(); \
+ for (;;) \
+ cpu_relax(); \
+ } while(0)
static inline int xnarch_setimask (int imask)
{
- spl_t s;
- splhigh(s);
- splexit(!!imask);
- return !!s;
+ spl_t s;
+
+ splhigh(s);
+ splexit(!!imask);
+ return !!s;
}
#ifdef CONFIG_SMP
@@ -306,7 +307,7 @@ static inline int xnarch_setimask (int i
static inline void xnlock_init (xnlock_t *lock)
{
- *lock = XNARCH_LOCK_UNLOCKED;
+ *lock = XNARCH_LOCK_UNLOCKED;
}
#define DECLARE_XNLOCK(lock) xnlock_t lock
@@ -375,9 +376,9 @@ static inline void xnlock_put_irqrestore
rthal_local_irq_restore(flags & 1);
}
-static inline int xnarch_send_ipi (xnarch_cpumask_t cpumask)
+static inline int xnarch_send_ipi(xnarch_cpumask_t cpumask)
{
- return rthal_send_ipi(RTHAL_SERVICE_IPI0, cpumask);
+ return rthal_send_ipi(RTHAL_SERVICE_IPI0, cpumask);
}
static inline int xnlock_is_owner(xnlock_t *lock)
@@ -387,14 +388,14 @@ static inline int xnlock_is_owner(xnlock
#else /* !CONFIG_SMP */
-#define xnlock_init(lock) do { } while(0)
-#define xnlock_get(lock) do { } while(0)
-#define xnlock_put(lock) do { } while(0)
-#define xnlock_get_irqsave(lock,x) rthal_local_irq_save(x)
-#define xnlock_put_irqrestore(lock,x) rthal_local_irq_restore(x)
-#define xnlock_clear_irqoff(lock) rthal_local_irq_disable()
-#define xnlock_clear_irqon(lock) rthal_local_irq_enable()
-#define xnlock_is_owner(lock) 1
+#define xnlock_init(lock) do { } while(0)
+#define xnlock_get(lock) do { } while(0)
+#define xnlock_put(lock) do { } while(0)
+#define xnlock_get_irqsave(lock,x) rthal_local_irq_save(x)
+#define xnlock_put_irqrestore(lock,x) rthal_local_irq_restore(x)
+#define xnlock_clear_irqoff(lock) rthal_local_irq_disable()
+#define xnlock_clear_irqon(lock) rthal_local_irq_enable()
+#define xnlock_is_owner(lock) 1
#define DECLARE_XNLOCK(lock)
#define DECLARE_EXTERN_XNLOCK(lock)
@@ -403,7 +404,7 @@ static inline int xnlock_is_owner(xnlock
static inline int xnarch_send_ipi (xnarch_cpumask_t cpumask)
{
- return 0;
+ return 0;
}
#endif /* !CONFIG_SMP */
@@ -418,7 +419,7 @@ static inline int xnarch_remap_vm_page(s
unsigned long from,
unsigned long to)
{
- return wrap_remap_vm_page(vma,from,to);
+ return wrap_remap_vm_page(vma, from, to);
}
static inline int xnarch_remap_io_page_range(struct vm_area_struct *vma,
@@ -427,7 +428,7 @@ static inline int xnarch_remap_io_page_r
unsigned long size,
pgprot_t prot)
{
- return wrap_remap_io_page_range(vma,from,to,size,prot);
+ return wrap_remap_io_page_range(vma, from, to, size, prot);
}
#ifndef xnarch_hisyscall_entry
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]
next prev parent reply other threads:[~2008-03-02 11:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <47C51A34.203@domain.hid>
2008-03-02 10:38 ` [Xenomai-help] [PATCH 1/6] Refactor xnlock debugging Jan Kiszka
2008-03-02 10:38 ` [Xenomai-help] [PATCH 2/6] Whitespace fixes for asm-generic/system.h Jan Kiszka
2008-03-02 10:38 ` [Xenomai-help] [PATCH 3/6] Consolidate xnlock_put debugging Jan Kiszka
2008-03-02 10:38 ` [Xenomai-help] [PATCH 4/6] Move spinning code out-of-line Jan Kiszka
2008-03-02 10:38 ` [Xenomai-help] [PATCH 5/6] Introduce optional recursive ticket xnlock Jan Kiszka
2008-03-02 10:38 ` [Xenomai-help] [PATCH 6/6] Allow xnlock debugging on single-CPU systems Jan Kiszka
2008-03-02 11:02 ` [Xenomai-core] [PATCH 1/6] Refactor xnlock debugging Jan Kiszka
2008-03-02 11:02 ` Jan Kiszka [this message]
2008-03-02 11:02 ` [Xenomai-core] [PATCH 3/6] Consolidate xnlock_put debugging Jan Kiszka
2008-03-02 11:02 ` [Xenomai-core] [PATCH 4/6] Move spinning code out-of-line Jan Kiszka
2008-03-02 11:02 ` [Xenomai-core] [PATCH 5/6] Introduce optional recursive ticket xnlock Jan Kiszka
2008-03-02 11:02 ` [Xenomai-core] [PATCH 6/6] Allow xnlock debugging on single-CPU systems Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47CA8949.8030704@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=Xenomai-core@domain.hid \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.