[Gc] RE: GC + Windows Mobile + Threads + Patch for WINCE

李择一 biosli at hotmail.com
Fri Aug 21 03:51:16 PDT 2009


Ivan Maidanski <ivmai at ...> writes:
>> I see NO functions in WinCE 5.0 can duplicate handles returned by CreateThread.
>> Could I change the code like this:
>> +#ifdef UNDER_CE
>> + /* DuplicateHandle does not exist on WinCE */
>> + me -> handle = GetCurrentThread();
>>+#else
>> + if (!DuplicateHandle(GetCurrentProcess(),
>> + GetCurrentThread(),
>> +#endif
>Yes, this sounds more correct for WinCE UNDER_CE.
>> Could you pls help review it? Great thanks in advance!
>Does it work for you with the above changes?
 
Unfortunately, the function "GetCurrentThread" kept returning the same handles.
As the program ran and entered the function GC_stop_world, it said as below:
-------------win32_threads.c------line: 867----à
      for (i = 0; i < THREAD_TABLE_SZ; i++) {
        for (t = GC_threads[i]; t != 0; t = t -> next) {
          if (t -> stack_base != 0
              && !KNOWN_FINISHED(t)
              && t -> id != thread_id) 
{
                GC_suspend(t); 
            }//if
        } //for
    }//for
GC_suspend suspend the main thread…
Last night I saw a link with the same question as below. And it did pass.
(http://mirror.facebook.net/sourceware/pthreads-win32/prebuilt-dll-2-5-0-release/WinCE-PORT),
 
Could you pls share you thoughts?
 
Best wishes,
GC Beginner
Zeyi Lee
 


 

_________________________________________________________________
您可以借助 Windows Live 整理、编辑和共享您的照片。
http://www.microsoft.com/china/windows/windowslive/products/photo-gallery-edit.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://napali.hpl.hp.com/pipermail/gc/attachments/20090821/5f4acb96/attachment-0001.htm


More information about the Gc mailing list