RE: [Mono-list] Re: Embedded Mono with native threads

2005-09-02 Thread Alexey Tsynaev
 Paolo,

I have patched mono 1.1.8.3, but it does not work for me
I still get message include gc.h.

Any ideas?

 
 Then you are responsible for calling mono_thread_attach() yourself.
 Anyway, the patch I posted should solve your issue as well:
 care to try it out?
 

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


RE: [Mono-list] Re: Embedded Mono with native threads

2005-08-26 Thread Alexey Tsynaev

 On 08/25/05 Alexey Tsynaev wrote:
  But actually I don't invoke any unmanaged code from c# code

  Host application creates thread where function from my 
 plugin is called.
  In this function I just get MonoMethod and execute it by
  mono_runtime_invoke.
  That is all.
 
 Then you are responsible for calling mono_thread_attach() yourself.
 Anyway, the patch I posted should solve your issue as well:
 care to try it out?
 

I'm calling mono_thread_attach() in plugin's function before executing
managed code.
Where I can get your patch?


___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


RE: [Mono-list] Re: Embedded Mono with native threads

2005-08-25 Thread Alexey Tsynaev
But actually I don't invoke any unmanaged code from c# code
How your advice can be used in my situation?

Host application creates thread where function from my plugin is called.
In this function I just get MonoMethod and execute it by
mono_runtime_invoke.
That is all.

  I have implemented plugin for third-party program.
  In init function I have created deamon and open assembly.
  Then host program start one of plugin's functions which 
 invoke assembly
  method.
  
  In single thread mode it works fine.
  But in multi-thread mode I get error message during call
  mono_thread_attach() in plugin's function
  
  ** ERROR **: Thread 0x409 calling into managed code is not 
 registered with
  the GC. On UNIX, this can be fixed by #i
  nclude-ing gc.h before pthread.h in the file containing 
 the thread
  creation code. 
  
  Unfortunately, I can't add this include to third-party code.
  Is there any other solution to start it work ?
 
 Follow this thread
 
 http://lists.ximian.com/pipermail/mono-list/2005-August/028129.html
 
 Rob
 

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Re: Embedded Mono with native threads

2005-08-25 Thread Alexey Tsynaev
But actually I don't invoke any unmanaged code from c# code
How your advice can be used in my situation?

Host application creates thread where function from my plugin is called.
In this function I just get MonoMethod and execute it by
mono_runtime_invoke.
That is all.

  I have implemented plugin for third-party program.
  In init function I have created deamon and open assembly.
  Then host program start one of plugin's functions which 
 invoke assembly
  method.
  
  In single thread mode it works fine.
  But in multi-thread mode I get error message during call
  mono_thread_attach() in plugin's function
  
  ** ERROR **: Thread 0x409 calling into managed code is not 
 registered with
  the GC. On UNIX, this can be fixed by #i
  nclude-ing gc.h before pthread.h in the file containing 
 the thread
  creation code. 
  
  Unfortunately, I can't add this include to third-party code.
  Is there any other solution to start it work ?
 
 Follow this thread
 
 http://lists.ximian.com/pipermail/mono-list/2005-August/028129.html
 
 Rob
 

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Embedded Mono with native threads

2005-08-24 Thread Alexey Tsynaev
I have implemented plugin for third-party program.
In init function I have created deamon and open assembly.
Then host program start one of plugin's functions which invoke assembly
method.

In single thread mode it works fine.
But in multi-thread mode I get error message during call
mono_thread_attach() in plugin's function

** ERROR **: Thread 0x409 calling into managed code is not registered with
the GC. On UNIX, this can be fixed by #i
nclude-ing gc.h before pthread.h in the file containing the thread
creation code. 

Unfortunately, I can't add this include to third-party code.
Is there any other solution to start it work ?



___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list