[rtl] generell help question

2000-04-26 Thread Olaf Petzold

Hallo,

this is may be a little bit off-topic, but related to this group.

I'm using shared memory and have to check for in use of the shared memory
regions. This is done by a function eg. put_shm(arg). This returns true on
sucess or false if the resource was busy. Inside the caller I have a construct
like this:

 try_cntr = MAX_TRIES;

do {
try_cntr--;
} while(shm_put_SensorLUT(slut) != 0 || try_cntr ==0);

if(try_cntr == 0) {
rtl_printf("Failed to copy %2d times to <%s>\n",
  MAX_TRIES, SHM_NAME_SLUT);
}

This looks very complicated for me and I still didn't found a shorter to
program this behavior. How does know one ??

The next question is can I use pthread_mutex for this - generell I would say
yes (it's supportet by rtl-2.2 I believe). The problems is I have to use the
mutex var inside the structure which is copied from/into the shared memory. At
moment the problem is solved by

typedef struct {
doubel um[n];
flag_t inuse;
flag_t valid;
} shm_xx_t;

Thanks  Olaf
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl " | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/




[rtl] wild I/O interface idea

2000-04-26 Thread Doug Fortune

Regarding the previous ISA/PCI/USB/ethernet etc
conversations on how to get signals out to/from the real world
in a timely manner for steppers and servos.

The problem with ISA is that it is constrained to
operate on an 8MHz cycle.  I believe the accesses to the
parallel port and system timers (for RT-Linux) also
must pass over this bus.

Once upon a time I built an analog/digital converter
for an Atari/ST and it did its I/O through the cartridge
game port - essentially memory mapped I/O at memory access speeds.

I am thinking of a card, which to the computer looks like a
SDRAM memory stick, but which actually is not memory,
but otherwise provides three basic functions:

#1 - provides a few 32 and 64 bit timers/counters.  These are
  set up and read just by memory reads and writes to specific
  locations.
#2 - provides latched outputs to the real world (ie computer
 writes 32 bits to a memory address, and those are latched)
#3 - provides latched inputs to the computer (ie something
external writes and strobes bits into a latch, and the CPU
can read those bits just by reading a memory address).


#1 would assist RT-Linux in quickly setting up timers (I haven't
quite figured out how to do an interrupt, but perhaps cause a
false memory parity error, which could be trapped and intercepted).

#2 and #3 would give us all the I/O bits we needed.

Most modern (Pentium) computers have 3 or 4 SDRAM memory
sockets.  It would be easy to dedicate one socket for this function.

It seems much simpler than designing dedicated PCI cards, writing
drivers etc.  Also it would have a very wide variety of applications
for fast data I/O.

Sleeper, or just too crazy?

Doug Fortune



-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl " | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/




[rtl] rt_sem_wait_if

2000-04-26 Thread Charles André



Hi!
 
I try to use rt_sem_wait_if (rtai 
2.07)
 
What is the value returned when the sem's count is 
0 ?
The returned value seems to be 0 (the same value as 
when the count is not 0).
 
How to tell one thing from the other?
 
trysemwait returns -AGAIN when the count is 
0.
Why rt_sem_wait_if does not adopt this 
behavior?
 
Help appreciated.
 
Thanks
 
 
 
Charles AndréLaboratoire I3SLes Algorithmes 
Bât Euclide B2000 Rue des LuciolesBP 12106903 Sophia Antipolis 
CédexTél (33) 4 92 94 27 40Fax (33) 4 92 94 28 
96


Re: [rtl] RTLinux and RTimage processing

2000-04-26 Thread David Schleef

On Wed, Apr 26, 2000 at 12:51:56PM +0200, Cedric Hyppolite wrote:

> PCI CNA AT-MIO-16-XE-50


Is supported.  See http://stm.lbl.gov/comedi




dave...

-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl " | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/




Re: [rtl] DMA affecting RTLinux

2000-04-26 Thread yodaiken

On Wed, Apr 26, 2000 at 11:53:36AM -0700, Steve Rosenbluth wrote:
> IDE hard drives use DMA heavily at times.  What is the effect of DMA on
> RTLinux interrupts handlers and periodic processes. Can DMA prevent
> interrupts from happening at a hardware level, causing increased RT
> latencies and jitter ?

DMA can increase latencies and jitter. One (weak) solution is to set the PCI delays
on the bus low.

> 
> -- Steve Rosenbluth
> 
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> echo "unsubscribe rtl " | mail [EMAIL PROTECTED]
> ---
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/rtlinux/

-- 
-
Victor Yodaiken 
FSMLabs:  www.fsmlabs.com  www.rtlinux.com
FSMLabs is a servicemark and a service of 
VJY Associates L.L.C, New Mexico.

-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl " | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/




[rtl] DMA affecting RTLinux

2000-04-26 Thread Steve Rosenbluth

