Dear solaris gurus, I have a stupid question when writing a program under solaris. In the program, I want to use the system function ddi_fls() and ddi_ffs().
>From its description at http://docs.sun.com/app/docs/doc/819-2256/ddi-ffs-9f?q=StarOffice&s=t&a=view, I think it can meet my requirement. I haven't use a solaris function inside the user application before. Yet I've tried it this way: #include <sys/conf.h> #include <sys/ddi.h> #include <sys/sunddi.h> #include <stdio.h> void main() { long bitmap = 8300; //binary format: 10 0000 0110 1100 //try ddi_ffs() and ddi_fls() printf("The index of the first set bit in the bitmap is:%dth\n", ddi_ffs(bitmap)); printf("The index of the last set bit in the bitmap is:%dth\n", ddi_fls(bitmap)); } Then, I compiled it by: "gcc -o test.o test.c" and got some error at linking stage: Undefined symbol first referenced in file ddi_ffs /var/tmp//ccu... ddi_fls /var/tmp//... ld: fatal: symbol referencing errors. Can you show me how to use the ddi_XXXX() function in my userland code? Thank you in advance. -- Regards Ning Deng School Of Computer Science and Technology Beijng Institute of Technology, China, 100081 [email protected]
_______________________________________________ driver-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/driver-discuss
