Re: list.h , list_head and C++

From: Robert Hancock
Date: Mon Feb 26 2007 - 09:25:49 EST


remi.chateauneu@xxxxxxxxx wrote:
My C++ program needs an intrusive list, possibly with RCU
capabilities.The data structure list_head, defined in /usr/include/
linux/list.h , fits perfectly these needs.

You really shouldn't use kernel data structures in userspace. The locking and other primitives they depend on are not guaranteed to work. Also keep in mind that using these structures probably makes your program a derivative of the kernel and would require your software to be released under the GPL.

--
Robert Hancock Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@xxxxxxxxxxxxx
Home Page: http://www.roberthancock.com/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/