IDE hard drives use DMA heavily at times.  What is the effect of DMA on
RTLinux interrupts handlers and periodic processes. Can DMA prevent
interrupts from happening at a hardware level, causing increased RT
latencies and jitter ?

-- Steve Rosenbluth

-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl " | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/




[rtl] RT USB driver

2000-04-26 Thread Georg Hülble-Königsberger

Hello,

I am looking for a USB driver for RTL. I would be grateful to get a
usefull hint.

Yours sincerly,
Georg Hülble-Königsberger
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl " | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/




Re: [rtl] RTL_THREAD_DELAYED

2000-04-26 Thread yodaiken

On Wed, Apr 26, 2000 at 10:52:22AM +0200, [EMAIL PROTECTED] wrote:
> 
> I found that state RTL_THREAD_DELAYED used differently in V1 and V2.
> Compatibility routine rt_task_make_periodic() changes task state to
> RTL_THREAD_DELAYED but pthread_make_periodic_np() does not.
> 
> Why?


This is purely for compatibility as pthread_make_periodic makes no promises about
state but rtl_make_periodic did.


> 
> Gabor
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> echo "unsubscribe rtl " | mail [EMAIL PROTECTED]
> ---
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/rtlinux/

-- 
-
Victor Yodaiken 
FSMLabs:  www.fsmlabs.com  www.rtlinux.com
FSMLabs is a servicemark and a service of 
VJY Associates L.L.C, New Mexico.

-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl " | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/




Re: [rtl] Realtime Graphics Application

2000-04-26 Thread James A Simmons


> As an alternative to X (which is a complex beast not at all written for real
> time video), you could check out svgalib. 

Our you using fbdev? In this case libsvga will not work with fbdev. The
best library to use with fbdev is libGGI or directly program /dev/fb
yourself. Also in the newest 2.3.X kernels certain fbdev driver support
VBL.

"Look its a text editor, no its a OS, no its Emacs"
James Simmons  (o_
fbdev/gfx developer  (o_  (o_ //\
http://www.linux-fbdev.org  (/)_ (/)_ V_/_
http://linuxgfx.sourceforge.net

-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl " | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/




[rtl] RTLinux and RTimage processing

2000-04-26 Thread Cedric Hyppolite

I am writing a prog for a solar following system and
i wonder if i can use RTlinux

The experience proceed as follow
we grab an image every secondes and process it to find the center.
after the delay is finished we ask for the center even if the image is
not completely processed:
(the algo used converge to the center so more time more precision)
the position is commicated via serial port to motor controller...

The questions are "Is RTLinux necessary in this case?" "Does it support
the hardware ?"
hard : grabber dt3155, and PCI CNA AT-MIO-16-XE-50


Cedric Hyppolite

PS: This application is for a student project (with a deadline) so if the use of 
RTLinux make the whole

thing too much complex...

Microsoft : Sampling noise at 44kHz and selling it to the world.



-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl " | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/




[rtl] RTL_THREAD_DELAYED

2000-04-26 Thread kissg


I found that state RTL_THREAD_DELAYED used differently in V1 and V2.
Compatibility routine rt_task_make_periodic() changes task state to
RTL_THREAD_DELAYED but pthread_make_periodic_np() does not.

Why?

Gabor
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl " | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/




Re: [rtl] Compiling a module using G++

2000-04-26 Thread Tobias Klotz

Got it...

The solution to the problem seems to be like this:
- take all the tips written earlier in this list (see attached example
from Richard Prescott, slightly modified)
- TAKE OUT THE -O2 OPTION FROM THE rtl.mk FILE!

thats it?! (ok, more problems coming up i think...)

thanks for all the tips!

tobias



Tobias Klotz schrieb:

> Hello again...
>
> I have a problem compiling a module using g++. here is a (very stupid)
> example:
>
> extern "C"
> {
> #define NULL 0
> #define new _new
> #include 
> #undef new
> }
>
> #include 
>
> int init_module (void)
> {
>   // nothing (just a compiler test!)
> }
>
> void cleanup_module (void)
> {
>   // nothing
> }
>
> trying to compile this module brings up no problems, i get a correct .o
> file. The problem comes up when trying to insert this module using
> insmod. The erorr mesage is:
> mod_test.o: couldn't find the kernel version the module was compiled for
>
> what have I done wrong?!
>
> thanks!
>
> tobias
>
> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> echo "unsubscribe rtl " | mail [EMAIL PROTECTED]
> ---
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/rtlinux/




Re: [rtl] shared memory

2000-04-26 Thread Paolo Mantegazza

daniel sheltraw wrote:
> 
> Hello RTLers
> 
> I have heard about shared memory using mbuff. Can anyone who is using
> mbuff under RTAI point me in the direction of useful docs for installation
> and use of mbuff under RTAI?
> 
> Thanks,
> Daniel
> 

You do not need mbuff in RTAI, just use RTAI shared memory, and you get
the same result.

Ciao, Paolo.
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl " | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/