From: Stanislav Ievlev <inger@altlinux.org>
Subject: segfault in 1.7.91
Date: Fri, 17 Feb 2006 14:18:24 +0300 [thread overview]
Message-ID: <20060217111824.GA13802@basalt.office.altlinux.org> (raw)
Greetings!
It is unable to call callback from thread in guile extension.
module:
--
#include <libguile.h>
#include <pthread.h>
pthread_t dbus_tid;
void *start_test(void* user_data)
{
scm_call_0((void*)(user_data));
}
SCM scm_test_thread(SCM arg)
{
pthread_create(&dbus_tid,NULL,start_test,arg);
}
void scm_init_test(void)
{
scm_c_define_gsubr("test-thread", 1, 0, 0,(SCM(*)())scm_test_thread);
}
--
testcase:
--
(dynamic-call "scm_init_test" (dynamic-link "libguile-thread.so"))
(define cb (lambda() (write "zzz!\n")))
(test-thread cb)
(pause)
--
how to reproduce:
$gcc -fpic -lpthread dbus.c -shared -o lguile-thread.so
---
guile
guile> (dynamic-call "scm_init_test" (dynamic-link "libguile-thread.so"))
guile> (define cb (lambda() (write "zzz!\n")))
guile> (test-thread cb)
Segmentation fault
--
With best regards
Stanislav Ievlev.
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
next reply other threads:[~2006-02-17 11:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-17 11:18 Stanislav Ievlev [this message]
2006-02-18 16:51 ` segfault in 1.7.91 Ken Raeburn
2006-02-20 9:00 ` Stanislav Ievlev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060217111824.GA13802@basalt.office.altlinux.org \
--to=inger@altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).