S3FC project page S3FC home page

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

s3_condition.h

Go to the documentation of this file.
00001 /*
00002  * Stone Three Foundation Class (s3fc) provides a number of utility classes.
00003  * Copyright (C) 2001 by Stone Three Signal Processing (Pty) Ltd.
00004  *
00005  * Authored by Stone Three Signal Processing (Pty) Ltd.
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2.1 of the License, or (at your option) any later version.
00011  * 
00012  * This library is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Lesser General Public License for more details.
00016  * 
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with this library; if not, write to the Free Software
00019  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020  * 
00021  * Please see the file 'COPYING' in the source root directory.
00022  */
00023 
00033 #ifndef S3_CONDITION_H
00034 #define S3_CONDITION_H
00035 
00036 #include <pthread.h>
00037 #include <s3fc/s3_mutex.h>
00038 
00055 class s3_condition
00056 {
00057   protected:
00061    pthread_cond_t cond;
00062   public:
00066    s3_condition();
00070    ~s3_condition();
00071   protected:
00076    s3_condition(const s3_condition& src);
00080    s3_condition& operator=(const s3_condition& src);
00081   public:
00088    void wait(const s3_mutex& mutex) const;
00093    void signal() const;
00097    void broadcast() const;
00098 };
00099 
00100 
00101 #endif

Send comments to: s3fc@stonethree.com SourceForge Logo