<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.3268" name=GENERATOR>
<STYLE>@font-face {
        font-family: 宋体;
}
@font-face {
        font-family: Verdana;
}
@font-face {
        font-family: @宋体;
}
@page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; layout-grid: 15.6pt; }
P.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
LI.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
DIV.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        FONT-WEIGHT: normal; COLOR: windowtext; FONT-STYLE: normal; FONT-FAMILY: Verdana; TEXT-DECORATION: none; mso-style-type: personal-compose
}
DIV.Section1 {
        page: Section1
}
UNKNOWN {
        FONT-SIZE: 10pt
}
BLOCKQUOTE {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</STYLE>
</HEAD>
<BODY style="FONT-SIZE: 10pt; FONT-FAMILY: verdana">
<DIV><FONT face=Verdana color=#000080 size=2>I also think so. and I have used a 
rtems_timer_server instead.</FONT></DIV>
<DIV><FONT color=#000080>but it does not work as before.</FONT></DIV>
<DIV><FONT face=Verdana color=#000080 size=2></FONT> </DIV>
<DIV><FONT face=Verdana color=#000080 size=2></FONT> </DIV>
<DIV><FONT face=Verdana color=#c0c0c0 size=2>2008-04-21 </FONT></DIV><FONT 
face=Verdana color=#000080 size=2>
<HR style="WIDTH: 122px; HEIGHT: 2px" align=left SIZE=2>
</FONT>
<DIV><FONT face=Verdana color=#c0c0c0 size=2><SPAN>powerain</SPAN> 
</FONT></DIV><FONT face=Verdana color=#000080 size=2>
<HR>
</FONT>
<DIV><FONT face=Verdana size=2><STRONG>发件人:</STRONG> Daron Chabot </FONT></DIV>
<DIV><FONT face=Verdana size=2><STRONG>发送时间:</STRONG> 2008-04-21  00:10:26 
</FONT></DIV>
<DIV><FONT face=Verdana size=2><STRONG>收件人:</STRONG> powerain </FONT></DIV>
<DIV><FONT face=Verdana size=2><STRONG>抄送:</STRONG> RTEMS Users; 
rayx.cn@gmail.com </FONT></DIV>
<DIV><FONT face=Verdana size=2><STRONG>主题:</STRONG> Re: about send in 
rtems_timer_service_routine </FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>
<DIV>Not having checked send(2) for blocking behavior, this is just a guess:</DIV>
<DIV> </DIV>
<DIV>The function, rtems_timer_service_routine( ), is called from an  </DIV>
<DIV>interrupt context. Code called from an interrupt context *cannot*  </DIV>
<DIV>perform operations that may block waiting for resources (i.e. send(2)).</DIV>
<DIV> </DIV>
<DIV>You could use an rtems_timer_server instead: this server runs in a  </DIV>
<DIV>thread context which has no restrictions on the methods invoked from it.</DIV>
<DIV> </DIV>
<DIV>(see <A 
href="http://www.rtems.com/onlinedocs/releases/rtemsdocs-4.8.0/share/ ">http://www.rtems.com/onlinedocs/releases/rtemsdocs-4.8.0/share/ </A></DIV>
<DIV>rtems/html/c_user/c_user00116.html)</DIV>
<DIV> </DIV>
<DIV>-- dc</DIV>
<DIV> </DIV>
<DIV>On 20-Apr-08, at 2:16 AM, Ray wrote:</DIV>
<DIV>> Dear  powerain ,</DIV>
<DIV>> Maybe you should check this website first</DIV>
<DIV>> <A 
href="http://linuxmafia.com/faq/Essays/smart-questions.html">http://linuxmafia.com/faq/Essays/smart-questions.html</A></DIV>
<DIV>> here is a mandarin version</DIV>
<DIV>> <A 
href="http://www.linuxforum.net/doc/smartq-grand.html">http://www.linuxforum.net/doc/smartq-grand.html</A></DIV>
<DIV>></DIV>
<DIV>> BTW, it seems to me that rtems_timer_service_routine=void if I read  </DIV>
<DIV>> code correct</DIV>
<DIV>></DIV>
<DIV>> Thanks & Best Regards!</DIV>
<DIV>></DIV>
<DIV>> Ray, rayx.cn@gmail.com</DIV>
<DIV>> 2008-04-20</DIV>
<DIV>></DIV>
<DIV>></DIV>
<DIV>> =========================</DIV>
<DIV>> ----- Receiving the following content -----</DIV>
<DIV>> =========================</DIV>
<DIV>> From:  powerain</DIV>
<DIV>> Receiver:  rtems-users</DIV>
<DIV>> Time: 2008-04-20, 09:25:20</DIV>
<DIV>> Subject: about send in rtems_timer_service_routine</DIV>
<DIV>></DIV>
<DIV>></DIV>
<DIV>></DIV>
<DIV>></DIV>
<DIV>> > hi everyone,</DIV>
<DIV>> 
> i send a package in a rtems_timer_service_routine using send  </DIV>
<DIV>> > function by a socket.</DIV>
<DIV>> > but is does not work.</DIV>
<DIV>> > who tell me why.</DIV>
<DIV>> > thanks very much.</DIV>
<DIV>> ></DIV>
<DIV>> > 2008-04-20</DIV>
<DIV>> ></DIV>
<DIV>> ></DIV>
<DIV>> 
> _____________________ next part ______________________</DIV>
<DIV>> ></DIV>
<DIV>> > _______________________________________________</DIV>
<DIV>> > rtems-users mailing list</DIV>
<DIV>> > rtems-users@rtems.com</DIV>
<DIV>> > <A 
href="http://rtems.rtems.org/mailman/listinfo/rtems-users">http://rtems.rtems.org/mailman/listinfo/rtems-users</A></DIV>
<DIV>> ></DIV>
<DIV>> _______________________________________________</DIV>
<DIV>> rtems-users mailing list</DIV>
<DIV>> rtems-users@rtems.com</DIV>
<DIV>> <A 
href="http://rtems.rtems.org/mailman/listinfo/rtems-users">http://rtems.rtems.org/mailman/listinfo/rtems-users</A></DIV>
<DIV> </DIV></FONT></DIV></BODY></HTML>