Annotation of parser3/src/include/pa_os.h, revision 1.8

1.1       paf         1: /** @file
                      2:        Parser: commonly used functions.
                      3: 
1.8     ! moko        4:        Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com)
1.1       paf         5:        Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
                      6: */
                      7: 
                      8: #ifndef PA_OS_H
                      9: #define PA_OS_H
                     10: 
1.8     ! moko       11: #define IDENT_PA_OS_H "$Id: 2007-05-24 10:32:42 $"
1.6       misha      12: 
1.7       misha      13: #define PA_LOCK_ATTEMPTS 20
                     14: #define PA_LOCK_WAIT_TIMEOUT_SECS 0
                     15: #define PA_LOCK_WAIT_TIMEOUT_USECS 500000
1.6       misha      16: 
                     17: // 'blocking' mean we will wait till other process release lock 
                     18: // but we'll make PA_LOCK_ATTEMPTS attempts with PA_LOCK_WAIT_TIMEOUT secs delaus between attempts 
                     19: // 'nonblocking' mean we will make only 1 attempt without waiting
1.1       paf        20: 
                     21: int pa_lock_shared_blocking(int fd);
                     22: int pa_lock_exclusive_blocking(int fd);
                     23: int pa_lock_exclusive_nonblocking(int fd);
                     24: int pa_unlock(int fd);
                     25: 
1.2       paf        26: /// yields to OS for secs secs and usecs microseconds (1E-6)
1.1       paf        27: int pa_sleep(unsigned long secs, unsigned long usecs);
                     28: 
                     29: #endif

E-mail: