LKML Archive on
help / color / mirror / Atom feed
From: "J.A. Magallón" <>
To: Robert Hancock <>
Cc: "" <>,
	linux-kernel <>
Subject: Re: list.h , list_head and C++
Date: Tue, 27 Feb 2007 17:24:17 +0100	[thread overview]
Message-ID: <20070227172417.0364fc5f@werewolf-wl> (raw)
In-Reply-To: <>

On Tue, 27 Feb 2007 08:34:13 -0600, Robert Hancock <> wrote:

> wrote:
> > On Feb 26, 2:26 pm, Robert Hancock <> wrote:
> >> wrote:
> >>> My C++ program needs an intrusive list, possibly with RCU
> >>> capabilities.The data structurelist_head, defined in /usr/include/
> >>> linux/list.h , fits perfectly these needs.

In userspace you're better thinking of a STL list protected by some
POSIX threads primitives. Depending on what you really want to do
with the list, for example a shared work queue, you
could look into condition variables or rwlocks.
Use the standard STL list. You will save a lot of work. And they are not
so bad in performance.

J.A. Magallon <jamagallon()ono!com>     \               Software is like sex:
                                         \         It's better when it's free
Mandriva Linux release 2007.1 (Cooker) for i586
Linux 2.6.19-jam07 (gcc 4.1.2 20070115 (prerelease) (4.1.2-0.20070115.1mdv2007.1)) #2 SMP PREEMPT

      parent reply	other threads:[~2007-02-27 16:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <>
2007-02-26 14:25 ` list.h , list_head and C++ Robert Hancock
     [not found] ` <>
     [not found]   ` <>
     [not found]     ` <>
2007-02-27 14:34       ` Robert Hancock
2007-02-27 16:23         ` Avi Kivity
2007-02-27 16:24         ` J.A. Magallón [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070227172417.0364fc5f@werewolf-wl \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).