Hello Sandeep Kumar,
sorry for replying so late. I hope you are still with us :-).

2012/6/10 Sandeep Ruhil <[email protected]>:
> Hey,
>
> I am encountering a small problem in working on second point of this ticket.
>
> I need an object of indev_t inside the function symtab_compl of file
> kernel/generic/src/debug/symtab.c but when i include the header file
> <console/chardev.h> (containing the definition of indev_t) in the file
> kernel/generic/include/symtab.h (containing the prototype of symtab_compl
> function), i get the following compilation error :
>
> In file included from generic/include/console/chardev.h:40:0,
>          from generic/include/symtab.h:39,
>          from generic/include/debug.h:39,
>          from generic/include/synch/spinlock.h:42,
>          from generic/include/proc/scheduler.h:38,
>          from arch/ia32/src/proc/scheduler.c:35:
> generic/include/synch/waitq.h:56:2: error: expected specifier-qualifier-list
> before 'IRQ_SPINLOCK_DECLARE'
>
> When i inspected the reason, it turned out that :
>     spinlock.h includes debug.h
>     debug.h includes symtab.h
>     symtab.h includes chardev.h (my include)
>     chardev.h includes waitq.h
>     waitq.h uses IRQ_SPINLOCK_DECLARE, which is declared in spinlock.h but
> spinlock.h is not fully included as the compiler is following an inclusion
> of spinlock.h file and hence compiler cannot find the definition of
> IRQ_SPINLOCK_DECLARE macro.
>
> What can i do to resolve this error?
I would go for splitting the symtab.h into two files. Keep the lookup
functionality in one and move printing functions (symtab_print_search
and symtab_compl) to another one.

This would not break any files except those under console/*.c so it
shall be pretty painless. The only problem is that these functions
require the symtab_search_one() function that is private (i.e. static)
to symtab.c. But I think that it is okay to make this function public
and move it to symtab.h.

Hope this helps.

Regards,
- Vojta


>
>
> --
> Regards,
> Sandeep Kumar
>
>
> _______________________________________________
> HelenOS-devel mailing list
> [email protected]
> http://lists.modry.cz/cgi-bin/listinfo/helenos-devel
>

_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/cgi-bin/listinfo/helenos-devel

Reply via email to