summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/macros/rtems/posix/cond.inl
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/posix/macros/rtems/posix/cond.inl')
-rw-r--r--cpukit/posix/macros/rtems/posix/cond.inl104
1 files changed, 0 insertions, 104 deletions
diff --git a/cpukit/posix/macros/rtems/posix/cond.inl b/cpukit/posix/macros/rtems/posix/cond.inl
deleted file mode 100644
index bb694976ab..0000000000
--- a/cpukit/posix/macros/rtems/posix/cond.inl
+++ /dev/null
@@ -1,104 +0,0 @@
-/**
- * @file rtems/posix/cond.inl
- */
-
-/* rtems/posix/cond.inl
- *
- * This include file contains the macro implementation of the private
- * inlined routines for POSIX condition variables.
- *
- * COPYRIGHT (c) 1989-2002.
- * On-Line Applications Research Corporation (OAR).
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- *
- * $Id$
- */
-
-#ifndef _RTEMS_POSIX_COND_INL
-#define _RTEMS_POSIX_COND_INL
-
-#include <pthread.h>
-
-/*PAGE
- *
- * _POSIX_Condition_variables_Allocate
- */
-
-#define _POSIX_Condition_variables_Allocate() \
- (POSIX_Condition_variables_Control *) \
- _Objects_Allocate( &_POSIX_Condition_variables_Information )
-
-/*PAGE
- *
- * _POSIX_Condition_variables_Free
- *
- * NOTE: The support macro makes it possible for both to use exactly
- * the same code to check for NULL id pointer and
- * PTHREAD_COND_INITIALIZER without adding overhead.
- */
-
-#define _POSIX_Condition_variables_Free( _the_condition_variable ) \
- _Objects_Free( &_POSIX_Condition_variables_Information, \
- &(_the_condition_variable)->Object)
-
-/*PAGE
- *
- * _POSIX_Condition_variables_Get
- *
- * NOTE: The support macro makes it possible for both to use exactly
- * the same code to check for NULL id pointer and
- * PTHREAD_COND_INITIALIZER without adding overhead.
- */
-
-#define ___POSIX_Condition_variables_Get_support( _cond, _location ) \
- do { \
- Objects_Id *_id = (Objects_Id *)_cond; \
- int _status; \
- \
- if ( !_id ) { \
- *_location = OBJECTS_ERROR; \
- return (POSIX_Condition_variables_Control *) 0; \
- } \
- \
- if ( *_id == PTHREAD_COND_INITIALIZER ) { \
- /* \
- * Do an "auto-create" here. \
- */ \
- \
- _status = pthread_cond_init( (pthread_cond_t *)_id, 0 ); \
- if ( _status ) { \
- *_location = OBJECTS_ERROR; \
- return (POSIX_Condition_variables_Control *) 0; \
- } \
- } \
- } while (0)
-
-
-/* If we find a compiler that doesn't accept static inline functions,
- * then this will have to move to a .c file. Until then, we will use this.
- */
-static inline POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
- pthread_cond_t *cond,
- Objects_Locations *location
-)
-{
- Objects_Id *id = (Objects_Id *)cond;
- ___POSIX_Condition_variables_Get_support( id, location );
-
- return (POSIX_Condition_variables_Control *)
- _Objects_Get( &_POSIX_Condition_variables_Information, *id, location );
-}
-
-/*PAGE
- *
- * _POSIX_Condition_variables_Is_null
- */
-
-#define _POSIX_Condition_variables_Is_null( _the_condition_variable ) \
- (!(_the_condition_variable))
-
-#endif
-/* end of include file */