From: "J.A. Magallón" <jamagallon@ono.com>
To: Robert Hancock <hancockr@shaw.ca>
Cc: "remi.chateauneu@gmail.com" <remi.chateauneu@gmail.com>,
linux-kernel <linux-kernel@vger.kernel.org>
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: <45E44165.4060608@shaw.ca>
On Tue, 27 Feb 2007 08:34:13 -0600, Robert Hancock <hancockr@shaw.ca> wrote:
> remi.chateauneu@gmail.com wrote:
> > On Feb 26, 2:26 pm, Robert Hancock <hanco...@shaw.ca> wrote:
> >> remi.chateau...@gmail.com 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
prev 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] <1172493644.311389.243780@8g2000cwh.googlegroups.com>
2007-02-26 14:25 ` list.h , list_head and C++ Robert Hancock
[not found] ` <fa.K8OHlwttPU4TDDzMegRRFAIJrxw@ifi.uio.no>
[not found] ` <fa.9RVekJKqUMy1lb5hfYQYDK8VxnE@ifi.uio.no>
[not found] ` <1172571563.228792.208610@h3g2000cwc.googlegroups.com>
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* 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 \
--to=jamagallon@ono.com \
--cc=hancockr@shaw.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=remi.chateauneu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.