Re: [Xenomai-help] the same error-solution

2006-03-15 Thread Jan Kiszka
Jeff Webb wrote:
 marcellin wrote:
 -I've forgot rt_task_shadow() in the main Linux thread
 
 It would be helpful to add a note to the API docs for rt_task_shadow()
 explaining this usage.  It would also be good to note that tasks created
 in this way must also be cleaned up using rt_task_delete().
 
 rt_task_shadow()
 -
 Turns the current Linux task into a native Xenomai task.  Creates a
 real-time task running in the context of the calling regular Linux task
 in user-space.  For instance, calling rt_task_shadow() from main() will
 map the program's main thread to a native Xenomai thread, allowing it to
 invoke blocking real-time services.  Note that all tasks created using
 rt_task_shadow() must be cleaned up using rt_task_delete().
 -

Oops, this need for cleanup likely dates back to my comment It's
actually not that hard. The related kernel resources get released when
the task terminates. But cleanup is (still) mandatory for non-task objects.

 
 It would be good to put a note in the rt_task_delete() docs as well.
 
 rt_task_delete()
 -
 ... A task exists in the system since rt_task_create() ( or possibly
 rt_task_shadow() ) has been called to create it, so this service must be
 called in order to destroy it afterwards...
 -
 
 I'm sure these comments are obvious to many folks, but it would help out
 the newbies.  It is helpful when the documentation explicitly says
 things like this, so one doesn't have to guess.
 
 Thanks again for putting in the effort to make great API documentation. 
 I believe it is essential to the widespread adoption of Xenomai, and
 makes it very attractive to the newcomer.
 
 If you would rather have me submit suggestions like this in patch form,
 I would be happy to do so.  Just show me an example diff (or 'svn
 diff'?)  command so I know what command-line options you prefer.

Yes, svn diff gives very good output. And yes, a patch is even more
welcome than your already helpful comments. I recently learned again
that RTDM is also still suffering from inherent but undocumented
characteristics, things that are obvious - at least for me. ;)

Jan



signature.asc
Description: OpenPGP digital signature
___
Xenomai-help mailing list
Xenomai-help@gna.org
https://mail.gna.org/listinfo/xenomai-help


Re: [Xenomai-help] the same error

2006-03-14 Thread Gilles Chanteperdrix
marcellin wrote:
  well, I've made some little modifications, now i use the 
  rt_task_shadow()  function, but  from  the  rt_intr_wait() function  
  the  numerical  error is  -1.  

What does lsmod say, did you compile the native skin as a module, is the
module loaded ?
Did you try the latency program ?

  To answer to Gilles, i use the RTC irq 
  because i work on a (slow) acquisition system wich works continuously, 
  and don't allow time drifts. The use of xenomai is to have tiny latencies.

Then rt_task_set_periodic()/rt_task_wait_period() is probably what
you should be using.

-- 


Gilles Chanteperdrix.

___
Xenomai-help mailing list
Xenomai-help@gna.org
https://mail.gna.org/listinfo/xenomai-help