Re: [PATCH] Re: export of sys_call_table

From: David S. Miller (davem@redhat.com)
Date: Tue Oct 08 2002 - 18:18:38 EST


   From: "Brian F. G. Bidulock" <bidulock@openss7.org>
   Date: Tue, 8 Oct 2002 16:20:17 -0600

   This version (courtesy of Dave Grothe at GCOM) uses up/down
   semaphore instead of read/write spinlocks.
   
Oh really?

   +static int (*do_putpmsg) (int, void *, void *, int, int) = NULL;
   +static int (*do_getpmsg) (int, void *, void *, int, int) = NULL;
   +
   +static rwlock_t streams_call_lock = RW_LOCK_UNLOCKED;
           ^^^^^^^^
   +
   +long asmlinkage sys_putpmsg(int fd, void *ctlptr, void *datptr, int band, int flags)
   +{
   + int ret = -ENOSYS;
   + read_lock(&streams_call_lock);
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   + if (do_putpmsg)
   + ret = (*do_putpmsg) (fd, ctlptr, datptr, band, flags);
   + read_unlock(&streams_call_lock);
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   + return ret;
   +}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Oct 15 2002 - 22:00:29 EST