HI James,
Nope , i dont have any other definitions of that function ...just to
try it out again , i just declared a simple 'list_t' variable and called the
API in my _init()
list_t my_list;
list_remove_head(&my_list);
As before ,driver failed to attach succesfully, and threw out this error msg:
Sep 8 12:11:19 se genunix: [ID 472681 kern.notice] WARNING: mod_load: cannot
load module '<drivername>'
Sep 8 12:11:19 se genunix: [ID 819705 kern.notice]
/usr/kernel/drv/amd64/<drivername>: undefined symbol
Sep 8 12:11:19 se genunix: [ID 826211 kern.notice] 'list_remove_head'
Any ideas?
BTW thanks for the heads-up on Byteorder.h ,i think LE_32(x) etc routines are
what i am looking for
Thanks
Som
----- Original Message ----
From: James C. McPherson <[email protected]>
To: Somnath kotur <[email protected]>
Cc: Garrett D'Amore <[email protected]>; [email protected]
Sent: Tuesday, September 8, 2009 11:38:32 AM
Subject: Re: [driver-discuss] Generic linked list implementation in kernel
On Mon, 07 Sep 2009 22:52:23 -0700 (PDT)
Somnath kotur <[email protected]> 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 ?
>
> /usr/kernel/drv/amd64/<mydrivername>: undefined symbol
> Sep 7 15:38:58 se genunix: [ID 826211 kern.notice] 'list_remove_head'
No, those functions are definitely there from S9 Update 5 onwards,
they haven't been removed at all.
I don't know why you'd see that message - did you #include <sys/list.h>
in your driver? Did you declare list_remove_head in some way which does
not match the header file?
> 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?
>
<sys/byteorder.h> is what you're looking for here
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