<< | Thread Index | >> ]    [ << | Date Index | >> ]

Subject: Re: unresolved symbols
From: Roberto Nibali <ratz,AT,tac,DOT,ch>
Date: Thu, 15 Mar 2001 14:04:15 +0100
In-reply-to: <Pine.LNX.4.31.0103152313410.17699-100000@mailhub.air.net.au>

Hi Ben,

I just had a short look and it reveiled some questions for me too.

> I sorted out the last problem I had with compilation--I had an incomplete
> kernel source tree from way back.

Ok, so we can safely disregard the previous post from you.
 
> Now, when building the cipecb module, I am missing a ``down_interruptible''

Doesn't exist in 2.0.x

> symbol in the module.  Grepping the kernel source tree, I see no such
> symbol.  The code #defines cipe_alloc_LOCK() to a call to
> down_interruptible().  How can this work with a 2.0 series kernel?

It can't but what I don't understand is, why it calls the wrong cipe_alloc\
_LOCK at your side since the definition is as follows (1.4.6):

#ifdef LINUX_21
/* In 2.1 the ioctl operations are run under lock. Beware of deadlocks. */
#define cipe_alloc_LOCK()       0 /* nop */
#define cipe_alloc_UNLOCK()       /* nop */
#else
static struct semaphore cipe_alloc_sem=MUTEX;
#define cipe_alloc_LOCK()       down_interruptible(&cipe_alloc_sem)
#define cipe_alloc_UNLOCK()     up(&cipe_alloc_sem)
#endif

It seems as there is no definition for 2.0 kernels regarding cipe.h:
#ifndef KERNEL_VERSION
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,0)
#define LINUX_21
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
#define LINUX_23
#endif

I suggest as a quick hack to try changing the first block to:

#define cipe_alloc_LOCK()       0 /* nop */
#define cipe_alloc_UNLOCK()       /* nop */

This means: remove the #ifdef - #endif block and only write the
two lines mentioned above. This is not at all a fix but I should
get it working for your system since I don't think in 2.0.x times
there was a different semaphore handling than in 2.2.x. I might
be that there are more places like this in the code but I suggest
you try it as described above.

HTH,
Roberto Nibali, ratz

-- 
mailto: `echo NrOatSz,AT,tPacA,DOT,cMh | sed 's/[NOSPAM]//g'`





<< | Thread Index | >> ]    [ << | Date Index | >> ]