<div>Hi Joel,</div>
<div> </div>
<div>I wrote several mails to you but got no reply for quite a few days. I guess there must be sth. wrong. Maybe, my mails were recognized as spams, so I try adding rtems-users...<br> </div>
<div><span class="gmail_quote">On 7/26/08, <b class="gmail_sendername">Wei Shen</b> <<a href="mailto:cquark@gmail.com">cquark@gmail.com</a>> wrote:</span></div>
<div><span class="gmail_quote"></span> </div>
<div>
<div>Thanks for the quick reply.</div>
<div> </div>
<div><span class="gmail_quote">On 7/25/08, <b class="gmail_sendername">Joel Sherrill</b> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:joel.sherrill@oarcorp.com" target="_blank">joel.sherrill@oarcorp.com</a>> wrote:</span></div>

<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">1. POSIX says when pipe IO can be interrupted by signals. I remember we think it is better to make FIFO/pipe independant of POSIX API.<br>
</blockquote></span>What is your blocking mechanism in the pipe code? <br>When blocking in RTEMS, you can specify an extra state bit<br>STATES_INTERRUPTIBLE_BY_SIGNAL.  So you can be blocking<br>on a mutex and that particular mutex API implementation may be<br>
written to set the STATES_INTERRUPTIBLE_BY_SIGNAL bit.<br>When a signal occurs, that bit is checked.</blockquote>
<div> </div>
<div>I use semaphore and barrier. I just want barrier_wait to be interruptible, but semaphore not.</div>
<div>I do not quite understand what you mean. I do not find such interfaces in barrier implementation. Do you mean I just need to set STATES_INTERRUPTIBLE_BY_SIGNAL before barrier_wait and clear it after; or barrier need hooking to check the state bit?</div>

<div> </div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">3. For anonymous pipes, it is easier to implement them as FIFOs with arbitrary names. So what kind of paths is prefered for pipes? </blockquote>
</span></blockquote>
<div> </div>
<div>Maybe, sth. like: /tmp/.pipe#id, where id is a 32bit integer?</div>
<div> </div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">BTW, I also found IMFS_memfile_write does not strictly follow POSIX in that, it updates file ATime and MTime, while POSIX requires file write to update MTime and CTime.<br>
 <br></blockquote></span>Can you submit a patch and pointer to <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://opengroup.org/" target="_blank">opengroup.org</a>?</blockquote>
<div> </div>
<div><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.opengroup.org/onlinepubs/009695399/functions/write.html" target="_blank">http://www.opengroup.org/onlinepubs/009695399/functions/write.html</a></div>

<div>"Upon successful completion, where <i>nbyte</i> is greater than 0, <i>write</i>() shall mark for update the <i>st_ctime</i> and <i>st_mtime</i> fields of the file, and if the file is a regular file, the S_ISUID and S_ISGID bits of the file mode may be cleared."</div>

<div>(I have not checked the last sentence)</div>
<div> </div>
<div>--- imfs.h.new  2008-07-25 14:20:27.000000000 -0700<br>+++ imfs.h      2008-07-09 23:03:51.000000000 -0700<br>@@ -196,12 +196,12 @@<br>     _jnode->stat_ctime  = (time_t) tv.tv_sec; \<br>   } while (0)</div>
<div>
<p>-#define IMFS_mtime_ctime_update( _jnode )   \<br>+#define IMFS_atime_mtime_update( _jnode )   \<br>   do {                                      \<br>     struct timeval tv;                      \<br>     gettimeofday( &tv, 0 );                 \<br>
     _jnode->stat_mtime  = (time_t) tv.tv_sec; \<br>-    _jnode->stat_ctime  = (time_t) tv.tv_sec; \<br>+    _jnode->stat_atime  = (time_t) tv.tv_sec; \<br>   } while (0)</p></div>
<p>--- memfile.c.new       2008-07-25 14:19:38.000000000 -0700<br>+++ memfile.c   2008-07-02 18:37:38.000000000 -0700<br>@@ -844,7 +844,7 @@<br>     copied += to_copy;<br>   }</p>
<p>-  IMFS_mtime_ctime_update( the_jnode );<br>+  IMFS_atime_mtime_update( the_jnode );</p>
<p>   return copied;<br> }</p></div>