Messages in this thread | | | Date | Tue, 27 Feb 2007 17:24:17 +0100 | From | "J.A. Magallón" <> | Subject | Re: list.h , list_head and C++ |
| |
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 - 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/
| |