mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-20 19:42:30 -08:00
- Let GC know when we want to use threads
- Explicit pointer cast to stop gcc warning
This commit is contained in:
parent
2a4158262c
commit
b0707481eb
1 changed files with 5 additions and 2 deletions
|
|
@ -18,6 +18,9 @@
|
|||
#include "ecl.h"
|
||||
#include "internal.h"
|
||||
#include "page.h"
|
||||
#ifdef ECL_THREADS
|
||||
#define GC_THREADS
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
#include "gc.h"
|
||||
#include "private/gc_priv.h"
|
||||
|
|
@ -256,8 +259,8 @@ ecl_mark_env(struct cl_env_struct *env)
|
|||
/*memset(env->values[env->nvalues], 0, (64-env->nvalues)*sizeof(cl_object));*/
|
||||
#ifdef ECL_THREADS
|
||||
/* When using threads, "env" is a pointer to memory allocated by ECL. */
|
||||
GC_push_conditional(env, env + 1, 1);
|
||||
GC_set_mark_bit(env);
|
||||
GC_push_conditional((void *)env, (void *)(env + 1), 1);
|
||||
GC_set_mark_bit((void *)env);
|
||||
#else
|
||||
/* When not using threads, "env" is a statically allocated structure. */
|
||||
GC_push_all((ptr_t)env, (ptr_t)(env + 1));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue