<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7638.1">
<TITLE>Setting the stack size of thread has no effect under WINCE</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">ACE VERSION: 5.5</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">HOST MACHINE and OPERATING SYSTEM:x86 Win2K</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">TARGET MACHINE and OPERATING SYSTEM, if different from HOST: PPC 2003 - wince 4.2 </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">COMPILER NAME AND VERSION (AND PATCHLEVEL): vs 2005</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">CONTENTS OF $ACE_ROOT/ace/config.h: </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">#include &quot;ace/config-win32.h&quot;</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">AREA/CLASS/EXAMPLE AFFECTED: threads</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">DOES THE PROBLEM AFFECT:</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">COMPILATION? no</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">LINKING? no</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">EXECUTION? yes </FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">OTHER (please specify)? N/A</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">SYNOPSIS:</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">Setting the stack size under WINCE has no effect.</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">DESCRIPTION:</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">The CreateThread function of wince accept stack size as the first argument. But this parameter is ignored unless the flags parameter contains the flag STACK_SIZE_PARAM_IS_A_RESERVATION.</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">The problem is that the call CreateThread in ACE (inside ACE_BEGINTHREADEX) changes the flags like this: (FLAGS) &amp; CREATE_SUSPENDED. And so the stack size has no affect.</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">I think that the motivation behind this was to disable other flags that WINCE does not accept (it actually accept only those two parameters).</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">The solution is to add the other flag to the mask.</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">REPEAT BY:</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">n/a</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">SAMPLE FIX/WORKAROUND:</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">n/a</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">Thanks,</FONT></SPAN></P>

<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">Ariel</FONT></SPAN></P>
<BR>


<DIV><STRONG><FONT color=#000080 size=2></FONT></STRONG>&nbsp;</DIV>
<DIV align=left><STRONG><FONT color=#000080 size=2>This e-mail message has been 
sent by Elbit Systems Ltd. </FONT></STRONG></DIV>
<DIV align=left><STRONG><FONT color=#000080 size=2>and is for the use of the 
intended recipients only.<BR>The message may contain&nbsp;privileged or 
commercially&nbsp;sensitive information .<BR>If you are not the intended 
recipient you are hereby notified that any use,<BR>distribution or copying of 
this communication is strictly prohibited,<BR>and you are requested to delete 
the e-mail and any attachments</FONT></STRONG></DIV>
<DIV align=left><STRONG><FONT color=#000080 size=2>and notify the sender 
immediately.</FONT></STRONG></DIV>
</BODY>
</HTML>