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

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: 
        !             8:        $Id: pa_pool.C,v 1.17 2001/03/23 13:08:11 paf Exp $
        !             9: */
        !            10: 
        !            11: #include "pa_threads.h"
        !            12: 
        !            13: #ifdef MULTITHREAD
        !            14: 
        !            15: #include "ap_config.h"
        !            16: 
        !            17: Mutex global_mutex;
        !            18: 
        !            19: Mutex::Mutex() {
        !            20:        handle=reinterpret_cast<mutex *>(ap_create_mutex(0));
        !            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: }
        !            34: 
        !            35: #endif

E-mail: