Messages in this thread Patch in this message | | | Date | Fri, 18 Dec 1998 14:10:57 +0100 | From | root <> | Subject | callc.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/
| |