Commit 5dfc3668 authored by Erick Gallesio's avatar Erick Gallesio

Code Factorization of STk_error and STk_make_error

Changed the MYCFLAGS to STKCFLAGS in configure 
parent 25a77bcb
2006-04-21 separdau <separdau@localhost>
* src/thread-pthreads.c:
Fix a bug I think, since a thread_obj is always == to its
vm->scheme_thread field.
[6c653e49de75] [tip]
* src/mutex-lurc.c:
And the same dull insane-driving error handling in mutex-lurc
[524410e6f0aa]
* src/boot.c, src/error.c, src/mutex-common.c, src/mutex-common.h,
* src/mutex-lurc.c, src/mutex-lurc.h, src/mutex-pthreads.c,
* src/mutex-pthreads.h, src/stklos.h, src/thread-common.c,
* src/thread-common.h, src/thread-lurc.c, src/thread-lurc.h,
* src/thread-pthreads.c, src/thread-pthreads.h, src/error.c:
added a function to create an error like STk_error but
without raising it (it returns it). There is a lot of code
duplication but I didn't know how to use it from STk_error because
of the ... argument.
* all_threads: renamed _specific to sys_(sys_thread,sys_mutex,sys_condv)
for code and data which are specific to a thread system.
The _specific was confusing with TLS specific.
* all_lurc_thread: deal in the best way possible with lurc
errors.
[40024c22c956]
2006-04-20 stephane <stephane@localhost>
* src/vm.c: put in common the common files and code of thread and
mutex
* str.c: fix a compile warning about LONG_MIN not fitting in int variable
* strklos.h: made EXTERN_PRIMITIVE actually declare the primitive
extern, and also declare its associated primitive_obj as extern.
* vm.c: fix (??) REG_CALL_PRIM which was doing some real wrong stuff I
have no idead why it worked, and if it did work, no idea why it
still works after my fix...
[7db9abfc564b]
2006-04-18 separdau <separdau@localhost>
* configure.in: removed REENTRANT and GC_LINUX_THREADS for Lurc, I'm
still not sure this does the right thing, especially when giving it
to the GC we're builing, which should not happen (I think).
* lib/thread.stk: this one got removed (by accident?) and since the
Makefile called it thread.stk (and not thread_S_.stk) I renamed
it... fixme ?
* thread*: remove threads from all_threads when they
terminate, I think it's a good time then, but for the pthreads impl
there are a few mutex and condv destroy missing...
* lurc-*: made threads, mutexes and cond vars accept any SCM obj
as name lurc-
* thread.c: fixed a bug in thread_join for already dead threads now
make test passes !!!
[8c0840e4f538]
2006-04-18 Erick Gallesio <eg@essi.fr>
* Integration of Stef work
* Added a test for thread in test directory
[b4a91d2209a1]
2006-04-15 Erick Gallesio <eg@essi.fr>
* src/vm.c (call-with-values): Fixed bug when no values was
......
......@@ -98,7 +98,6 @@ HAVE_LDAP = @HAVE_LDAP@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@
LURCDIR = @LURCDIR@
MYCFLAGS = @MYCFLAGS@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
PACKAGE = @PACKAGE@
......@@ -115,6 +114,7 @@ SH_LOAD_FLAGS = @SH_LOAD_FLAGS@
SH_MAIN_LOAD_FLAGS = @SH_MAIN_LOAD_FLAGS@
SH_SUFFIX = @SH_SUFFIX@
STACK_DIRECTION = @STACK_DIRECTION@
STKCFLAGS = @STKCFLAGS@
STRIP = @STRIP@
SVN_URL = @SVN_URL@/STklos
THREADS = @THREADS@
......
This diff is collapsed.
......@@ -2,7 +2,7 @@ dnl configure.in for STklos
dnl
dnl Author: Erick Gallesio [eg@unice.fr]
dnl Creation date: 28-Dec-1999 21:19 (eg)
dnl Last file update: 15-Apr-2006 16:57 (eg)
dnl Last file update: 25-Apr-2006 16:45 (eg)
AC_INIT(src/stklos.c)
......@@ -115,7 +115,7 @@ case "$THREADS" in
none) true ;;
lurc) true ;;
*) case `uname -s` in
Linux*) MYCFLAGS="$CFLAGS -D_REENTRANT=1 -DGC_LINUX_THREADS=1";;
Linux*) STKCFLAGS="-D_REENTRANT=1 -DGC_LINUX_THREADS=1";;
esac
esac
......@@ -471,7 +471,7 @@ fi
dnl Output files
AC_SUBST(MYCFLAGS)
AC_SUBST(STKCFLAGS)
AC_SUBST(VERSION)
AC_SUBST(HAVE_DLOPEN)
AC_SUBST(OS_FLAVOUR)
......
......@@ -99,7 +99,6 @@ HAVE_LDAP = @HAVE_LDAP@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@
LURCDIR = @LURCDIR@
MYCFLAGS = @MYCFLAGS@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
PACKAGE = @PACKAGE@
......@@ -116,6 +115,7 @@ SH_LOAD_FLAGS = @SH_LOAD_FLAGS@
SH_MAIN_LOAD_FLAGS = @SH_MAIN_LOAD_FLAGS@
SH_SUFFIX = @SH_SUFFIX@
STACK_DIRECTION = @STACK_DIRECTION@
STKCFLAGS = @STKCFLAGS@
STRIP = @STRIP@
SVN_URL = @SVN_URL@
THREADS = @THREADS@
......@@ -156,7 +156,7 @@ NROFF = nroff
MANS = $(man_MANS)
DATA = $(dochtml_DATA) $(docimg_DATA) $(docpdf_DATA) $(scheme_DATA)
DIST_COMMON = Makefile.am Makefile.in stklos-compile.1.in \
DIST_COMMON = Makefile.am Makefile.in TODO stklos-compile.1.in \
stklos-config.1.in stklos-genlex.1.in stklos-install.1.in \
stklos.1.in
all: all-am
......
......@@ -92,7 +92,6 @@ HAVE_LDAP = @HAVE_LDAP@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@
LURCDIR = @LURCDIR@
MYCFLAGS = @MYCFLAGS@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
PACKAGE = @PACKAGE@
......@@ -109,6 +108,7 @@ SH_LOAD_FLAGS = @SH_LOAD_FLAGS@
SH_MAIN_LOAD_FLAGS = @SH_MAIN_LOAD_FLAGS@
SH_SUFFIX = @SH_SUFFIX@
STACK_DIRECTION = @STACK_DIRECTION@
STKCFLAGS = @STKCFLAGS@
STRIP = @STRIP@
SVN_URL = @SVN_URL@
THREADS = @THREADS@
......
......@@ -92,7 +92,6 @@ HAVE_LDAP = @HAVE_LDAP@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@
LURCDIR = @LURCDIR@
MYCFLAGS = @MYCFLAGS@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
PACKAGE = @PACKAGE@
......@@ -109,6 +108,7 @@ SH_LOAD_FLAGS = @SH_LOAD_FLAGS@
SH_MAIN_LOAD_FLAGS = @SH_MAIN_LOAD_FLAGS@
SH_SUFFIX = @SH_SUFFIX@
STACK_DIRECTION = @STACK_DIRECTION@
STKCFLAGS = @STKCFLAGS@
STRIP = @STRIP@
SVN_URL = @SVN_URL@
THREADS = @THREADS@
......
......@@ -98,7 +98,6 @@ HAVE_LDAP = @HAVE_LDAP@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@
LURCDIR = @LURCDIR@
MYCFLAGS = @MYCFLAGS@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
PACKAGE = @PACKAGE@
......@@ -115,6 +114,7 @@ SH_LOAD_FLAGS = @SH_LOAD_FLAGS@
SH_MAIN_LOAD_FLAGS = @SH_MAIN_LOAD_FLAGS@
SH_SUFFIX = @SH_SUFFIX@
STACK_DIRECTION = @STACK_DIRECTION@
STKCFLAGS = @STKCFLAGS@
STRIP = @STRIP@
SVN_URL = @SVN_URL@
THREADS = @THREADS@
......@@ -154,7 +154,7 @@ LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES =
DATA = $(scheme_DATA)
DIST_COMMON = README Makefile.am Makefile.in extconf.h.in
DIST_COMMON = README Makefile.am Makefile.in TODO extconf.h.in
all: all-am
.SUFFIXES:
......
......@@ -99,7 +99,6 @@ HAVE_LDAP = @HAVE_LDAP@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@
LURCDIR = @LURCDIR@
MYCFLAGS = @MYCFLAGS@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
PACKAGE = @PACKAGE@
......@@ -116,6 +115,7 @@ SH_LOAD_FLAGS = @SH_LOAD_FLAGS@
SH_MAIN_LOAD_FLAGS = @SH_MAIN_LOAD_FLAGS@
SH_SUFFIX = @SH_SUFFIX@
STACK_DIRECTION = @STACK_DIRECTION@
STKCFLAGS = @STKCFLAGS@
STRIP = @STRIP@
SVN_URL = @SVN_URL@
THREADS = @THREADS@
......@@ -187,7 +187,7 @@ LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES = $(libgtklos_a_SOURCES)
DATA = $(scheme_DATA)
DIST_COMMON = Makefile.am Makefile.in gtklosconf.h.in
DIST_COMMON = Makefile.am Makefile.in TODO gtklosconf.h.in
SOURCES = $(libgtklos_a_SOURCES)
all: all-am
......
......@@ -98,7 +98,6 @@ HAVE_LDAP = @HAVE_LDAP@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@
LURCDIR = @LURCDIR@
MYCFLAGS = @MYCFLAGS@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
PACKAGE = @PACKAGE@
......@@ -115,6 +114,7 @@ SH_LOAD_FLAGS = @SH_LOAD_FLAGS@
SH_MAIN_LOAD_FLAGS = @SH_MAIN_LOAD_FLAGS@
SH_SUFFIX = @SH_SUFFIX@
STACK_DIRECTION = @STACK_DIRECTION@
STKCFLAGS = @STKCFLAGS@
STRIP = @STRIP@
SVN_URL = @SVN_URL@
THREADS = @THREADS@
......
......@@ -99,7 +99,6 @@ HAVE_LDAP = @HAVE_LDAP@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@
LURCDIR = @LURCDIR@
MYCFLAGS = @MYCFLAGS@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
PACKAGE = @PACKAGE@
......@@ -116,6 +115,7 @@ SH_LOAD_FLAGS = @SH_LOAD_FLAGS@
SH_MAIN_LOAD_FLAGS = @SH_MAIN_LOAD_FLAGS@
SH_SUFFIX = @SH_SUFFIX@
STACK_DIRECTION = @STACK_DIRECTION@
STKCFLAGS = @STKCFLAGS@
STRIP = @STRIP@
SVN_URL = @SVN_URL@
THREADS = @THREADS@
......
......@@ -98,7 +98,6 @@ HAVE_LDAP = @HAVE_LDAP@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@
LURCDIR = @LURCDIR@
MYCFLAGS = @MYCFLAGS@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
PACKAGE = @PACKAGE@
......@@ -115,6 +114,7 @@ SH_LOAD_FLAGS = @SH_LOAD_FLAGS@
SH_MAIN_LOAD_FLAGS = @SH_MAIN_LOAD_FLAGS@
SH_SUFFIX = @SH_SUFFIX@
STACK_DIRECTION = @STACK_DIRECTION@
STKCFLAGS = @STKCFLAGS@
STRIP = @STRIP@
SVN_URL = @SVN_URL@
THREADS = @THREADS@
......
......@@ -98,7 +98,6 @@ HAVE_LDAP = @HAVE_LDAP@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@
LURCDIR = @LURCDIR@
MYCFLAGS = @MYCFLAGS@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
PACKAGE = @PACKAGE@
......@@ -115,6 +114,7 @@ SH_LOAD_FLAGS = @SH_LOAD_FLAGS@
SH_MAIN_LOAD_FLAGS = @SH_MAIN_LOAD_FLAGS@
SH_SUFFIX = @SH_SUFFIX@
STACK_DIRECTION = @STACK_DIRECTION@
STKCFLAGS = @STKCFLAGS@
STRIP = @STRIP@
SVN_URL = @SVN_URL@
THREADS = @THREADS@
......
......@@ -98,7 +98,6 @@ HAVE_LDAP = @HAVE_LDAP@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@
LURCDIR = @LURCDIR@
MYCFLAGS = @MYCFLAGS@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
PACKAGE = @PACKAGE@
......@@ -115,6 +114,7 @@ SH_LOAD_FLAGS = @SH_LOAD_FLAGS@
SH_MAIN_LOAD_FLAGS = @SH_MAIN_LOAD_FLAGS@
SH_SUFFIX = @SH_SUFFIX@
STACK_DIRECTION = @STACK_DIRECTION@
STKCFLAGS = @STKCFLAGS@
STRIP = @STRIP@
SVN_URL = @SVN_URL@
THREADS = @THREADS@
......
......@@ -2,10 +2,10 @@
#
# Author: Erick Gallesio [eg@unice.fr]
# Creation date: 11-Apr-2000 10:30 (eg)
# Last file update: 16-Apr-2006 10:58 (eg)
# Last file update: 25-Apr-2006 16:46 (eg)
CC = @CC@
CFLAGS = @CFLAGS@ @MYCFLAGS@
CFLAGS = @CFLAGS@ @STKCFLAGS@
schemedir = $(prefix)/share/@PACKAGE@/@VERSION@
extraincdir = $(prefix)/include/@PACKAGE@
......
......@@ -18,7 +18,7 @@
#
# Author: Erick Gallesio [eg@unice.fr]
# Creation date: 11-Apr-2000 10:30 (eg)
# Last file update: 16-Apr-2006 10:58 (eg)
# Last file update: 25-Apr-2006 16:46 (eg)
SHELL = @SHELL@
srcdir = @srcdir@
......@@ -99,7 +99,6 @@ HAVE_LDAP = @HAVE_LDAP@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@
LURCDIR = @LURCDIR@
MYCFLAGS = @MYCFLAGS@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
PACKAGE = @PACKAGE@
......@@ -116,6 +115,7 @@ SH_LOAD_FLAGS = @SH_LOAD_FLAGS@
SH_MAIN_LOAD_FLAGS = @SH_MAIN_LOAD_FLAGS@
SH_SUFFIX = @SH_SUFFIX@
STACK_DIRECTION = @STACK_DIRECTION@
STKCFLAGS = @STKCFLAGS@
STRIP = @STRIP@
SVN_URL = @SVN_URL@
......@@ -124,7 +124,7 @@ VERSION = @VERSION@
am__include = @am__include@
am__quote = @am__quote@
install_sh = @install_sh@
CFLAGS = @CFLAGS@ @MYCFLAGS@
CFLAGS = @CFLAGS@ @STKCFLAGS@
schemedir = $(prefix)/share/@PACKAGE@/@VERSION@
extraincdir = $(prefix)/include/@PACKAGE@
......@@ -251,7 +251,8 @@ LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
DIST_SOURCES = $(stklos_SOURCES)
DATA = $(extrainc_DATA)
DIST_COMMON = Makefile.am Makefile.in extraconf.h.in stklosconf.h.in
DIST_COMMON = Makefile.am Makefile.in TODO extraconf.h.in \
stklosconf.h.in
SOURCES = $(stklos_SOURCES)
all: stklosconf.h
......
......@@ -22,7 +22,7 @@
*
* Author: Erick Gallesio [eg@unice.fr]
* Creation date: 14-Nov-1993 14:58
* Last file update: 12-Apr-2006 12:39 (eg)
* Last file update: 25-Apr-2006 18:48 (eg)
*/
#include "stklos.h"
......@@ -141,21 +141,18 @@ SCM STk_format_error(char *format, ...)
}
SCM STk_make_error(char *format, ...)
static SCM make_error_condition(char *format, va_list ap)
{
va_list ap;
SCM out, bt;
/* Grab a baktrace */
bt = STk_vm_bt();
/* Open a string port */
out = STk_open_output_string();
/* Build the message string in the string port */
va_start(ap, format);
print_format(out, format, ap);
va_end(ap);
/* and return error */
return STk_make_C_cond(STk_err_mess_condition,
......@@ -164,31 +161,34 @@ SCM STk_make_error(char *format, ...)
bt,
STk_get_output_string(out));
}
}
void STk_error(char *format, ...)
SCM STk_make_error(char *format, ...)
{
va_list ap;
SCM out, bt;
SCM cond;
/* Grab a baktrace */
bt = STk_vm_bt();
/* Open a string port */
out = STk_open_output_string();
/* Build the message string in the string port */
va_start(ap, format);
print_format(out, format, ap);
cond = make_error_condition(format, ap);
va_end(ap);
/* Return the error condition */
return cond;
}
/* and signal error */
STk_raise_exception(STk_make_C_cond(STk_err_mess_condition,
3,
STk_false, /* no location */
bt,
STk_get_output_string(out)));
void STk_error(char *format, ...)
{
va_list ap;
SCM cond;
va_start(ap, format);
cond = make_error_condition(format, ap);
va_end(ap);
/* Signal error */
STk_raise_exception(cond);
}
......
......@@ -98,7 +98,6 @@ HAVE_LDAP = @HAVE_LDAP@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@
LURCDIR = @LURCDIR@
MYCFLAGS = @MYCFLAGS@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
PACKAGE = @PACKAGE@
......@@ -115,6 +114,7 @@ SH_LOAD_FLAGS = @SH_LOAD_FLAGS@
SH_MAIN_LOAD_FLAGS = @SH_MAIN_LOAD_FLAGS@
SH_SUFFIX = @SH_SUFFIX@
STACK_DIRECTION = @STACK_DIRECTION@
STKCFLAGS = @STKCFLAGS@
STRIP = @STRIP@
SVN_URL = @SVN_URL@
THREADS = @THREADS@
......
......@@ -98,7 +98,6 @@ HAVE_LDAP = @HAVE_LDAP@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDAP_LIB = @LDAP_LIB@
LURCDIR = @LURCDIR@
MYCFLAGS = @MYCFLAGS@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
PACKAGE = @PACKAGE@
......@@ -115,6 +114,7 @@ SH_LOAD_FLAGS = @SH_LOAD_FLAGS@
SH_MAIN_LOAD_FLAGS = @SH_MAIN_LOAD_FLAGS@
SH_SUFFIX = @SH_SUFFIX@
STACK_DIRECTION = @STACK_DIRECTION@
STKCFLAGS = @STKCFLAGS@
STRIP = @STRIP@
SVN_URL = @SVN_URL@
THREADS = @THREADS@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment