lkml.org 
[lkml]   [2002]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: export of sys_call_table
Andi,

On Fri, 04 Oct 2002, Andi Kleen wrote:

> "Brian F. G. Bidulock" <bidulock@openss7.org> writes:
>
>
> > void *dataptr, int band, int flags)
> > {
> > int ret =3D -ENOSYS;
> > read_lock(&streams_call_lock);
>
> I don't think you really want to use any spinlocks this way. They would
> make sleeping impossible and you could never legally do a copy_from/to_user
> in your system call. And how else would you access dataptr ?
>
> More likely you want an atomic_inc(&modulecounter) or perhaps a rw
> semaphore.

read_lock and write_lock are a rw semaphores, aren't they?

--brian

--
Brian F. G. Bidulock ¦ The reasonable man adapts himself to the ¦
bidulock@openss7.org ¦ world; the unreasonable one persists in ¦
http://www.openss7.org/ ¦ trying to adapt the world to himself. ¦
¦ Therefore all progress depends on the ¦
¦ unreasonable man. -- George Bernard Shaw ¦
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:29    [W:0.409 / U:0.296 seconds]
©2003-2011 Jasper Spaans. Advertise on this site