mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 01:31:08 +00:00
Check if objc_thread_add in runtime
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@9320 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
698493ef14
commit
92f9b03239
5 changed files with 183 additions and 173 deletions
|
@ -1,3 +1,9 @@
|
|||
2001-03-10 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* configure.in: Check for objc_thread_add in runtime.
|
||||
* Source/NSThread.m (objc_thread_add): Define only if not in runtime
|
||||
(objc_thread_remove): Likewise.
|
||||
|
||||
2001-03-10 Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
|
||||
* GSXML.m/.h: added errer, warning and fatal error methods with
|
||||
|
|
|
@ -102,6 +102,9 @@
|
|||
/* Define if you have the objc_condition_timedwait function. */
|
||||
#undef HAVE_OBJC_CONDITION_TIMEDWAIT
|
||||
|
||||
/* Define if you have the objc_thread_add function. */
|
||||
#undef HAVE_OBJC_THREAD_ADD
|
||||
|
||||
/* Define if you have the readlink function. */
|
||||
#undef HAVE_READLINK
|
||||
|
||||
|
|
|
@ -36,15 +36,13 @@
|
|||
#include <Foundation/NSNotificationQueue.h>
|
||||
|
||||
#ifndef NO_GNUSTEP
|
||||
#ifndef HAVE_OBJC_THREAD_ADD
|
||||
/* We need to access these private vars in the objc runtime - because
|
||||
the objc runtime's API is not enough powerful for the GNUstep
|
||||
extensions we want to add. */
|
||||
#include <objc/runtime.h>
|
||||
extern int __objc_is_multi_threaded;
|
||||
extern objc_mutex_t __objc_runtime_mutex;
|
||||
extern int __objc_runtime_threads_alive;
|
||||
|
||||
/* TODO: Submit patches to the objc runtime to add the following
|
||||
two functions */
|
||||
inline static void objc_thread_add ()
|
||||
{
|
||||
objc_mutex_lock(__objc_runtime_mutex);
|
||||
|
@ -59,6 +57,7 @@ inline static void objc_thread_remove ()
|
|||
__objc_runtime_threads_alive--;
|
||||
objc_mutex_unlock(__objc_runtime_mutex);
|
||||
}
|
||||
#endif /* not HAVE_OBJC_THREAD_ADD */
|
||||
#endif
|
||||
|
||||
@interface NSThread (Private)
|
||||
|
|
|
@ -456,8 +456,9 @@ CPPFLAGS="$saved_CPPFLAGS"
|
|||
#--------------------------------------------------------------------
|
||||
# This function needed by NSLock.m for conditioned wait
|
||||
# get_uninstalled_dtable used by behavior.m and objc-load.m
|
||||
# Thread functions used by NSThread
|
||||
#--------------------------------------------------------------------
|
||||
AC_CHECK_FUNCS(objc_condition_timedwait)
|
||||
AC_CHECK_FUNCS(objc_condition_timedwait objc_thread_add)
|
||||
|
||||
AC_EGREP_HEADER(objc_get_uninstalled_dtable, objc/objc-api.h,
|
||||
AC_DEFINE(HAVE_OBJC_GET_UNINSTALLED_DTABLE),)
|
||||
|
|
Loading…
Reference in a new issue