diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2008-02-16 14:32:36 +0100 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2008-02-16 14:32:36 +0100 |
commit | 82f36a23a52b6e25703a70c40568feb0cd0e3fd2 (patch) | |
tree | 43b3d019be16bc96514f415b514e005ff0f72f96 /Objective-C/libobjcl.h | |
parent | 2a61fbdd27d9a3ff4dea7b2f1f193668b13f2f1b (diff) |
Use NSRecursiveLock rather than POSIX semaphores.
darcs-hash:247b2833d2767a5c432fc1f64155ed5ff2b8763f
Diffstat (limited to 'Objective-C/libobjcl.h')
-rw-r--r-- | Objective-C/libobjcl.h | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/Objective-C/libobjcl.h b/Objective-C/libobjcl.h index 35d6150..c8c6766 100644 --- a/Objective-C/libobjcl.h +++ b/Objective-C/libobjcl.h @@ -17,7 +17,9 @@ * <http://www.gnu.org/licenses/>. */ -#import "Foundation/Foundation.h" +#import "Foundation/NSException.h" +#import "Foundation/NSLock.h" + #include <objc/objc-api.h> #include "../config.h" @@ -43,23 +45,10 @@ typedef Ivar IVAR_T; typedef struct objc_ivar *IVAR_T; #endif -#ifdef HAVE_SYS_SEM_H -#include <sys/sem.h> -#ifndef __APPLE__ -/* According to the Single Unix Specification, Version 3, the semun - union type must be defined by the application writer as follows: */ -union semun -{ - int val; /* Value for SETVAL */ - struct semid_ds *buf; /* Buffer for IPC_STAT, IPC_SET */ - unsigned short *array; /* Array for GETALL, SETALL */ -}; -#endif -#endif extern NSException *objcl_oom_exception; extern id objcl_current_exception; -extern void *objcl_current_exception_lock; +extern NSRecursiveLock *objcl_current_exception_lock; void @@ -173,13 +162,10 @@ objcl_create_imp (IMP callback, const char *arg_typespecs[]); void -objcl_acquire_lock (void *lock); - -void -objcl_release_lock (void *lock); +objcl_acquire_lock (id lock); void -objcl_initialise_lock (void **lock); +objcl_release_lock (id lock); Class objcl_create_class (const char *class_name, |