Annotation of parser3/src/targets/apache13/modules/extra/pa_threads.C, revision 1.4

1.1       parser      1: /** @file
                      2:        Parser: Mutex realization class.
                      3: 
                      4:        Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com)
                      5: 
                      6:        Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf)
                      7: */
1.4     ! parser      8: static const char *RCSId="$Id: date.C,v 1.6 2001/09/04 10:50:19 parser Exp $"; 
1.1       parser      9: 
                     10: #include "pa_threads.h"
                     11: 
1.2       parser     12: Mutex global_mutex;
1.1       parser     13: 
                     14: #include "ap_config.h"
1.2       parser     15: #include "multithread.h"
                     16: // defined in ap_config
                     17: #ifdef MULTITHREAD
1.1       parser     18: 
1.2       parser     19: Mutex::Mutex() : 
                     20:        handle(reinterpret_cast<uint>(ap_create_mutex(0))) {
1.1       parser     21: }
                     22: 
                     23: Mutex::~Mutex() {
                     24:        ap_destroy_mutex(reinterpret_cast<mutex *>(handle));
                     25: }
                     26: 
                     27: void Mutex::acquire() {
                     28:        ap_acquire_mutex(reinterpret_cast<mutex *>(handle));
                     29: }
                     30: 
                     31: void Mutex::release() {
                     32:        ap_release_mutex(reinterpret_cast<mutex *>(handle));
                     33: }
1.2       parser     34: 
                     35: #else
                     36: 
                     37: Mutex::Mutex() {}
                     38: Mutex::~Mutex() {}
                     39: void Mutex::acquire() {}
                     40: void Mutex::release() {}
1.1       parser     41: 
                     42: #endif

E-mail: