Branch: Tag:

2007-10-06

2007-10-06 13:10:12 by Marcus Comstedt <marcus@mc.pp.se>

* Added new API functions call_with_interpreter(), enable_external_threads()
and disable_external_threads(). The first can be used to call a C
function in a context where the Pike interpreter is available. The
other two are used to notify Pike that there are external threads that
might be competing for the interpreter lock (e.g. by calling the first
function).

* Made the Java module use these new functions.

Rev: src/modules/Java/jvm.c:1.82
Rev: src/threads.c:1.255
Rev: src/threads.h:1.133

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: threads.h,v 1.132 2007/06/10 18:11:13 mast Exp $ + || $Id: threads.h,v 1.133 2007/10/06 13:10:12 marcus Exp $   */      #ifndef THREADS_H
110:   int th_num_idle_farmers(void);   int th_num_farmers(void);   PMOD_EXPORT void th_farm(void (*fun)(void *), void *here); + PMOD_EXPORT void call_with_interpreter(void (*func)(void *ctx), void *ctx); + PMOD_EXPORT void enable_external_threads(void); + PMOD_EXPORT void disable_external_threads(void);   /* Prototypes end here */      #endif