lkml.org 
[lkml]   [1998]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectcallc.c and ac13
hi

one question:
in module.h is this definition
union
{
atomic_t usecount;
long pad;
} uc;

atomic_t is

#ifdef __SMP__
typedef struct { volatile int counter; } atomic_t;
#else
typedef struct { int counter; } atomic_t;
#endif

an int
does this work on a 64bit system ...because "pad"
only a long? (32bit long vs. 64bit int??)

----------------------------------------------------------------------------

drivers/isdn/hisax/callc.c (linux 2.1.131ac13)
wont compile for me as a module ... so here is
the fix:

--- linux/drivers/isdn/hisax/callc.c Thu Apr 2 02:20:58 1998
+++ linux.oli/drivers/isdn/hisax/callc.c Fri Dec 18 13:48:24 1998
@@ -62,7 +62,7 @@
#include "hisax.h"

#ifdef MODULE
-#define MOD_USE_COUNT ((&__this_module)->usecount)
+#define MOD_USE_COUNT (& ((&__this_module)->uc.usecount) )
#endif /* MODULE */

const char *lli_revision = "$Revision: 2.13 $";
@@ -2055,7 +2055,7 @@
if (csta->channel[0].debug & 0x400) {
jiftime(tmp, jiffies);
i = strlen(tmp);
- sprintf(tmp + i, " LOCK modcnt %lx\n", MOD_USE_COUNT);
+ sprintf(tmp + i, " LOCK modcnt %lx\n", atomic_read(MOD_USE_COUNT));
HiSax_putstatus(csta, tmp);
}
#endif /* MODULE */
@@ -2066,7 +2066,7 @@
if (csta->channel[0].debug & 0x400) {
jiftime(tmp, jiffies);
i = strlen(tmp);
- sprintf(tmp + i, " UNLOCK modcnt %lx\n", MOD_USE_COUNT);
+ sprintf(tmp + i, " UNLOCK modcnt %lx\n", atomic_read(MOD_USE_COUNT));
HiSax_putstatus(csta, tmp);
}
#endif /* MODULE */
@@ -2128,7 +2128,7 @@
break;
#ifdef MODULE
case (55):
- MOD_USE_COUNT = 0;
+ atomic_set(MOD_USE_COUNT,0);
HiSax_mod_inc_use_count();
break;
#endif /* MODULE */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:46    [W:0.332 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site