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

李择一 biosli at hotmail.com
Fri Aug 21 17:55:44 PDT 2009



> And the value is -2, right? UNDER_CE is defined, right?
> 
> Is GetCurrentThread() defined as (look into pre-processor output):
> _inline HANDLE GetCurrentThread(void) {
> return ((HANDLE)(SH_CURTHREAD+SYS_HANDLE_BASE));
> }
> 
> If the answer is yes (for all) then the things are bad - there's no way to get current thread handle (so GC_register_my_thread will not work, and we can never suspend the main thread and ger its context).

 

The value is 0x000000041, it returned by the function GetCurrentThread in kfuncs.h.


> 
> > 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),
> 
> I saw this too. Could you explain "And it did pass"? We have the same solution.

 

Sorry, I really mean is "it seems like it could run".


> 
> > 
> > Could you pls share you thoughts?
> > 
> > Best wishes,
> > GC Beginner
> > Zeyi Lee
> 


_________________________________________________________________
与任何您希望的人分享您的回忆。
http://www.microsoft.com/china/windows/windowslive/products/photos-share.aspx?tab=1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://napali.hpl.hp.com/pipermail/gc/attachments/20090822/6a82f8a0/attachment.htm


More information about the Gc mailing list