|
|
| version 1.16, 2016/11/30 17:01:01 | version 1.19, 2020/12/15 17:10:36 |
|---|---|
| Line 1 | Line 1 |
| /** @file | /** @file |
| Parser: commonly functions. | Parser: commonly functions. |
| Copyright (c) 2001-2015 Art. Lebedev Studio (http://www.artlebedev.com) | Copyright (c) 2001-2020 Art. Lebedev Studio (http://www.artlebedev.com) |
| Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) | Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) |
| */ | */ |
| Line 10 | Line 10 |
| volatile const char * IDENT_PA_OS_C="$Id$" IDENT_PA_OS_H; | volatile const char * IDENT_PA_OS_C="$Id$" IDENT_PA_OS_H; |
| unsigned int pa_lock_attempts=PA_LOCK_ATTEMPTS; | |
| #ifdef _MSC_VER | #ifdef _MSC_VER |
| #include <windows.h> | #include <windows.h> |
| #endif | #endif |
| Line 66 int pa_lock(int fd, int attempts, int op | Line 68 int pa_lock(int fd, int attempts, int op |
| }; | }; |
| int pa_lock_shared_blocking(int fd) { | int pa_lock_shared_blocking(int fd) { |
| return pa_lock(fd, PA_LOCK_ATTEMPTS, PA_SH_LOCK); | return pa_lock(fd, pa_lock_attempts, PA_SH_LOCK); |
| } | } |
| int pa_lock_exclusive_blocking(int fd) { | int pa_lock_exclusive_blocking(int fd) { |
| return pa_lock(fd, PA_LOCK_ATTEMPTS, PA_EX_LOCK); | return pa_lock(fd, pa_lock_attempts, PA_EX_LOCK); |
| } | } |
| int pa_lock_exclusive_nonblocking(int fd) { | int pa_lock_exclusive_nonblocking(int fd) { |