Re: Thread and guile environment

2010-07-17 Thread Andy Wingo
Hi, On Mon 12 Jul 2010 22:24, Linas Vepstas writes: > On 10 July 2010 03:22, Andy Wingo wrote: >> On Fri 09 Jul 2010 22:23, Neil Jerram writes: >>> Andy Wingo writes: >>> Does anyone have any input as to what module should be current when a thread previously unknown to Guile enters G

Re: Thread and guile environment

2010-07-12 Thread Linas Vepstas
Hi, On 10 July 2010 03:22, Andy Wingo wrote: > Hi, > > On Fri 09 Jul 2010 22:23, Neil Jerram writes: > >> Andy Wingo writes: >> >>> Interestingly, the first thread has you in (guile-user), but the second >>> has you in (guile). So you don't see the full definition of format, nor >>> do you see

Re: Thread and guile environment

2010-07-12 Thread Cedric Cellier
This works if I explicitely define a module _and_ export the hug symbol. (define-module (bug)) (export hug) (use-modules (ice-9 format)) (define (hug x) (format #t "HUG ~a !\n" x)) #include #include #include static void *load_file_with_guile(void *filename) { scm_c_primitive_load((char *)fil

Re: Thread and guile environment

2010-07-10 Thread Andy Wingo
Hi, On Fri 09 Jul 2010 22:23, Neil Jerram writes: > Andy Wingo writes: > >> Interestingly, the first thread has you in (guile-user), but the second >> has you in (guile). So you don't see the full definition of format, nor >> do you see hug. > > That's what I thought too. But in that case I ha

Re: Thread and guile environment

2010-07-09 Thread Neil Jerram
Andy Wingo writes: > On Mon 05 Jul 2010 09:23, ri...@happyleptic.org writes: > >> Suppose I have a multithreaded C program. Isn't the guile environment >> supposed >> to be shared amongst all threads ? That's what I understood from reading the >> docs anyway. >> >> Yet this simple exemple shows

Re: Thread and guile environment

2010-07-09 Thread Andy Wingo
On Fri 09 Jul 2010 17:54, Cedric Cellier writes: > -[ Thu, Jul 08, 2010 at 08:48:33PM +0100, Andy Wingo ] >> Interestingly, the first thread has you in (guile-user), but the second >> has you in (guile). So you don't see the full definition of format, nor >> do you see hug. > > Interresting i

Re: Thread and guile environment

2010-07-09 Thread Cedric Cellier
-[ Thu, Jul 08, 2010 at 08:48:33PM +0100, Andy Wingo ] > Interestingly, the first thread has you in (guile-user), but the second > has you in (guile). So you don't see the full definition of format, nor > do you see hug. Interresting indeed. Is there a definition of these modules and their pur

Re: Thread and guile environment

2010-07-09 Thread Andy Wingo
On Mon 05 Jul 2010 09:23, ri...@happyleptic.org writes: > Suppose I have a multithreaded C program. Isn't the guile environment supposed > to be shared amongst all threads ? That's what I understood from reading the > docs anyway. > > Yet this simple exemple shows the opposite (see the 3 attached

Re: Thread and guile environment

2010-07-07 Thread Cedric Cellier
By the way, I'm using guile v1.8.7(+1-3ubuntu1)

Re: Thread and guile environment

2010-07-06 Thread Cedric Cellier
-[ Mon, Jul 05, 2010 at 08:52:44PM +0100, Neil Jerram ] > ri...@happyleptic.org writes: > Hm. I think I recall a bug to do with different threads starting in > different modules. Does it work if you add > > (define-module (guile-user)) > > at the start of your bug.scm ? Same behavior : ERRO

Re: Thread and guile environment

2010-07-05 Thread Neil Jerram
ri...@happyleptic.org writes: > Suppose I have a multithreaded C program. Isn't the guile environment supposed > to be shared amongst all threads ? That's what I understood from reading the > docs anyway. > > Yet this simple exemple shows the opposite (see the 3 attached files). > So am I supposed

Thread and guile environment

2010-07-05 Thread rixed
Suppose I have a multithreaded C program. Isn't the guile environment supposed to be shared amongst all threads ? That's what I understood from reading the docs anyway. Yet this simple exemple shows the opposite (see the 3 attached files). So am I supposed to source my global scheme definitions in