2004-03-03 16:10:26 +00:00
|
|
|
/*
|
2005-11-05 19:57:48 +00:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2004-11-28 20:09:25 +00:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 12:43:37 +00:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2004-11-22 01:38:40 +00:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-03-03 16:10:26 +00:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2004-08-18 23:24:27 +00:00
|
|
|
#include "ompi_config.h"
|
|
|
|
|
2005-07-03 22:45:48 +00:00
|
|
|
#include "opal/threads/mutex.h"
|
|
|
|
#include "opal/threads/condition.h"
|
2004-08-18 23:24:27 +00:00
|
|
|
|
2005-02-16 17:42:07 +00:00
|
|
|
#if OMPI_HAVE_POSIX_THREADS && OMPI_ENABLE_PROGRESS_THREADS
|
2004-03-03 16:10:26 +00:00
|
|
|
|
2005-07-03 22:45:48 +00:00
|
|
|
static void opal_condition_construct(opal_condition_t *c)
|
2004-03-03 16:10:26 +00:00
|
|
|
{
|
|
|
|
pthread_cond_init(&c->c_cond, NULL);
|
|
|
|
}
|
2004-08-18 23:24:27 +00:00
|
|
|
|
2005-07-03 22:45:48 +00:00
|
|
|
static void opal_condition_destruct(opal_condition_t *c)
|
2004-03-03 16:10:26 +00:00
|
|
|
{
|
|
|
|
pthread_cond_destroy(&c->c_cond);
|
|
|
|
}
|
|
|
|
|
2005-07-03 22:45:48 +00:00
|
|
|
OBJ_CLASS_INSTANCE(opal_condition_t,
|
2005-07-03 16:06:07 +00:00
|
|
|
opal_object_t,
|
2005-07-03 22:45:48 +00:00
|
|
|
opal_condition_construct,
|
|
|
|
opal_condition_destruct);
|
2004-03-03 16:10:26 +00:00
|
|
|
|
2004-08-18 23:24:27 +00:00
|
|
|
#endif
|