mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-07-02 23:50:47 +02:00
Convert mutexes, condition vars to statically-allocated tc16
* libguile/scm.h: Add statically allocated tc16s for condvars and mutexes. * libguile/threads.c: Adapt to declare tag inline to struct scm_cond and struct scm_mutex. * libguile/threads.h: Expose printing procedures internally. * module/oop/goops.scm: * libguile/goops.c: Fix to statically allocate condition variable and mutex classes. * libguile/eq.c: * libguile/print.c: Adapt.
This commit is contained in:
parent
7a1406891f
commit
f47fe6e752
7 changed files with 114 additions and 67 deletions
|
@ -139,6 +139,8 @@ static SCM class_finalizer;
|
|||
static SCM class_ephemeron;
|
||||
static SCM class_ephemeron_table;
|
||||
static SCM class_character_set;
|
||||
static SCM class_condition_variable;
|
||||
static SCM class_mutex;
|
||||
|
||||
static struct scm_ephemeron_table *vtable_class_map;
|
||||
static SCM pre_goops_vtables = SCM_EOL;
|
||||
|
@ -345,6 +347,10 @@ SCM_DEFINE (scm_class_of, "class-of", 1, 0, 0,
|
|||
{
|
||||
case scm_tc16_charset:
|
||||
return class_character_set;
|
||||
case scm_tc16_condition_variable:
|
||||
return class_condition_variable;
|
||||
case scm_tc16_mutex:
|
||||
return class_mutex;
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
|
@ -980,6 +986,8 @@ SCM_DEFINE (scm_sys_goops_early_init, "%goops-early-init", 0, 0, 0,
|
|||
class_ephemeron = scm_variable_ref (scm_c_lookup ("<ephemeron>"));
|
||||
class_ephemeron_table = scm_variable_ref (scm_c_lookup ("<ephemeron-table>"));
|
||||
class_character_set = scm_variable_ref (scm_c_lookup ("<character-set>"));
|
||||
class_condition_variable = scm_variable_ref (scm_c_lookup ("<condition-variable>"));
|
||||
class_mutex = scm_variable_ref (scm_c_lookup ("<mutex>"));
|
||||
|
||||
create_smob_classes ();
|
||||
create_struct_classes ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue