Re[2]: [Gc] GC_INIT? Threads?

Ivan Maidanski <ivmai-JGs/[email protected]>
Newsgroups gmane.comp.programming.garbage-collection.boehmgc
Message-ID <[email protected]>
 Hi Devis,


Wed,  2 Oct 2013, 20:02 -05:00 from The Devils Jester <[email protected]>:
>Not to resurrect this topic (the original question was answered) but the same solution in a related application (if I create a thread with std::thread) does not return success with GC_register_my_thread. Is the GC automatically registering std threads?  May be. It depends on configuration and platform.

> Is there any way to check?   /* Return non-zero (TRUE) if and only if the calling thread is        */
  /* registered with the garbage collector.                             */
  GC_API int GC_CALL GC_thread_is_registered(void);

> Would that cause said function to fail? gc.h:
#define GC_SUCCESS 0
#define GC_DUPLICATE 1          /* Was already registered.              */
#define GC_UNIMPLEMENTED 3 /* Not yet implemented on this platform.     */

Regards,
Ivan

>
>On Tue, Aug 20, 2013 at 8:06 PM, The Devils Jester  < [email protected] > wrote:
>>@Bruce, I do not know why I had a pointer instead of a reference there, changing that fixed the whole issue and the GC seems to be ok with the new thread and all appears to work fine.  Thank you for your suggestions and eagle eye.
>>
>>@Hans, unfortunately I do not have access to the lower level thread creation in this situation as I go through a third party library.  Fortunately it was a simple mistake and Bruce's suggestions worked well, so I didn't have to manually manage/create the thread.
>_______________________________________________
>Gc mailing list
>[email protected]
>http://www.hpl.hp.com/hosted/linux/mail-archives/gc/


-- 
Иван Майданский
#define GC_SUCCESS 0
#define GC_DUPLICATE 1          /* Was already registered.              */
#define GC_NO_THREADS 2         /* No thread support in GC.             */
        /* GC_NO_THREADS is not returned by any GC function anymore.    */
#define GC_UNIMPLEMENTED 3 /* Not yet implemented on this platform.     */

_______________________________________________
Gc mailing list
Gc-V9/[email protected]
http://www.hpl.hp.com/hosted/linux/mail-archives/gc/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.