lkml.org 
[lkml]   [2001]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: CMPXCHG
On Wed, May 16, 2001 at 03:37:00PM -0700, Scott Huang wrote:
> Four adapters need to produce data to a
> descriptor queue which is consumed by a
> user process. A lock mechanism was implemented
> to sync the adapters. However, this causes
> a performance hit. Is it possible to use
> CMPXCHG on Intel's i-386 to avoid the locking?

What about using atomic operations for that? This is more general
and works on ALL architectures. CMPXCHG is just and special
atomic operation on ia32.

> Where can I find some doc and some sample code?

Documentation/DocBook/kernel-hacking.tmpl

But better do

make htmldocs

in the kernel top level directory and read

Documentation/DocBook/kernel-hacking/lk-hacking-guide.html

instead.

Sample code is scattered all around in the kernel.


Regards

Ingo Oeser
--
To the systems programmer,
users and applications serve only to provide a test load.
-
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 12:53    [W:0.030 / U:19.128 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site