mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-14 13:21:54 -08:00
class-of did not work with barriers, mailboxes and semaphores
This commit is contained in:
parent
6e58b9c402
commit
abb677f039
2 changed files with 17 additions and 7 deletions
|
|
@ -221,6 +221,9 @@ ecl_slot_value_set(cl_object x, const char *slot, cl_object value)
|
|||
return funcall(4, ecl_fdefinition(slot_setter), value, x, slot_name);
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* IMPORTANT: THE FOLLOWING LIST IS LINKED TO src/clos/builtin.lsp
|
||||
**********************************************************************/
|
||||
enum ecl_built_in_classes {
|
||||
ECL_BUILTIN_T = 0,
|
||||
ECL_BUILTIN_SEQUENCE,
|
||||
|
|
@ -270,10 +273,11 @@ enum ecl_built_in_classes {
|
|||
,
|
||||
ECL_BUILTIN_PROCESS,
|
||||
ECL_BUILTIN_LOCK,
|
||||
ECL_BUILTIN_CONDITION_VARIABLE
|
||||
#endif
|
||||
#ifdef ECL_SEMAPHORES
|
||||
, ECL_BUILTIN_SEMAPHORE
|
||||
ECL_BUILTIN_RWLOCK,
|
||||
ECL_BUILTIN_CONDITION_VARIABLE,
|
||||
ECL_BUILTIN_SEMAPHORE,
|
||||
ECL_BUILTIN_BARRIER,
|
||||
ECL_BUILTIN_MAILBOX
|
||||
#endif
|
||||
#ifdef ECL_SSE2
|
||||
, ECL_BUILTIN_SSE_PACK
|
||||
|
|
@ -363,10 +367,12 @@ cl_class_of(cl_object x)
|
|||
index = ECL_BUILTIN_LOCK; break;
|
||||
case t_condition_variable:
|
||||
index = ECL_BUILTIN_CONDITION_VARIABLE; break;
|
||||
#endif
|
||||
#ifdef ECL_SEMAPHORES
|
||||
case t_semaphores:
|
||||
case t_semaphore:
|
||||
index = ECL_BUILTIN_SEMAPHORE; break;
|
||||
case t_barrier:
|
||||
index = ECL_BUILTIN_BARRIER; break;
|
||||
case t_mailbox:
|
||||
index = ECL_BUILTIN_MAILBOX; break;
|
||||
#endif
|
||||
case t_codeblock:
|
||||
index = ECL_BUILTIN_CODE_BLOCK; break;
|
||||
|
|
|
|||
|
|
@ -40,6 +40,10 @@
|
|||
(error "The built-in class (~A) cannot be instantiated" class))
|
||||
|
||||
(eval-when (:compile-toplevel :execute)
|
||||
;;
|
||||
;; All changes to this are connected to the changes in
|
||||
;; the code of cl_class_of() in src/instance.d
|
||||
;;
|
||||
(defconstant +builtin-classes-list+
|
||||
'(;(t object)
|
||||
(sequence)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue