1 os/linux/src/core/IxOsalOsMsgQ.c | 2 +-
2 os/linux/src/core/IxOsalOsSemaphore.c | 6 +++---
3 os/linux/src/core/IxOsalOsServices.c | 20 ++++++++++++++++----
4 os/linux/src/core/IxOsalOsThread.c | 7 +------
5 4 files changed, 21 insertions(+), 14 deletions(-)
7 --- ixp_osal/os/linux/src/core/IxOsalOsMsgQ.c 1970-01-01 00:00:00.000000000 +0000
8 +++ ixp_osal/os/linux/src/core/IxOsalOsMsgQ.c 1970-01-01 00:00:00.000000000 +0000
10 * -- End Intel Copyright Notice --
12 #include <linux/linkage.h>
13 +#include <linux/spinlock.h>
14 #include <linux/ipc.h>
15 #include <linux/msg.h>
16 -#include <linux/spinlock.h>
17 #include <linux/interrupt.h>
20 --- ixp_osal/os/linux/src/core/IxOsalOsSemaphore.c 1970-01-01 00:00:00.000000000 +0000
21 +++ ixp_osal/os/linux/src/core/IxOsalOsSemaphore.c 1970-01-01 00:00:00.000000000 +0000
25 #include <linux/slab.h>
26 -#include <asm-arm/hardirq.h>
27 +#include <linux/hardirq.h>
30 /* Define a large number */
31 @@ -93,7 +93,7 @@ ixOsalSemaphoreWait (IxOsalOsSemaphore *
34 IX_STATUS ixStatus = IX_SUCCESS;
36 + unsigned long timeoutTime;
40 @@ -261,7 +261,7 @@ ixOsalMutexInit (IxOsalMutex * mutex)
42 ixOsalMutexLock (IxOsalMutex * mutex, INT32 timeout)
45 + unsigned long timeoutTime;
49 --- ixp_osal/os/linux/src/core/IxOsalOsServices.c 1970-01-01 00:00:00.000000000 +0000
50 +++ ixp_osal/os/linux/src/core/IxOsalOsServices.c 1970-01-01 00:00:00.000000000 +0000
52 #include <linux/time.h>
53 #include <linux/sched.h>
54 #include <linux/slab.h>
55 +#include <linux/interrupt.h>
59 @@ -89,7 +90,7 @@ static IxOsalInfoType IxOsalInfo[NR_IRQS
61 * General interrupt handler
65 ixOsalOsIsrProxy (int irq, void *dev_id, struct pt_regs *regs)
67 IxOsalInfoType *isr_proxy_info = (IxOsalInfoType *) dev_id;
68 @@ -98,6 +99,7 @@ ixOsalOsIsrProxy (int irq, void *dev_id,
69 "ixOsalOsIsrProxy: Interrupt used before ixOsalIrqBind was invoked");
71 isr_proxy_info->routine (isr_proxy_info->parameter);
76 @@ -105,11 +107,12 @@ ixOsalOsIsrProxy (int irq, void *dev_id,
77 * This handler saves the interrupted Program Counter (PC)
78 * into a global variable
82 ixOsalOsIsrProxyWithPC (int irq, void *dev_id, struct pt_regs *regs)
84 ixOsalLinuxInterruptedPc = regs->ARM_pc;
85 ixOsalOsIsrProxy(irq, dev_id, regs);
89 /**************************************
90 @@ -191,10 +194,15 @@ ixOsalIrqUnbind (UINT32 vector)
94 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
95 + unsigned long flags;
96 + local_irq_save(flags);
103 + return (UINT32)flags;
106 /* Enable interrupts and task scheduling,
107 @@ -204,7 +212,11 @@ ixOsalIrqLock ()
109 ixOsalIrqUnlock (UINT32 lockKey)
111 +# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
112 + local_irq_restore((unsigned long)lockKey);
114 restore_flags (lockKey);
119 @@ -329,7 +341,7 @@ ixOsalBusySleep (UINT32 microseconds)
121 ixOsalSleep (UINT32 milliseconds)
123 - if (milliseconds != 0)
124 + if (milliseconds*HZ >= 1000)
126 set_current_state(TASK_INTERRUPTIBLE);
127 schedule_timeout ((milliseconds * HZ) / 1000);
128 --- ixp_osal/os/linux/src/core/IxOsalOsThread.c 1970-01-01 00:00:00.000000000 +0000
129 +++ ixp_osal/os/linux/src/core/IxOsalOsThread.c 1970-01-01 00:00:00.000000000 +0000
130 @@ -65,12 +65,7 @@ thread_internal (void *unused)
131 void *arg = IxOsalOsThreadData.arg;
135 - reparent_to_init ();
137 - exit_files (current);
139 - snprintf(current->comm, sizeof(current->comm), "IxOsal %d", ++seq);
140 + daemonize ("IxOsal %d", ++seq);
142 up (&IxOsalThreadMutex);