Cronyx Site
About Cronyx
Products Prices Contact information Search English 
English Russian  Russian
Software Payment
What's new
F. A. Q.
Partners
Site map


Форум cronyx.ru (архив)

Частично патч для realtime-ядерmithraen  ::  2006-03-13 18:14

diff -ur clinux.orig/async.c clinux/async.c
--- clinux.orig/async.c 2005-09-13 14:47:54 +0400
+++ clinux/async.c 2006-03-13 18:12:38 +0300
@@ -241,7 +241,7 @@
#else
INIT_WORK(&p->tqueue, asy_offintr, p);
#endif
- p->lock = SPIN_LOCK_UNLOCKED;
+ spin_lock_init(&p->lock);

h->sw = p;
h->proto = &asy_tab;
diff -ur clinux.orig/packet.c clinux/packet.c
--- clinux.orig/packet.c 2005-04-24 16:14:29 +0400
+++ clinux/packet.c 2006-03-13 18:12:38 +0300
@@ -127,8 +127,8 @@
if (p->num_open)
return -EBUSY;

- p->rx_queue_lock = SPIN_LOCK_UNLOCKED;
- p->tx_queue_lock = SPIN_LOCK_UNLOCKED;
+ spin_lock_init (&p->rx_queue_lock);
+ spin_lock_init (&p->tx_queue_lock);

err = h->up (h);
if (err)
diff -ur clinux.orig/raw.c clinux/raw.c
--- clinux.orig/raw.c 2005-04-24 16:14:29 +0400
+++ clinux/raw.c 2006-03-13 18:12:38 +0300
@@ -103,8 +103,8 @@
if (p->num_open)
return -EBUSY;

- p->rx_queue_lock = SPIN_LOCK_UNLOCKED;
- p->tx_queue_lock = SPIN_LOCK_UNLOCKED;
+ spin_lock_init (&p->rx_queue_lock);
+ spin_lock_init (&p->tx_queue_lock);

err = h->up (h);
if (err)
diff -ur clinux.orig/sigma.c clinux/sigma.c
--- clinux.orig/sigma.c 2005-10-11 18:42:19 +0400
+++ clinux/sigma.c 2006-03-13 18:12:38 +0300
@@ -58,9 +58,15 @@
static cx_buf_t *buffer [NBRD] [NCHAN];
static struct timer_list led_timer [NBRD];

-spinlock_t cx_locks [NBRD] = {
- SPIN_LOCK_UNLOCKED, SPIN_LOCK_UNLOCKED, SPIN_LOCK_UNLOCKED,
-};
+spinlock_t cx_locks [NBRD];
+
+static inline void init_cx_locks(void)
+{
+ int i;
+
+ for (i = 0; i < NBRD; i++)
+ spin_lock_init(&cx_locks[i]);
+}

#define LCK(b,f) spin_lock_irqsave (cx_locks + (b)->num, f)
#define UNLCK(b,f) spin_unlock_irqrestore (cx_locks + (b)->num, f)
@@ -765,6 +771,8 @@
int unit, ndev, i;
unsigned long flags;

+ init_cx_locks();
+
#if LINUX_VERSION_CODE < 0x020600
EXPORT_NO_SYMBOLS;
#endif
Только в clinux: sigma.c.orig
diff -ur clinux.orig/sync.c clinux/sync.c
--- clinux.orig/sync.c 2005-09-13 14:47:54 +0400
+++ clinux/sync.c 2006-03-13 18:12:38 +0300
@@ -307,7 +307,7 @@
#else
INIT_WORK(&p->tqueue, syn_offintr, p);
#endif
- p->lock = SPIN_LOCK_UNLOCKED;
+ spin_lock_init (&p->lock);
init_MUTEX (&p->sem);

h->sw = p;
diff -ur clinux.orig/tau32.c clinux/tau32.c
--- clinux.orig/tau32.c 2005-09-13 14:47:55 +0400
+++ clinux/tau32.c 2006-03-13 18:12:38 +0300
@@ -234,7 +234,7 @@
static tau32_board_t *adapters [NBRD];
static struct timer_list second_timer;

