2004-03-03 16:10:26 +00:00
|
|
|
/*
|
2004-11-22 01:38:40 +00:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
|
|
* All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
|
|
* 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-01-25 20:01:06 +00:00
|
|
|
#include "threads/mutex.h"
|
|
|
|
#include "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
|
|
|
|
2004-08-19 19:29:01 +00:00
|
|
|
static void ompi_condition_construct(ompi_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
|
|
|
|
2004-08-19 19:29:01 +00:00
|
|
|
static void ompi_condition_destruct(ompi_condition_t *c)
|
2004-03-03 16:10:26 +00:00
|
|
|
{
|
|
|
|
pthread_cond_destroy(&c->c_cond);
|
|
|
|
}
|
|
|
|
|
2004-08-18 23:24:27 +00:00
|
|
|
OBJ_CLASS_INSTANCE(ompi_condition_t,
|
|
|
|
ompi_object_t,
|
|
|
|
ompi_condition_construct,
|
|
|
|
ompi_condition_destruct);
|
2004-03-03 16:10:26 +00:00
|
|
|
|
2004-08-18 23:24:27 +00:00
|
|
|
#endif
|