1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-18 01:30:27 +02:00

* *.[hc]: add Emacs magic at the end of file, to ensure GNU

indentation style.
This commit is contained in:
Michael Livshin 2000-03-19 19:01:16 +00:00
parent afcfc5bbe0
commit 89e00824a0
187 changed files with 1092 additions and 956 deletions

View file

@ -1,3 +1,8 @@
2000-03-19 Michael Livshin <mlivshin@bigfoot.com>
* *.[hc]: add Emacs magic at the end of file, to ensure GNU
indentation style.
2000-03-12 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
* readline.c (current_input_getc): Don't pass int values through

View file

@ -523,3 +523,9 @@ scm_init_readline ()
}
#endif
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -44,3 +44,9 @@ void rl_free_line_state ();
#endif
#endif
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -1,3 +1,8 @@
2000-03-19 Michael Livshin <mlivshin@bigfoot.com>
* *.[hc]: add Emacs magic at the end of file, to ensure GNU
indentation style.
2000-03-19 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
* threads.h: Added #include "libguile/throw.h". (Thanks to

View file

@ -547,3 +547,9 @@ extern struct errdesc scm_errmsgs[];
#endif /* __SCMH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -139,3 +139,9 @@
#endif /* _SCMH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -394,3 +394,9 @@ scm_init_alist ()
#include "alist.x"
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -67,3 +67,9 @@ extern SCM scm_assoc_remove_x (SCM alist, SCM key);
extern void scm_init_alist (void);
#endif /* ALISTH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -492,3 +492,9 @@ i00afunc (long address)
#endif /* no alloca */
#endif /* not GCC version 2 */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -130,3 +130,9 @@ scm_init_arbiters ()
scm_markcdr, NULL, prinarb, NULL);
#include "arbiters.x"
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -54,3 +54,9 @@ extern SCM scm_release_arbiter (SCM arb);
extern void scm_init_arbiters (void);
#endif /* ARBITERSH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -474,3 +474,9 @@ scm_init_async ()
#include "async.x"
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -82,3 +82,9 @@ extern SCM scm_mask_signals (void);
extern void scm_init_async (void);
#endif /* ASYNCH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -642,3 +642,9 @@ scm_init_backtrace ()
#include "backtrace.x"
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -63,3 +63,9 @@ SCM scm_set_print_params_x (SCM params);
void scm_init_backtrace (void);
#endif /* BACKTRACEH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -79,3 +79,9 @@ scm_init_boolean ()
#include "boolean.x"
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -73,3 +73,9 @@ extern SCM scm_boolean_p (SCM obj);
extern void scm_init_boolean (void);
#endif /* BOOLEANH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -400,3 +400,9 @@ scm_init_chars ()
#include "chars.x"
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -92,3 +92,9 @@ extern int scm_downcase (unsigned int c);
extern void scm_init_chars (void);
#endif /* SCM_CHARSH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -208,3 +208,9 @@ scm_init_continuations ()
#include "continuations.x"
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -76,3 +76,9 @@ extern SCM scm_call_continuation (SCM cont, SCM val);
extern void scm_init_continuations (void);
#endif /* CONTINUATIONSH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -283,3 +283,9 @@ do { \
#define SCM_SET_THREAD_LOCAL_DATA(ptr) (coop_global_curr->data = (ptr))
#endif /* COOP_DEFSH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -467,3 +467,9 @@ scm_signal_condition_variable (SCM c)
coop_condition_variable_signal (SCM_CONDVAR_DATA (c));
return SCM_BOOL_T;
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -122,3 +122,9 @@ extern coop_q_t coop_global_allq; /* A queue of all threads. */
extern coop_t *coop_global_curr; /* Currently-executing thread. */
#endif /* COOP_THREADSH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -40,7 +40,7 @@
* If you do not wish that, delete this exception notice. */
/* $Id: coop.c,v 1.18 2000-03-12 01:48:04 mdj Exp $ */
/* $Id: coop.c,v 1.19 2000-03-19 19:01:10 cmm Exp $ */
/* Cooperative thread library, based on QuickThreads */
@ -739,3 +739,9 @@ scm_thread_usleep (unsigned long usec)
}
#endif /* GUILE_ISELECT */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -1,3 +1,9 @@
/* this file is processed by gcc with special options to extract
a list of errno codes. */
#include <errno.h>
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -1,3 +1,9 @@
/* this file is processed by gcc with special options to extract
a list of signal numbers. */
#include <signal.h>
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -642,3 +642,9 @@ scm_init_debug ()
#include "debug.x"
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -216,3 +216,9 @@ extern SCM scm_debug_hang (SCM obj);
#endif /*GUILE_DEBUG*/
#endif /* DEBUGH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -561,3 +561,9 @@ scm_init_dynamic_linking ()
#include "dynl.x"
kw_global = scm_make_keyword_from_dash_symbol (sym_global);
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -61,3 +61,9 @@ SCM scm_dynamic_args_call (SCM symb, SCM dobj, SCM args);
void scm_init_dynamic_linking (void);
#endif /* LIBGUILE_DYNL_H */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -273,3 +273,9 @@ scm_init_dynwind ()
NULL, scm_free0, printguards, NULL);
#include "dynwind.x"
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -64,3 +64,9 @@ extern SCM scm_wind_chain (void);
#endif /*GUILE_DEBUG*/
#endif /* DYNWINDH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -207,3 +207,9 @@ scm_init_eq ()
#include "eq.x"
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -53,3 +53,9 @@ extern SCM scm_equal_p (SCM x, SCM y);
extern void scm_init_eq (void);
#endif /* EQH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -319,3 +319,9 @@ scm_init_error ()
#include "error.x"
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -87,3 +87,9 @@ extern SCM scm_wta (SCM arg, const char *pos, const char *s_subr);
extern void scm_init_error (void);
#endif /* ERRORH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -3894,3 +3894,9 @@ scm_init_eval ()
}
#endif /* !DEVAL */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -227,3 +227,9 @@ extern SCM scm_eval_x (SCM obj);
extern void scm_init_eval (void);
#endif /* EVALH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -160,3 +160,9 @@ scm_init_evalext ()
scm_make_synt (scm_s_set_x, scm_makmmacro, scm_m_generalized_set_x);
#include "evalext.x"
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -54,3 +54,9 @@ extern SCM scm_m_undefine (SCM x, SCM env);
extern void scm_init_evalext (void);
#endif /* EVALEXTH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -350,3 +350,9 @@ scm_init_feature()
#include "feature.x"
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -76,3 +76,9 @@ extern SCM scm_hook_to_list (SCM hook);
extern void scm_init_feature (void);
#endif /* FEATUREH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -1464,3 +1464,9 @@ scm_sysintern ("FD_CLOEXEC", scm_long2num (FD_CLOEXEC));
#include "filesys.x"
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -89,3 +89,9 @@ extern SCM scm_basename (SCM filename, SCM suffix);
extern void scm_init_filesys (void);
#endif /* FILESYSH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -262,3 +262,9 @@ scm_init_fluids ()
NULL, NULL, print_fluid, NULL);
#include "fluids.x"
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -107,3 +107,9 @@ void scm_swap_fluids_reverse (SCM fluids, SCM vals);
void scm_init_fluids (void);
#endif /* !FLUIDSH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -735,3 +735,9 @@ scm_init_fports ()
scm_sysintern ("_IOLBF", SCM_MAKINUM (_IOLBF));
scm_sysintern ("_IONBF", SCM_MAKINUM (_IONBF));
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -79,3 +79,9 @@ extern SCM scm_fdes_to_port (int fdes, char *mode, SCM name);
extern void scm_init_fports (void);
#endif /* FPORTSH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -1,169 +0,0 @@
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA
*
* As a special exception, the Free Software Foundation gives permission
* for additional uses of the text contained in its release of GUILE.
*
* The exception is that, if you link the GUILE library with other files
* to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the GUILE library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the
* Free Software Foundation under the name GUILE. If you copy
* code from other Free Software Foundation releases into a copy of
* GUILE, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for GUILE, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice. */
/* Software engineering face-lift by Greg J. Badros, 11-Dec-1999,
gjb@cs.washington.edu, http://www.cs.washington.edu/homes/gjb */
#ifndef SCM_FSU_PTHREADS_H
#define SCM_FSU_PTHREADS_H
#define PTHREAD_KERNEL
#include <pthread.h>
/* Identify where the stack pointer can be found in a jmpbuf.
*/
#if defined(__sparc_setjmp_h)
# define THREAD_SP machdep_data.machdep_state[2]
#endif
#if defined(linux)
# define THREAD_SP machdep_data.machdep_state[0].__sp
#endif
#if defined(sgi)
# define THREAD_SP machdep_data.machdep_state[JB_SP]
#endif
/* ...define THREAD_SP for your architecture here...
*/
#if !defined(THREAD_SP)
--> where is your stack pointer?
#endif
#define PTHREAD_MAX_PRIORITY 64
/* Boost the priority of this thread so that it is the only
one running. PTHREAD_MAX_PRIORITY is reserved for this
purpose */
#define SCM_THREAD_CRITICAL_SECTION_START \
struct sched_param param; \
int previous_prio; \
int policy; \
pthread_getschedparam(pthread_self(), &policy, &param); \
previous_prio = param.prio; \
param.prio = PTHREAD_MAX_PRIORITY; \
pthread_setschedparam(pthread_self(), policy, &param)
#define SCM_THREAD_CRITICAL_SECTION_END \
param.prio = previous_prio; \
pthread_setschedparam(pthread_self(), policy, &param)
#define SCM_THREAD_INITIALIZE_STORAGE \
scm_threads_init_mit_pthreads ()
#define SCM_NO_CRITICAL_SECTION_OWNER 0
#define SCM_DEFER_INTS \
do { \
SCM_IASSERT(scm_critical_section_owner != pthread_self()); \
pthread_mutex_lock(&scm_critical_section_mutex); \
scm_critical_section_owner = pthread_self(); \
scm_ints_disabled = 1; \
} while (0)
#define SCM_ALLOW_INTS \
do { \
SCM_IASSERT(scm_critical_section_owner == pthread_self()); \
scm_ints_disabled = 0; \
scm_critical_section_owner = SCM_NO_CRITICAL_SECTION_OWNER; \
pthread_mutex_unlock(&scm_critical_section_mutex); \
SCM_CHECK_INTS; \
} while (0)
#define SCM_REDEFER_INTS \
do { \
if ((scm_critical_section_owner != pthread_self()) || \
(scm_critical_section_owner == SCM_NO_CRITICAL_SECTION_OWNER)) \
{ \
pthread_mutex_lock(&scm_critical_section_mutex); \
scm_critical_section_owner = pthread_self(); \
} \
++scm_ints_disabled; \
} while (0)
#define SCM_REALLOW_INTS \
do { \
SCM_IASSERT(scm_critical_section_owner == pthread_self()); \
--scm_ints_disabled; \
if (!scm_ints_disabled) \
{ \
scm_critical_section_owner = SCM_NO_CRITICAL_SECTION_OWNER; \
pthread_mutex_unlock(&scm_critical_section_mutex); \
SCM_CHECK_INTS; \
} \
} while (0)
*fixme*
#define scm_root ((scm_root_state *) pthread_self()->prots)
#define scm_set_root(new_root) (pthread_self()->prots = (new_root))
void scm_threads_init_mit_pthreads ();
typedef struct QUEUE {
struct QUEUE *flink, *blink;
} queue;
extern pthread_mutex_t scm_critical_section_mutex;
extern pthread_t scm_critical_section_owner;
/* Key to thread specific data */
extern pthread_key_t info_key;
struct scm_pthread_create_info_type
{
SCM thunk;
SCM error;
SCM *prots;
} scm_pthread_create_info;
#endif

