Teresa Noviello wrote:
> On 10/4/06, Jan Kiszka <[EMAIL PROTECTED]> wrote:
>>
>> Teresa Noviello wrote:
>> > Hi! I have wrote an RTT program, it's a little bit different from that
>> in
>> > /examples/xenomai/posix, using rtnet and RTAI, in user space (LXRT
>> module).
>> > It works fine but when i try to extend the socket pool of the
>> sockets, i
>> > have no error messages but after the call the program causes kernel
>> panic!
>> > The structure of the program is:
>> >
>> > sock = rt_dev_socket(AF_INET, SOCK_DGRAM,0);
>> > if (sock<0){
>> > ...
>> > }
>> >
>> > ret = ret_dev_ioctl(sock, RTNET_RTIOC_EXTPOOL, &add_rtskbs);
>> >
>> > if(ret != add_rtskbs) {
>> > exit(1);
>> > } else {
>> > printf("Buffer pool extended\n");
>> > }
>> >
>> > //...
>> >
>> > //rt_task_init
>> >
>> > //etc
>> >
>> > You see that i create the socket before rt_task_init call, but all
>> works
>> > fine without "rt_dev_ioct" call.
>> > What can i do?
>>
>> AFAIK, you are not allowed to use RTDM (i.e. LXRT) services in a user
>> space task before invoking rt_task_init* under RTAI.
> 
> 
> 
> (AFAIK? .... what does it mean?...:) )

As Far As I Know 8)

> 
> Yes i knew it but... yes there is a reason for that order... i wrote the
> calls in the same order i found in /examples/rtai/simpleserver.c and
> /examples/rtai/simpleclient.c.

Yes, I remember now. Those examples used to crash once, but then Paolo
modified the LXRT registration of RTDM services. Still, certainly not
all services can be called, but in theory yours should be fine.

> 
> 
> Any reason for the current ordering? If not, try to flip it.
>>
>> Jan
> 
> 
> Now i'll move rt_dev_socket and rt_dev_ioctl  after rt_task_init call and
> i'll tell you the result but still i'm asking myself why, without
> rt_dev_ioctl, the order works?

Cannot tell you, but may posting the oops related to that problem can
shed some light on it.

Jan

Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
RTnet-users mailing list
RTnet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rtnet-users

Reply via email to