chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Understanding -block optimization


From: Jörg F . Wittenberger
Subject: [Chicken-users] Understanding -block optimization
Date: 24 Mar 2013 20:29:02 +0100

Trying to use -block optimization fails for me badly.

I have a module, which is very simple - Scheme wise.
It's an interface to offload C-call to pthreads (code here:
http://lists.nongnu.org/archive/html/chicken-users/2010-01/msg00046.html
).

For it's simplicity I picked that one to try the -block optimization.

However the resulting binary fails in a strange way. During the startup
the pthreads module is properly initializsed:

[debug] entering toplevel pool_toplevel...
pthreads.scm:339: g2074
pthreads.scm:341: atomic#set-open-fd!
pthreads.scm:344: thread-wait-for-i/o!

however after all inits are done, I see this:

Error: (semaphore-mutex) bad argument type - not a structure of the required type #<unbound value> <semaphore>

        Call history:

pthreads.scm:294: g2051 pthreads.scm:338: make-thread pthreads.scm:337: thread-start!

Strange enough, the pthreads module does not at all use the internal
structure of the semaphore at all.
And the same itself is just a normal define-record-type thing.


If I remove the -block switch and recompile pthread.scm all is fine.
Add it back and it breaks again.


So what exactly does -block handle different that -O3 ?


Thanks for any hint!

/Jörg


........









reply via email to

[Prev in Thread] Current Thread [Next in Thread]