Message-ID: Date: Wed, 18 Jan 2006 22:58:09 +0100 From: Jeroen Van den Keybus Subject: Re: [Xenomai-help] blocked or not blocked call on snippet/shared_mem.c? In-Reply-To: <200601181903.27928.lbocseg@domain.hid> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5850_19394583.1137621489501" References: <200601181903.27928.lbocseg@domain.hid> List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Rodrigo Rosenfeld Rosas Cc: xenomai@xenomai.org ------=_Part_5850_19394583.1137621489501 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline > > I'm confused. Did you really mean TM_NONBLOCK? > Am I missing something? I think you have to read it like this: Bind to a shared heap which has been created elsewhere, either in kernel or user-space. The call will block us until such heap is created with the expected name. Therefore (because we do not want (and are probably unable to, see below)), we supply TM_NONBLOCK. The heap should have been created with the H_SHARED mode set, which is implicit when creation takes place in user-space. Additionally, I think the process wouldn't even block if requested because it is not a Xenomai thread. Use rt_task_shadow() to promote it. Make sure you have a suitable bailout mechanism if you happen to start waiting indefinitely. Jeroen. ------=_Part_5850_19394583.1137621489501 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
I'm confused. Did you really mea= n TM_NONBLOCK?
Am I missing something?
 
I think you have to read it like this:
 
       Bind to a shared heap which has b= een created elsewhere, either
       in ke= rnel or user-space. The call will block us until such heap
  &= nbsp;    is created with the expected name.
 
       Therefore (because we do not want= (and are probably unable to, see below)), we supply TM_NONBLOCK.
 
       The heap should have been
&nbs= p;      created with the H_SHARED mode set, which = is implicit when
       creation takes pla= ce in user-space.
 
Additionally, I think the process wouldn't even block if requested bec= ause it is not a Xenomai thread. Use rt_task_shadow() to promote it. Make s= ure you have a suitable bailout mechanism if you happen to start waiting in= definitely.
 
 
Jeroen.
 
------=_Part_5850_19394583.1137621489501--