-spinlock_t tau32_lock_driver = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(tau32_lock_driver);

static int tau32_init_adapter(tau32_board_t *b, int hard_reset);
static void tau32_halt_adapter(tau32_board_t *b);
diff -ur clinux.orig/tau.c clinux/tau.c
--- clinux.orig/tau.c 2005-10-11 18:42:19 +0400
+++ clinux/tau.c 2006-03-13 18:12:42 +0300
@@ -59,11 +59,17 @@
static struct timer_list g_timer;
static struct timer_list led_timer [NBRD];

-spinlock_t ct_locks [NBRD] = {
- SPIN_LOCK_UNLOCKED, SPIN_LOCK_UNLOCKED, SPIN_LOCK_UNLOCKED,
-};
+spinlock_t ct_locks [NBRD];

-spinlock_t ct_lock_driver = SPIN_LOCK_UNLOCKED;
+static inline void init_ct_locks(void)
+{
+ int i;
+
+ for (i = 0; i < NBRD; i++)
+ spin_lock_init(&ct_locks[i]);
+}
+
+DEFINE_SPINLOCK(ct_lock_driver);

#define LCK(b,f) spin_lock_irqsave (ct_locks + (b)->num, f)
#define UNLCK(b,f) spin_unlock_irqrestore (ct_locks + (b)->num, f)
@@ -948,6 +954,8 @@
int unit, ndev, i;
unsigned long flags;

+ init_ct_locks();
+
#if LINUX_VERSION_CODE < 0x020600
EXPORT_NO_SYMBOLS;
#endif
Только в clinux: tau.c.orig
diff -ur clinux.orig/taupci.c clinux/taupci.c
--- clinux.orig/taupci.c 2005-09-13 14:47:55 +0400
+++ clinux/taupci.c 2006-03-13 18:12:42 +0300
@@ -76,11 +76,17 @@
static int cp_irq_enabled;
static int cp_irq_notignore [NBRD];

-spinlock_t cp_locks [NBRD] = {
- SPIN_LOCK_UNLOCKED, SPIN_LOCK_UNLOCKED, SPIN_LOCK_UNLOCKED,
- SPIN_LOCK_UNLOCKED, SPIN_LOCK_UNLOCKED, SPIN_LOCK_UNLOCKED,
-};
-spinlock_t cp_lock_driver = SPIN_LOCK_UNLOCKED;
+spinlock_t cp_locks [NBRD];
+
+static inline void init_cp_locks(void)
+{
+ int i;
+
+ for (i = 0; i < NBRD; i++)
+ spin_lock_init(&cp_locks[i]);
+}
+
+DEFINE_SPINLOCK(cp_lock_driver);

#define LCK(b,f) spin_lock_irqsave (cp_locks + b->num, f)
#define UNLCK(b,f) spin_unlock_irqrestore (cp_locks + b->num, f)
@@ -1409,6 +1415,8 @@
unsigned short res;
struct pci_dev *dev;

+ init_cp_locks();
+
#if LINUX_VERSION_CODE < 0x020600
EXPORT_NO_SYMBOLS;
#endif



tau32pci на realtime ядре
kmax  ::  2006-02-20 18:23
   Не должно быть больших сложностей (+)ly  ::  2006-02-21 10:43
      протокол компиляцииkmax  ::  2006-02-21 12:36
         Нужны небольшие правки (+)ly  ::  2006-02-21 13:06
            Частично патч для realtime-ядерmithraen  ::  2006-03-13 18:14
               Спасибо (+)ly  ::  2006-03-13 18:19
            К сожалению ошибки остались прежниеkmax  ::  2006-02-21 15:03
               ваш czaptel.cly  ::  2006-02-21 15:17
                  czaptel.ckmax  ::  2006-02-21 18:41
                     Примерно так (+)ly  ::  2006-02-22 12:28
                        результатыkmax  ::  2006-02-24 11:02

Copyright © 1996-2024 Cronyx