Bonjour,

Ma nouvelle adresse émail est [EMAIL PROTECTED]  Merci de  mettre à jour votre 
carnet d'adresse.

Bonne réception.

>>> "[EMAIL PROTECTED]" 11/07/02 21h33 >>>

Bonjour,

Ma nouvelle adresse émail est [EMAIL PROTECTED]  Merci de  mettre à jour votre 
carnet d'adresse.

Bonne réception.

>>> "[EMAIL PROTECTED]" 11/07/02 20h24 >>>

Bonjour,

Ma nouvelle adresse émail est [EMAIL PROTECTED]  Merci de  mettre à jour votre 
carnet d'adresse.

Bonne réception.

>>> "[EMAIL PROTECTED]" 11/07/02 19h17 >>>

Bonjour,

Ma nouvelle adresse émail est [EMAIL PROTECTED]  Merci de  mettre à jour votre 
carnet d'adresse.

Bonne réception.

>>> "[EMAIL PROTECTED]" 11/07/02 18h37 >>>

There are two ways to address it.

Approach 1:
~~~~~~~~~~~
Use one more shared memory location in which, Whenever you are going to
access you write a value and after finishing the writing you make the
location zero. This way you monitor the location before accessing and if it
is zero the you start using the memory by writing some value in that common
memory.

Pros:
~~~~~
        This is very simple to implement.

Cons:
~~~~~
        The processor will be occupied unnecessarily because of polling this
location.

Approach 2:
~~~~~~~~~~~
Create a two way FIFO in rtlinux and use it for synchronizing. For example
when ever the rtlinux portion is going to use the memory let it wait on
reading the FIFO, if FIFO is empty then it shows that the user space is
using it.  If it is not empty then the memory space is free for your use.
Vice versa will be for user space.
Actually whenever you are going to use the memory space first you should
check your read FIFO if it is having any value you start accessing the
memory. Once you finish the accessing you write some value to your write
FIFO. Do the same for both sides. This is applicable only when you have a
blocking FIFO.

Pros:
~~~~~
        This way you can reduce the processor occupancy.
Cons:
~~~~~
        You are dangerously clubbing the real-time with a non real-time portion, so
assuming the non real-time is dead for whatever the reason after occupying
the memory, then your real-time portion will never get an opportunity to
access the memory. Of course, you can eliminate this with a time out.
        This may bring in an inversion in priority.


Regards
RD

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Baskan Kalezade
Sent: Thursday, July 11, 2002 07:46 P
To: [EMAIL PROTECTED]
Subject: [rtl] Mutual Exclusion of Mbuff Shared Area..?



        I am in trouble trying to share a large structure (with lots of
pointers in the structure to some other variables) between rtlinux and
regular linux. When I try to allocate just one memory location (with
mbuff_alloc) for the main structure name, I got segmantation errors. So I
allocated memory areas for EACH POINTER variables in the
structure and now it seems to work fine.(Is it really fine?). Assuming
allocation is okey, now I want to avoid any collisions forexample
if rtlinux write the shared area when regular linux is using it.

Does any one know how to achive mutual exclusion of Mbuff shared memory
area between rtlinux and regular linux?

Is there any example of using mutex for the shared memory area?

Is it easier/logical/possible to use fifo to achive mutual exclusion?

{b}

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

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


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


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


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


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

Reply via email to