diff options
author | Andy Broad <andy@broad.ology.org.uk> | 2015-09-13 19:55:41 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2015-09-16 07:44:29 -0400 |
commit | 1cd70adfb6a06a0dc72d31fc7011592a3674b183 (patch) | |
tree | c9163447716e96f211377476cc035e79c60d72e4 /amigaos4/amigaos.h | |
parent | 738ab09f5846887e462080d6443fb8d1e751f247 (diff) | |
download | perl-1cd70adfb6a06a0dc72d31fc7011592a3674b183.tar.gz |
amigaos4: implement flock() emulation
Beware: not an exact implementation, the locks follow the OS level
filehandle not the process.
Diffstat (limited to 'amigaos4/amigaos.h')
-rw-r--r-- | amigaos4/amigaos.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/amigaos4/amigaos.h b/amigaos4/amigaos.h index 96f521d59b..2f6d4b2d49 100644 --- a/amigaos4/amigaos.h +++ b/amigaos4/amigaos.h @@ -52,4 +52,15 @@ long amigaos_get_file(int fd); // BOOL constructed; +/* emulated flock stuff */ + +#define LOCK_SH 1 /* Shared lock. */ +#define LOCK_EX 2 /* Exclusive lock. */ +#define LOCK_UN 8 /* Unlock. */ +#define LOCK_NB 4 /* Don't block when locking. */ + +extern int flock(int fd, int operation); + +#define flock(a, b) amigaos_flock((a), (b)) + #endif |