Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unable to find slab.h and mm.h

0 views
Skip to first unread message

TonyB

unread,
Nov 25, 2009, 4:06:15 PM11/25/09
to
I'm need to include slab.h and mm.h in a c++ program. i.e.

#include <linux/slab.h>
#include <linux/mm.h>

I'm unable to find the header files anywhere in the file system. I
expected to find them in /usr/include/linux.

slab.h and mm.h also have include statements for files that re not on
the file system.

Is the a package or library I can install to correct this?

Thanks from NH

Pascal J. Bourguignon

unread,
Nov 25, 2009, 4:19:55 PM11/25/09
to
TonyB <tig...@yahoo.com> writes:

They are kernel specific headers. You might find them in
/usr/src/linux/include/linux/, but they'd be rather useless if you are
not programming a linux kernel module.


--
__Pascal Bourguignon__

TonyB

unread,
Nov 25, 2009, 5:09:43 PM11/25/09
to
On Nov 25, 4:19 pm, p...@informatimago.com (Pascal J. Bourguignon)
wrote:

Is there a way to include them when rebulding the kernel?

Thanks for the previous post.

Pascal J. Bourguignon

unread,
Nov 25, 2009, 6:31:39 PM11/25/09
to
TonyB <tba...@gmail.com> writes:

> On Nov 25, 4:19�pm, p...@informatimago.com (Pascal J. Bourguignon)
> wrote:
>> TonyB <tig...@yahoo.com> writes:
>> > I'm need to include slab.h and mm.h in a c++ program. �i.e.
>>
>> > #include <linux/slab.h>
>> > #include <linux/mm.h>
>>
>> > I'm unable to find the header files anywhere in the file system. �I
>> > expected to find them in /usr/include/linux.
>>
>> > slab.h and mm.h also have include statements for files that re not on
>> > the file system.
>>
>> > Is the a package or library I can install to correct this?
>>
>> > Thanks from NH
>>
>> They are kernel specific headers. �You might find them in
>> /usr/src/linux/include/linux/, but they'd be rather useless if you are
>> not programming a linux kernel module.
>

> Is there a way to include them when rebulding the kernel?

Of course, they are included by the kernel sources, so when you're
compiling it, they're included.


> Thanks for the previous post.

What are you trying to do?
Are you modifying the kernel?
Are you writing a kernel module?

--
__Pascal Bourguignon__

TonyB

unread,
Nov 25, 2009, 7:18:22 PM11/25/09
to
On Nov 25, 6:31 pm, p...@informatimago.com (Pascal J. Bourguignon)
wrote:
Pascal,

Working on a custom USB isochronous interface. Requesting the URBs
requires use of those headers. My project is sort of stalled because
of this. I'll study the kernel and will try to rebuild it
appropriately. Thanks for your help and interest.

Tony B

Pascal J. Bourguignon

unread,
Nov 25, 2009, 7:27:47 PM11/25/09
to
TonyB <tig...@yahoo.com> writes:

> On Nov 25, 6:31�ソスpm, p...@informatimago.com (Pascal J. Bourguignon)
> wrote:
>> TonyB <tbac...@gmail.com> writes:
>> > On Nov 25, 4:19�ソスpm, p...@informatimago.com (Pascal J. Bourguignon)
>> > wrote:
>> >> TonyB <tig...@yahoo.com> writes:
>> >> > I'm need to include slab.h and mm.h in a c++ program. �ソスi.e.
>>
>> >> > #include <linux/slab.h>
>> >> > #include <linux/mm.h>
>>
>> >> > I'm unable to find the header files anywhere in the file system. �ソスI


>> >> > expected to find them in /usr/include/linux.
>>
>> >> > slab.h and mm.h also have include statements for files that re not on
>> >> > the file system.
>>
>> >> > Is the a package or library I can install to correct this?
>>
>> >> > Thanks from NH
>>

>> >> They are kernel specific headers. �ソスYou might find them in


>> >> /usr/src/linux/include/linux/, but they'd be rather useless if you are
>> >> not programming a linux kernel module.
>>
>> > Is there a way to include them when rebulding the kernel?
>>
>> Of course, they are included by the kernel sources, so when you're
>> compiling it, they're included.
>>
>> > Thanks for the previous post.
>>

>> What are you trying to do? �ソス


>> Are you modifying the kernel?
>> Are you writing a kernel module?
>

> Working on a custom USB isochronous interface. Requesting the URBs
> requires use of those headers. My project is sort of stalled because
> of this. I'll study the kernel and will try to rebuild it
> appropriately. Thanks for your help and interest.

Then it means that you will have to write a kernel module. Now the
question is how to do that with C++. AFAIK, the kernel doesn't
include a C++ runtime.

--
__Pascal Bourguignon__

0 new messages