View file

@ -2600,3 +2600,9 @@ scm_init_gc ()
{
#include "gc.x"
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -139,3 +139,9 @@ extern int scm_init_storage (scm_sizet init_heap_size,
#endif
extern void scm_init_gc (void);
#endif /* GCH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -124,3 +124,9 @@ extern int gdb_print (GDB_TYPE value);
extern int gdb_binding (GDB_TYPE name, GDB_TYPE value);
#endif /* GDB_INTERFACE_H */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -326,3 +326,9 @@ scm_init_gdbint ()
tok_buf = scm_permanent_object (scm_makstr (30L, 0));
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -56,3 +56,9 @@ extern int scm_print_carefully_p;
extern void scm_init_gdbint (void);
#endif /* GDBINTH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -246,3 +246,9 @@ void gh_newline (void);
#endif
#endif /* __GH_H */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -692,3 +692,9 @@ gh_module_lookup (SCM vec, char *sname)
else
return SCM_UNDEFINED;
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -119,3 +119,9 @@ gh_eval_file_with_standard_handler (const char *scheme_code)
{
return gh_eval_file_with_catch (scheme_code, gh_standard_handler);
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -167,3 +167,9 @@ gh_call3 (SCM proc, SCM arg1, SCM arg2, SCM arg3)
{
return scm_apply (proc, arg1, scm_cons2 (arg2, arg3, scm_listofnull));
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -103,3 +103,9 @@ gh_standard_handler (void *data, SCM tag, SCM throw_args)
return SCM_BOOL_F;
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -61,3 +61,9 @@ gh_newline ()
{
scm_newline (scm_current_output_port ());
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -187,3 +187,9 @@ gh_set_cdr_x(SCM pair, SCM value)
{
return scm_set_cdr_x(pair, value);
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -135,3 +135,9 @@ gh_null_p(SCM l)
{
return (SCM_NFALSEP(scm_null_p(l)));
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -245,3 +245,9 @@ c_vector_test (SCM s_length)
return xvec;
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -163,3 +163,9 @@ c_vector_test (SCM s_length)
return xvec;
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -212,3 +212,9 @@ scm_init_gsubr()
scm_make_gsubr("gsubr-2-1-l", 2, 1, 1, gsubr_21l); /* example */
#endif
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -71,3 +71,9 @@ extern SCM scm_gsubr_apply (SCM args);
extern void scm_init_gsubr (void);
#endif /* GSUBRH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -276,3 +276,9 @@ scm_init_guardian()
#include "guardians.x"
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -59,3 +59,9 @@ SCM scm_get_one_zombie (SCM guardian);
void scm_init_guardian (void);
#endif /* !SCM_GUARDIANH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -76,3 +76,9 @@ main (int argc, char **argv)
scm_boot_guile (argc, argv, inner_main, 0);
return 0; /* never reached */
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -247,3 +247,9 @@ scm_init_hash ()
#include "hash.x"
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -58,3 +58,9 @@ extern SCM scm_hash (SCM obj, SCM n);
extern void scm_init_hash (void);
#endif /* HASHH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -565,3 +565,9 @@ scm_init_hashtab ()
{
#include "hashtab.x"
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -84,3 +84,9 @@ extern SCM scm_hash_fold (SCM proc, SCM init, SCM hash);
extern void scm_init_hashtab (void);
#endif /* HASHTABH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -160,3 +160,9 @@ inet_aton(const char *cp_arg, struct in_addr *addr)
addr->s_addr = htonl(val);
return (1);
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -620,3 +620,9 @@ invoke_main_func (void *body_data)
/* never reached */
return SCM_UNDEFINED;
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -56,3 +56,9 @@ extern void scm_boot_guile (int argc, char **argv,
extern void scm_load_startup_files (void);
#endif /* INITH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -533,3 +533,9 @@ scm_init_ioext ()
#include "ioext.x"
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -63,3 +63,9 @@ extern SCM scm_fdes_to_ports (SCM fd);
extern void scm_init_ioext (void);
#endif /* IOEXTH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -693,3 +693,9 @@ scm_internal_select (int nfds,
return coop_global_curr->retval;
#endif /* GUILE_ISELECT */
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -100,3 +100,9 @@ extern void scm_init_iselect (void);
#endif /* GUILE_ISELECT */
#endif
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -141,3 +141,9 @@ scm_init_keywords ()
#include "keywords.x"
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -65,3 +65,9 @@ extern SCM scm_keyword_dash_symbol (SCM keyword);
extern void scm_init_keywords (void);
#endif /* KEYWORDSH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -1,53 +0,0 @@
/* classes: h_files */
#ifndef KWH
#define KWH
/* Copyright (C) 1995,1996,1999 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA
*
* As a special exception, the Free Software Foundation gives permission
* for additional uses of the text contained in its release of GUILE.
*
* The exception is that, if you link the GUILE library with other files
* to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the GUILE library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the
* Free Software Foundation under the name GUILE. If you copy
* code from other Free Software Foundation releases into a copy of
* GUILE, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for GUILE, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice. */
#include "libguile/keywords.h"
extern int scm_tc16_kw;
#endif /* KWH */

View file

@ -153,3 +153,9 @@ scm_init_lang ()
#include "lang.x"
scm_make_synt ("nil-while", scm_makacro, scm_m_while);
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -69,3 +69,9 @@ extern SCM scm_nil_eq (SCM x, SCM y);
extern void scm_init_lang (void);
#endif /* PAIRSH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -1,142 +0,0 @@
#ifndef LIBGUILEH
#define LIBGUILEH
/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA
*
* As a special exception, the Free Software Foundation gives permission
* for additional uses of the text contained in its release of GUILE.
*
* The exception is that, if you link the GUILE library with other files
* to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the GUILE library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the
* Free Software Foundation under the name GUILE. If you copy
* code from other Free Software Foundation releases into a copy of
* GUILE, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for GUILE, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice. */
#ifdef __cplusplus
extern "C" {
#endif
#include "libguile/__scm.h"
/* These files define typedefs used by later files, so they need to
come first. */
#include "libguile/print.h"
#include "libguile/smob.h"
#include "libguile/pairs.h"
#include "libguile/alist.h"
#include "libguile/arbiters.h"
#include "libguile/async.h"
#include "libguile/boolean.h"
#include "libguile/chars.h"
#include "libguile/continuations.h"
#ifdef DEBUG_EXTENSIONS
#include "libguile/backtrace.h"
#include "libguile/debug.h"
#include "libguile/stacks.h"
#endif
#include "libguile/dynl.h"
#include "libguile/dynwind.h"
#include "libguile/eq.h"
#include "libguile/error.h"
#include "libguile/eval.h"
#include "libguile/evalext.h"
#include "libguile/feature.h"
#include "libguile/filesys.h"
#include "libguile/fluids.h"
#include "libguile/fports.h"
#include "libguile/gc.h"
#include "libguile/gdbint.h"
#include "libguile/gsubr.h"
#include "libguile/guardians.h"
#include "libguile/hash.h"
#include "libguile/hashtab.h"
#include "libguile/init.h"
#include "libguile/ioext.h"
#include "libguile/keywords.h"
#include "libguile/kw.h"
#include "libguile/list.h"
#include "libguile/load.h"
#include "libguile/macros.h"
#include "libguile/mallocs.h"
#include "libguile/modules.h"
#include "libguile/net_db.h"
#include "libguile/numbers.h"
#include "libguile/objects.h"
#include "libguile/objprop.h"
#include "libguile/options.h"
#include "libguile/ports.h"
#include "libguile/posix.h"
#include "libguile/procprop.h"
#include "libguile/procs.h"
#include "libguile/ramap.h"
#include "libguile/random.h"
#include "libguile/read.h"
#include "libguile/root.h"
#include "libguile/scmsigs.h"
#include "libguile/script.h"
#include "libguile/simpos.h"
#include "libguile/snarf.h"
#include "libguile/socket.h"
#include "libguile/sort.h"
#include "libguile/srcprop.h"
#include "libguile/stackchk.h"
#include "libguile/stime.h"
#include "libguile/strings.h"
#include "libguile/strop.h"
#include "libguile/strorder.h"
#include "libguile/strports.h"
#include "libguile/struct.h"
#include "libguile/symbols.h"
#include "libguile/tag.h"
#include "libguile/tags.h"
#include "libguile/throw.h"
#include "libguile/unif.h"
#include "libguile/validate.h"
#include "libguile/variable.h"
#include "libguile/vectors.h"
#include "libguile/version.h"
#include "libguile/vports.h"
#include "libguile/weaks.h"
#ifdef USE_THREADS
#include "libguile/threads.h"
#endif
#ifdef __cplusplus
}
#endif
#endif /* LIBGUILEH */

View file

@ -784,3 +784,9 @@ scm_init_list ()
{
#include "list.x"
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -102,3 +102,9 @@ extern SCM scm_delete1_x (SCM item, SCM lst);
extern void scm_init_list (void);
#endif /* LISTH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -510,3 +510,9 @@ scm_init_load ()
#include "load.x"
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -60,3 +60,9 @@ extern SCM scm_read_and_eval_x (SCM port);
extern void scm_init_load (void);
#endif /* LOADH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -183,3 +183,9 @@ scm_init_macros ()
scm_markcdr, NULL, NULL, NULL);
#include "macros.x"
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -65,3 +65,9 @@ extern SCM scm_make_synt (const char *name,
extern void scm_init_macros (void);
#endif /* MACROSH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -89,3 +89,9 @@ scm_init_mallocs ()
scm_tc16_malloc = scm_make_smob_type_mfpe ("malloc", 0,
NULL, fmalloc, prinmalloc, NULL);
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -58,3 +58,9 @@ extern SCM scm_malloc_obj (scm_sizet n);
extern void scm_init_mallocs (void);
#endif /* MALLOCSH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -22,3 +22,9 @@ memmove (PTR s1, CPTR s2, size_t n)
bcopy (s2, s1, n);
return s1;
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -1,400 +0,0 @@
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA
*
* As a special exception, the Free Software Foundation gives permission
* for additional uses of the text contained in its release of GUILE.
*
* The exception is that, if you link the GUILE library with other files
* to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the GUILE library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the
* Free Software Foundation under the name GUILE. If you copy
* code from other Free Software Foundation releases into a copy of
* GUILE, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for GUILE, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice. */
typedef struct scm_pthread_info {
queue q; /* the dequeue on which this structure exists */
/* reqired to be the first element */
pthread_t thread; /* the corresponding thread structure */
void *stack_top; /* the highest address in this thread's stack */
scm_root_state *root; /* root for this thread */
} scm_pthread_info;
pthread_mutex_t scm_critical_section_mutex;
pthread_t scm_critical_section_owner;
static queue infos = { &infos, &infos }; /* the dequeue of info structures */
/* Key to thread specific data */
pthread_key_t info_key;
size_t
scm_threads_free_thread (SCM t)
{
scm_must_free (SCM_THREAD_DATA (t));
return sizeof (pthread_t);
}
size_t
scm_threads_free_mutex (SCM m)
{
pthread_mutex_destroy (SCM_MUTEX_DATA (m));
scm_must_free (SCM_MUTEX_DATA (m));
return sizeof (pthread_mutex_t);
}
size_t
scm_threads_free_condvar (SCM c)
{
pthread_cond_destroy (SCM_CONDVAR_DATA (c));
scm_must_free (SCM_CONDVAR_DATA (c));
return sizeof (pthread_cond_t);
}
/* cleanup for info structure
*/
static void
scm_pthread_delete_info (void *ptr)
{
scm_pthread_info *info = (scm_pthread_info *) ptr;
info->q.blink->flink = info->q.flink;
info->q.flink->blink = info->q.blink;
scm_must_free ((char *) info);
}
void
scm_threads_init (SCM_STACKITEM *i)
{
/*
* each info structure is made thread-specific, so that the cleanup
* mechanism can be used to reclaim the space in a timely fashion.
*/
pthread_key_create (&info_key, scm_pthread_delete_info);
/* initialize various mutex variables */
pthread_mutex_init (&scm_critical_section_mutex, NULL);
/*
* create an info structure for the initial thread and push it onto
* the info dequeue
*/
{
scm_pthread_info *info;
info = (scm_pthread_info *) scm_must_malloc (sizeof (scm_pthread_info),
"threads_init");
infos.flink = infos.blink = &info->q;
info->q.flink = info->q.blink = &infos;
info->thread = pthread_initial;
info->stack_top = (void *) i;
pthread_setspecific(info_key, info);
}
/* The root state pointer gets initialized in init.c. */
}
/* given some thread, find the corresponding info
*/
static scm_pthread_info *pthreads_find_info (pthread_t target)
{
queue *ptr = infos.flink;
while (ptr != &infos)
{
scm_pthread_info *info = (scm_pthread_info *) ptr;
if (info->thread == target)
{
return (info);
}
ptr = ptr->flink;
}
}
void
scm_threads_mark_stacks ()
{
scm_pthread_info *info;
pthread_t thread;
int j;
for (info = (scm_pthread_info *) infos.flink;
info != (scm_pthread_info *) &infos;
info = (scm_pthread_info *) info->q.flink)
{
thread = info->thread;
if (thread == pthread_run)
{
/* Active thread */
/* stack_len is long rather than sizet in order to guarantee
that &stack_len is long aligned */
#ifdef STACK_GROWS_UP
long stack_len = ((SCM_STACKITEM *) (&thread) -
(SCM_STACKITEM *) info->stack_top);
/* Protect from the C stack. This must be the first marking
* done because it provides information about what objects
* are "in-use" by the C code. "in-use" objects are those
* for which the values from SCM_LENGTH and SCM_CHARS must remain
* usable. This requirement is stricter than a liveness
* requirement -- in particular, it constrains the implementation
* of scm_resizuve.
*/
SCM_FLUSH_REGISTER_WINDOWS;
/* This assumes that all registers are saved into the jmp_buf */
setjmp (scm_save_regs_gc_mark);
scm_mark_locations ((SCM_STACKITEM *) scm_save_regs_gc_mark,
((scm_sizet) sizeof scm_save_regs_gc_mark
/ sizeof (SCM_STACKITEM)));
scm_mark_locations (((size_t) info->stack_top,
(sizet) stack_len));
#else
long stack_len = ((SCM_STACKITEM *) info->stack_top -
(SCM_STACKITEM *) (&thread));
/* Protect from the C stack. This must be the first marking
* done because it provides information about what objects
* are "in-use" by the C code. "in-use" objects are those
* for which the values from SCM_LENGTH and SCM_CHARS must remain
* usable. This requirement is stricter than a liveness
* requirement -- in particular, it constrains the implementation
* of scm_resizuve.
*/
SCM_FLUSH_REGISTER_WINDOWS;
/* This assumes that all registers are saved into the jmp_buf */
setjmp (scm_save_regs_gc_mark);
scm_mark_locations ((SCM_STACKITEM *) scm_save_regs_gc_mark,
((scm_sizet) sizeof scm_save_regs_gc_mark
/ sizeof (SCM_STACKITEM)));
scm_mark_locations ((SCM_STACKITEM *) &thread,
stack_len);
#endif
}
else
{
/* Suspended thread */
#ifdef STACK_GROWS_UP
long stack_len = ((SCM_STACKITEM *) (thread->THREAD_SP) -
(SCM_STACKITEM *) info->stack_top);
scm_mark_locations ((size_t)info->stack_top,
(sizet) stack_len);
#else
long stack_len = ((SCM_STACKITEM *) info->stack_top -
(SCM_STACKITEM *) (thread->THREAD_SP));
scm_mark_locations ((SCM_STACKITEM *) thread->machdep_data.machdep_state,
((scm_sizet) sizeof (*thread->machdep_data.machdep_state)
/ sizeof (SCM_STACKITEM)));
scm_mark_locations ((SCM_STACKITEM *) (size_t) thread->THREAD_SP,
stack_len);
#endif
}
/* Mark this thread's root */
scm_gc_mark (((scm_root_state *) info->root) -> handle);
}
}
void *
launch_thread (void *p)
{
/* The thread object will be GC protected by being a member of the
list given as argument to launch_thread. It will be marked
during the conservative sweep of the stack. */
SCM args = (SCM) p;
pthread_attr_setcleanup (&pthread_self () -> attr,
NULL,
SCM_ROOT_STATE (SCM_CAR (args)));
scm_call_with_dynamic_root (SCM_CADDR (args), SCM_CADDDR (args));
return NULL;
}
SCM
scm_call_with_new_thread (SCM argl)
{
SCM thread;
/* Check arguments. */
{
register SCM args = argl;
SCM thunk, handler;
SCM_ASSERT (SCM_NIMP (args),
scm_makfrom0str (s_call_with_new_thread),
SCM_WNA, NULL);
thunk = SCM_CAR (args);
SCM_ASSERT (SCM_NFALSEP (scm_thunk_p (thunk)),
thunk,
SCM_ARG1,
s_call_with_new_thread);
args = SCM_CDR (args);
SCM_ASSERT (SCM_NIMP (args),
scm_makfrom0str (s_call_with_new_thread),
SCM_WNA, NULL);
handler = SCM_CAR (args);
SCM_ASSERT (SCM_NFALSEP (scm_procedure_p (handler)),
handler,
SCM_ARG2,
s_call_with_new_thread);
SCM_ASSERT (SCM_NULLP (SCM_CDR (args)),
scm_makfrom0str (s_call_with_new_thread),
SCM_WNA, NULL);
}
/* Make new thread. */
{
pthread_attr_t attr;
pthread_t t;
scm_pthread_info *info =
(scm_pthread_info *) scm_must_malloc (sizeof (scm_pthread_info),
"pthread_info");
SCM root, old_winds;
/* Unwind wind chain. */
old_winds = scm_dynwinds;
scm_dowinds (SCM_EOL, scm_ilength (scm_root->dynwinds));
/* Allocate thread locals. */
root = scm_make_root (scm_root->handle);
/* Make thread. */
SCM_NEWCELL (thread);
SCM_DEFER_INTS;
SCM_SETCAR (thread, scm_tc16_thread);
argl = scm_cons2 (root, thread, argl);
/* thread mustn't start until we've built the info struct */
pthread_kernel_lock++;
/* initialize and create the thread. */
pthread_attr_init (&attr);
pthread_attr_setschedpolicy (&attr, SCHED_RR);
pthread_create (&t, &attr, launch_thread, (void *) argl);
pthread_attr_destroy (&attr);
/* push the info onto the dequeue */
info->q.flink = infos.flink;
info->q.blink = &infos;
infos.flink->blink = &info->q;
infos.flink = &info->q;
/* pthread_create filled in the initial SP -- profitons-en ! */
info->stack_top = (void *) (t->THREAD_SP);
info->thread = t;
info->root = SCM_ROOT_STATE (root);
SCM_SETCDR (thread, t);
SCM_ALLOW_INTS;
/* we're now ready for the thread to begin */
pthread_kernel_lock--;
/* Return to old dynamic context. */
scm_dowinds (old_winds, - scm_ilength (old_winds));
}
return thread;
}
SCM
scm_join_thread (SCM t)
{
void *value;
pthread_join (SCM_THREAD_DATA (t), &value);
return SCM_BOOL_T;
}
SCM
scm_yield ()
{
pthread_yield ();
return SCM_BOOL_T;
}
SCM
scm_make_mutex ()
{
SCM m;
pthread_mutex_t *data = (pthread_mutex_t *) scm_must_malloc (sizeof (pthread_mutex_t), "mutex");
SCM_NEWSMOB (m,scm_tc16_mutex, data);
pthread_mutex_init (SCM_MUTEX_DATA (m), NULL);
return m;
}
SCM
scm_lock_mutex (SCM m)
{
SCM_ASSERT (SCM_MUTEXP (m), m, SCM_ARG1, s_lock_mutex);
pthread_mutex_lock (SCM_MUTEX_DATA (m));
return SCM_BOOL_T;
}
SCM
scm_unlock_mutex (SCM m)
{
SCM_ASSERT (SCM_MUTEXP (m), m, SCM_ARG1, s_unlock_mutex);
pthread_mutex_unlock (SCM_MUTEX_DATA (m));
return SCM_BOOL_T;
}
SCM
scm_make_condition_variable ()
{
SCM c;
pthread_cond_t *data = (pthread_cond_t *) scm_must_malloc (sizeof (pthread_cond_t), "condvar");
SCM_NEWSMOB (c, scm_tc16_condvar, data);
pthread_cond_init (SCM_CONDVAR_DATA (c), NULL);
return c;
}
SCM
scm_wait_condition_variable (SCM c, SCM m)
{
SCM_ASSERT (SCM_CONDVARP (c),
c,
SCM_ARG1,
s_wait_condition_variable);
SCM_ASSERT (SCM_MUTEXP (m),
m,
SCM_ARG2,
s_wait_condition_variable);
pthread_cond_wait (SCM_CONDVAR_DATA (m), SCM_MUTEX_DATA (c));
return SCM_BOOL_T;
}
SCM
scm_signal_condition_variable (SCM c)
{
SCM_ASSERT (SCM_CONDVARP (c),
c,
SCM_ARG1,
s_signal_condition_variable);
pthread_cond_signal (SCM_CONDVAR_DATA (c));
return SCM_BOOL_T;
}

View file

@ -1,190 +0,0 @@
/* classes: h_files */
#ifndef MIT_PTHREADSH
#define MIT_PTHREADSH
/* Copyright (C) 1996 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA
*
* As a special exception, the Free Software Foundation gives permission
* for additional uses of the text contained in its release of GUILE.
*
* The exception is that, if you link the GUILE library with other files
* to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the GUILE library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the
* Free Software Foundation under the name GUILE. If you copy
* code from other Free Software Foundation releases into a copy of
* GUILE, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for GUILE, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice. */
/* Software engineering face-lift by Greg J. Badros, 11-Dec-1999,
gjb@cs.washington.edu, http://www.cs.washington.edu/homes/gjb */
#include "libguile/__scm.h"
#define PTHREAD_KERNEL
#include <pthread.h>
/* Identify where the stack pointer can be found in a jmpbuf.
*/
/* Solaris 2.4 */
#if defined(__sparc_setjmp_h)
# define THREAD_SP machdep_data.machdep_state[2]
#endif
/* Solaris 2.5 */
#if defined(__sparc)
#ifndef THREAD_SP
# define THREAD_SP machdep_data.machdep_state[2]
#endif
#endif
#if defined(linux)
# define THREAD_SP machdep_data.machdep_state[0].__sp
#endif
#if defined(sgi)
# define THREAD_SP machdep_data.machdep_state[JB_SP]
#endif
/* ...define THREAD_SP for your architecture here...
*/
#if !defined(THREAD_SP)
--> where is your stack pointer?
#endif
/* Boost the priority of this thread so that it is the only
one running. PTHREAD_MAX_PRIORITY is reserved for this
purpose */
#define SCM_THREAD_CRITICAL_SECTION_START \
struct sched_param param; \
int previous_prio; \
int policy; \
pthread_getschedparam(pthread_self(), &policy, &param); \
previous_prio = param.prio; \
param.prio = PTHREAD_MAX_PRIORITY; \
pthread_setschedparam(pthread_self(), policy, &param)
#define SCM_THREAD_CRITICAL_SECTION_END \
param.prio = previous_prio; \
pthread_setschedparam(pthread_self(), policy, &param)
#if 1
#define SCM_NO_CRITICAL_SECTION_OWNER 0
#define SCM_THREAD_DEFER pthread_kernel_lock++
#define SCM_THREAD_ALLOW pthread_kernel_lock--
#define SCM_THREAD_REDEFER pthread_kernel_lock++
#define SCM_THREAD_REALLOW_1 pthread_kernel_lock--
#define SCM_THREAD_REALLOW_2 \
do { \
scm_critical_section_owner = SCM_NO_CRITICAL_SECTION_OWNER; \
pthread_mutex_unlock(&scm_critical_section_mutex); \
} while (0)
#else
#define SCM_NO_CRITICAL_SECTION_OWNER 0
#define SCM_THREAD_DEFER \
do { \
pthread_mutex_lock (&scm_critical_section_mutex); \
scm_critical_section_owner = pthread_self(); \
} while (0)
#define SCM_THREAD_ALLOW \
do { \
scm_critical_section_owner = SCM_NO_CRITICAL_SECTION_OWNER; \
pthread_mutex_unlock (&scm_critical_section_mutex); \
} while (0)
#define SCM_THREAD_REDEFER \
do { \
if ((scm_critical_section_owner != pthread_self()) || \
(scm_critical_section_owner == SCM_NO_CRITICAL_SECTION_OWNER)) \
{ \
pthread_mutex_lock(&scm_critical_section_mutex); \
scm_critical_section_owner = pthread_self(); \
} \
} while (0)
#define SCM_THREAD_REALLOW_1
#define SCM_THREAD_REALLOW_2 \
do { \
scm_critical_section_owner = SCM_NO_CRITICAL_SECTION_OWNER; \
pthread_mutex_unlock (&scm_critical_section_mutex); \
} while (0)
#endif
#define SCM_THREAD_SWITCHING_CODE
#define SCM_THREAD_LOCAL_DATA (pthread_self () -> attr.arg_attr)
#define SCM_SET_THREAD_LOCAL_DATA(new_root) \
do { \
pthread_t t = pthread_self (); \
void *r = (new_root); \
pthread_attr_setcleanup (&t -> attr, NULL, r); \
pthreads_find_info (t) -> root = r; \
} while (0)
void scm_threads_init_mit_pthreads ();
typedef struct QUEUE {
struct QUEUE *flink, *blink;
} queue;
extern pthread_mutex_t scm_critical_section_mutex;
extern pthread_t scm_critical_section_owner;
/* Key to thread specific data */
extern pthread_key_t info_key;
struct scm_pthread_create_info_type
{
SCM thunk;
SCM error;
SCM *prots;
} scm_pthread_create_info;
#endif /* MIT_PTHREADSH */

View file

@ -198,3 +198,9 @@ scm_post_boot_init_modules ()
resolve_module = scm_intern0 ("resolve-module");
try_module_autoload = scm_intern0 ("try-module-autoload");
}
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View file

@ -63,3 +63,9 @@ extern void scm_init_modules (void);
extern void scm_post_boot_init_modules (void);
#endif /* MODULESH */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

Some files were not shown because too many files have changed in this diff Show more