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

1.1       paf         1: /** @file
                      2:        Parser: commonly used functions.
                      3: 
1.5       paf         4:        Copyright (c) 2001-2005 ArtLebedev Group (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.6     ! misha      11: static const char * const IDENT_OS_H="$Date: 2005/08/09 08:14:50 $";
        !            12: 
        !            13: #define PA_LOCK_ATTEMPTS 10
        !            14: #define PA_LOCK_WAIT_TIMEOUT 1
        !            15: 
        !            16: // 'blocking' mean we will wait till other process release lock 
        !            17: // but we'll make PA_LOCK_ATTEMPTS attempts with PA_LOCK_WAIT_TIMEOUT secs delaus between attempts 
        !            18: // 'nonblocking' mean we will make only 1 attempt without waiting
1.1       paf        19: 
                     20: int pa_lock_shared_blocking(int fd);
                     21: int pa_lock_exclusive_blocking(int fd);
                     22: int pa_lock_exclusive_nonblocking(int fd);
                     23: int pa_unlock(int fd);
                     24: 
1.2       paf        25: /// yields to OS for secs secs and usecs microseconds (1E-6)
1.1       paf        26: int pa_sleep(unsigned long secs, unsigned long usecs);
                     27: 
                     28: #endif

E-mail: