diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2008-02-07 23:11:34 +0100 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2008-02-07 23:11:34 +0100 |
commit | 742c6f32e038c90967e15f4740fcdacda1ad0f1f (patch) | |
tree | a9ec7095d62dcdfcd0b6f49d7d5a128f5ba0dbf1 /Objective-C/libobjcl.h | |
parent | 0659e7a29136823cba53c05fa94df2db29a3ddbc (diff) |
Objective-C layer: Implement locking using semaphores.
darcs-hash:3a1f9d1f6597b32c20efcd7ab2cf2721c1bdfe43
Diffstat (limited to 'Objective-C/libobjcl.h')
-rw-r--r-- | Objective-C/libobjcl.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Objective-C/libobjcl.h b/Objective-C/libobjcl.h index 270af45..afe9f56 100644 --- a/Objective-C/libobjcl.h +++ b/Objective-C/libobjcl.h @@ -43,6 +43,18 @@ typedef Ivar IVAR_T; typedef struct objc_ivar *IVAR_T; #endif +#ifdef HAVE_SYS_SEM_H +#include <sys/sem.h> +/* 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 + extern NSException *objcl_oom_exception; extern id objcl_current_exception; extern void *objcl_current_exception_lock; @@ -159,3 +171,6 @@ objcl_acquire_lock (void *lock); void objcl_release_lock (void *lock); + +void +objcl_initialise_lock (void **lock); |