Somnath kotur wrote:
Garrett/James
Yes i did actually (trying it out wouldn't harm anyone) , and for some reason i got an undefined symbol error for 'list_remove_head' function (snippet of system log below:) . Now i do not know why only this symbol would go undefined,i am using Solaris 10 U7 ,could it be that this is not in in that release? I know i could do list_head() ,followed by list_remove_node() ,but you think that extra call might have an impact in fastpath ?
That symbol was added more recently in SNV, and isn't part of the
original S10 bits, I think.
/usr/kernel/drv/amd64/<mydrivername>: undefined symbol
Sep 7 15:38:58 se genunix: [ID 826211 kern.notice] 'list_remove_head'
Also,while we are on this, just wanted to know if there are equivalents to
cpu_to_le32 ,cpu_to_le16 etc which are pretty useful wrappers that turn to a
NOP if the host is a LE m/c ,take the right step otherwise ,or do i have to
define my own such wrappers?
You have to roll your own if you need them.
- Garrett
Thanks
Som
----- Original Message ----
From: Garrett D'Amore <[email protected]>
To: James C. McPherson <[email protected]>
Cc: Somnath kotur <[email protected]>; [email protected]
Sent: Tuesday, September 8, 2009 8:12:55 AM
Subject: Re: [driver-discuss] Generic linked list implementation in kernel
James C. McPherson wrote:
On Mon, 07 Sep 2009 09:14:52 -0700
Garrett D'Amore <[email protected]> wrote:
Somnath kotur wrote:
Hi All,
Is there a generic linked list implementation in Solaris 10 U7 along with
usage examples in the kernel ala linux? I see that even the e1000g driver seems to
use it's own linked list implementation.,just wanted to know is there any particular
reason for this? I see a <sys/list.h> and a list.c but now many users of this ?
Pls correct me if i am wrong and /or point me to it's usage /semantics?
list.c and list.h are relatively recent additions. Boomer (the audio
subsystem) uses them pretty heavily. Look in OpenSolaris in
usr/src/uts/common/io/audio/impl/*.c
Garrett - they've been there since Solaris 9 update 5. 2003 isn't
on my "recent" radar any more :-P
I figured they were introduced in S10... to me 2003 is still kind of recent,
since most of the other DDI interfaces date back to Solaris 8 or earlier. :-)
Somnath - I strongly encourage you to use <sys/list.h> for your code. The best
way to get examples of its usage is to
use OpenGrok and see what pops up:
Yep.
http://src.opensolaris.org/source/search?q=sys%2Flist.h&defs=&refs=&path=&hist=&project=%2Fonnv
Btw, I think these interfaces should become an official part of the DDI. I'd
be happy to sponsor a fast track to make them so, if someone else wanted to
write up the initial case materials.
- Garrett
cheers,
James C. McPherson
--
Senior Kernel Software Engineer, Solaris
Sun Microsystems
http://blogs.sun.com/jmcp http://www.jmcp.homeunix.com/blog
_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss
_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss