summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/macros
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2006-10-19 19:20:10 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2006-10-19 19:20:10 +0000
commit04dba496a650cbd1c4ee04a12d6afa38210bcc02 (patch)
treeceb8b8394815a7285d043569b9733aa49656eb16 /cpukit/posix/macros
parente307735b24bec9f19a50f123c185b7e5f0d07014 (diff)
downloadrtems-04dba496a650cbd1c4ee04a12d6afa38210bcc02.tar.bz2
2006-10-19 Joel Sherrill <joel@OARcorp.com>
* configure.ac, itron/Makefile.am, itron/preinstall.am, posix/Makefile.am, posix/preinstall.am, rtems/Makefile.am, rtems/preinstall.am, sapi/Makefile.am, sapi/preinstall.am, score/Makefile.am, score/preinstall.am, score/include/rtems/system.h, score/include/rtems/score/chain.h, score/include/rtems/score/thread.h, score/src/chain.c, score/src/coremutexseize.c, score/src/threadget.c: Remove all macro implementations and use only the static inline. Static inline functions are now well supported so there is no reason for duplicate maintenance. * itron/macros/rtems/itron/eventflags.inl, itron/macros/rtems/itron/fmempool.inl, itron/macros/rtems/itron/intr.inl, itron/macros/rtems/itron/mbox.inl, itron/macros/rtems/itron/msgbuffer.inl, itron/macros/rtems/itron/network.inl, itron/macros/rtems/itron/port.inl, itron/macros/rtems/itron/semaphore.inl, itron/macros/rtems/itron/sysmgmt.inl, itron/macros/rtems/itron/task.inl, itron/macros/rtems/itron/time.inl, itron/macros/rtems/itron/vmempool.inl, posix/macros/rtems/posix/cond.inl, posix/macros/rtems/posix/key.inl, posix/macros/rtems/posix/mqueue.inl, posix/macros/rtems/posix/mutex.inl, posix/macros/rtems/posix/priority.inl, posix/macros/rtems/posix/pthread.inl, posix/macros/rtems/posix/semaphore.inl, posix/macros/rtems/posix/timer.inl, rtems/macros/rtems/rtems/asr.inl, rtems/macros/rtems/rtems/attr.inl, rtems/macros/rtems/rtems/barrier.inl, rtems/macros/rtems/rtems/dpmem.inl, rtems/macros/rtems/rtems/event.inl, rtems/macros/rtems/rtems/eventset.inl, rtems/macros/rtems/rtems/message.inl, rtems/macros/rtems/rtems/modes.inl, rtems/macros/rtems/rtems/options.inl, rtems/macros/rtems/rtems/part.inl, rtems/macros/rtems/rtems/ratemon.inl, rtems/macros/rtems/rtems/region.inl, rtems/macros/rtems/rtems/sem.inl, rtems/macros/rtems/rtems/status.inl, rtems/macros/rtems/rtems/support.inl, rtems/macros/rtems/rtems/tasks.inl, rtems/macros/rtems/rtems/timer.inl, sapi/macros/rtems/extension.inl, score/macros/README, score/macros/rtems/score/address.inl, score/macros/rtems/score/chain.inl, score/macros/rtems/score/corebarrier.inl, score/macros/rtems/score/coremsg.inl, score/macros/rtems/score/coremutex.inl, score/macros/rtems/score/corerwlock.inl, score/macros/rtems/score/coresem.inl, score/macros/rtems/score/corespinlock.inl, score/macros/rtems/score/heap.inl, score/macros/rtems/score/isr.inl, score/macros/rtems/score/mppkt.inl, score/macros/rtems/score/object.inl, score/macros/rtems/score/objectmp.inl, score/macros/rtems/score/priority.inl, score/macros/rtems/score/stack.inl, score/macros/rtems/score/states.inl, score/macros/rtems/score/sysstate.inl, score/macros/rtems/score/thread.inl, score/macros/rtems/score/threadmp.inl, score/macros/rtems/score/tod.inl, score/macros/rtems/score/tqdata.inl, score/macros/rtems/score/userext.inl, score/macros/rtems/score/watchdog.inl, score/macros/rtems/score/wkspace.inl: Removed.
Diffstat (limited to 'cpukit/posix/macros')
-rw-r--r--cpukit/posix/macros/rtems/posix/cond.inl104
-rw-r--r--cpukit/posix/macros/rtems/posix/key.inl58
-rw-r--r--cpukit/posix/macros/rtems/posix/mqueue.inl105
-rw-r--r--cpukit/posix/macros/rtems/posix/mutex.inl111
-rw-r--r--cpukit/posix/macros/rtems/posix/priority.inl29
-rw-r--r--cpukit/posix/macros/rtems/posix/pthread.inl58
-rw-r--r--cpukit/posix/macros/rtems/posix/semaphore.inl68
-rw-r--r--cpukit/posix/macros/rtems/posix/timer.inl57
8 files changed, 0 insertions, 590 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 */
diff --git a/cpukit/posix/macros/rtems/posix/key.inl b/cpukit/posix/macros/rtems/posix/key.inl
deleted file mode 100644
index 2c41e4b9d9..0000000000
--- a/cpukit/posix/macros/rtems/posix/key.inl
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * @file rtems/posix/key.inl
- */
-
-/* rtems/posix/key.inl
- *
- * This include file contains the macro implementation of the private
- * inlined routines for POSIX key's.
- *
- * COPYRIGHT (c) 1989-1999.
- * 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_KEY_INL
-#define _RTEMS_POSIX_KEY_INL
-
-/*PAGE
- *
- * _POSIX_Keys_Allocate
- */
-
-#define _POSIX_Keys_Allocate() \
- (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information )
-
-/*PAGE
- *
- * _POSIX_Keys_Free
- */
-
-#define _POSIX_Keys_Free( _the_key ) \
- _Objects_Free( &_POSIX_Keys_Information, &(_the_key)->Object );
-
-/*PAGE
- *
- * _POSIX_Keys_Get
- */
-
-#define _POSIX_Keys_Get( _id, _location ) \
- (POSIX_Keys_Control *) \
- _Objects_Get( &_POSIX_Keys_Information, (_id), (_location) )
-
-/*PAGE
- *
- * _POSIX_Keys_Is_null
- */
-
-#define _POSIX_Keys_Is_null( _the_key ) \
- (!(_the_key))
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/posix/macros/rtems/posix/mqueue.inl b/cpukit/posix/macros/rtems/posix/mqueue.inl
deleted file mode 100644
index f996688541..0000000000
--- a/cpukit/posix/macros/rtems/posix/mqueue.inl
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * @file rtems/posix/mqueue.inl
- */
-
-/* rtems/posix/mqueue.inl
- *
- * This include file contains the macro implementation of the private
- * inlined routines for POSIX Message Queue.
- *
- * COPYRIGHT (c) 1989-1999.
- * 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_MQUEUE_INL
-#define _RTEMS_POSIX_MQUEUE_INL
-
-/*
- * _POSIX_Message_queue_Allocate
- */
-
-#define _POSIX_Message_queue_Allocate() \
- (POSIX_Message_queue_Control *) \
- _Objects_Allocate( &_POSIX_Message_queue_Information )
-
-/*
- * _POSIX_Message_queue_Allocate_fd
- */
-
-#define _POSIX_Message_queue_Allocate_fd() \
- (POSIX_Message_queue_Control_fd *) \
- _Objects_Allocate( &_POSIX_Message_queue_Information_fds )
-
-/*
- * _POSIX_Message_queue_Free
- */
-
-#define _POSIX_Message_queue_Free( _the_mq ) \
- _Objects_Free( &_POSIX_Message_queue_Information, &(_the_mq)->Object )
-
-/*
- * _POSIX_Message_queue_Free_fd
- */
-
-#define _POSIX_Message_queue_Free_fd( _the_mq_fd ) \
- _Objects_Free( &_POSIX_Message_queue_Information_fds, &(_the_mq_fd)->Object )
-
-/*
- * _POSIX_Message_queue_Namespace_remove
- */
-
-#define _POSIX_Message_queue_Namespace_remove( _the_mq ) \
- _Objects_Namespace_remove( \
- &_POSIX_Message_queue_Information, &(_the_mq)->Object )
-
-/*
- * _POSIX_Message_queue_Get
- */
-
-#define _POSIX_Message_queue_Get( _id, _location ) \
- (POSIX_Message_queue_Control *) \
- _Objects_Get( &_POSIX_Message_queue_Information, (_id), (_location) )
-
-/*
- * _POSIX_Message_queue_Get_fd
- */
-
-#define _POSIX_Message_queue_Get_fd( _id, _location ) \
- (POSIX_Message_queue_Control_fd *) \
- _Objects_Get( &_POSIX_Message_queue_Information_fds, (_id), (_location) )
-
-/*
- *
- * _POSIX_Message_queue_Is_null
- */
-
-#define _POSIX_Message_queue_Is_null( _the_mq ) \
- (!(_the_mq))
-
-/*
- *
- * _POSIX_Message_queue_Priority_to_core
- */
-
-#define _POSIX_Message_queue_Priority_to_core( _priority ) \
- ((_priority) * -1)
-
-/*
- * _POSIX_Message_queue_Priority_from_core
- */
-
-/* absolute value without a library dependency */
-#define _POSIX_Message_queue_Priority_from_core( _priority ) \
- ((((CORE_message_queue_Submit_types)(_priority)) >= 0) ? \
- (_priority) : \
- -((CORE_message_queue_Submit_types)(_priority)))
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/posix/macros/rtems/posix/mutex.inl b/cpukit/posix/macros/rtems/posix/mutex.inl
deleted file mode 100644
index 5d8968f4b2..0000000000
--- a/cpukit/posix/macros/rtems/posix/mutex.inl
+++ /dev/null
@@ -1,111 +0,0 @@
-/**
- * @file rtems/posix/mutex.inl
- */
-
-/* rtems/posix/mutex.inl
- *
- * This include file contains the macro implementation of the private
- * inlined routines for POSIX mutex's.
- *
- * COPYRIGHT (c) 1989-1999.
- * 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_MUTEX_INL
-#define _RTEMS_POSIX_MUTEX_INL
-
-/*PAGE
- *
- * _POSIX_Mutex_Allocate
- */
-
-#define _POSIX_Mutex_Allocate() \
- (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information )
-
-/*PAGE
- *
- * _POSIX_Mutex_Free
- */
-
-#define _POSIX_Mutex_Free( _the_mutex ) \
- _Objects_Free( &_POSIX_Mutex_Information, &(_the_mutex)->Object )
-
-/*PAGE
- *
- * _POSIX_Mutex_Get
- *
- * NOTE: The support macro makes it possible for both to use exactly
- * the same code to check for NULL id pointer and
- * PTHREAD_MUTEX_INITIALIZER without adding overhead.
- */
-
-#define ___POSIX_Mutex_Get_support( _mutex, _location ) \
- do { \
- int _status; \
- Objects_Id *_id = (Objects_Id *) _mutex; \
- \
- if ( !_id ) { \
- *_location = OBJECTS_ERROR; \
- return (POSIX_Mutex_Control *) 0; \
- } \
- \
- if ( *_id == PTHREAD_MUTEX_INITIALIZER ) { \
- /* \
- * Do an "auto-create" here. \
- */ \
- \
- _status = pthread_mutex_init( (pthread_mutex_t *)_id, 0 ); \
- if ( _status ) { \
- *_location = OBJECTS_ERROR; \
- return (POSIX_Mutex_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_Mutex_Control * _POSIX_Mutex_Get(
- pthread_mutex_t *id,
- Objects_Locations *location
-)
-{
- ___POSIX_Mutex_Get_support( id, location );
-
- return (POSIX_Mutex_Control *)
- _Objects_Get( &_POSIX_Mutex_Information, *id, location );
-}
-
-/* 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_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable(
- pthread_mutex_t *id,
- Objects_Locations *location,
- ISR_Level *level
-)
-{
- ___POSIX_Mutex_Get_support( id, location );
-
- return (POSIX_Mutex_Control *)
- _Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level );
-}
-
-
-/*PAGE
- *
- * _POSIX_Mutex_Is_null
- */
-
-#define _POSIX_Mutex_Is_null( _the_mutex ) \
- (!(_the_mutex))
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/posix/macros/rtems/posix/priority.inl b/cpukit/posix/macros/rtems/posix/priority.inl
deleted file mode 100644
index 350db8b00e..0000000000
--- a/cpukit/posix/macros/rtems/posix/priority.inl
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * @file rtems/posix/priority.inl
- */
-
-/*
- * $Id$
- */
-
-#ifndef _RTEMS_POSIX_PRIORITY_INL
-#define _RTEMS_POSIX_PRIORITY_INL
-
-/*
- * 1003.1b-1993,2.2.2.80 definition of priority, p. 19
- *
- * "Numericallly higher values represent higher priorities."
- *
- * Thus, RTEMS Core has priorities run in the opposite sense of the POSIX API.
- */
-
-#define _POSIX_Priority_Is_valid( _priority ) \
- ((boolean) ((_priority) >= 1 && (_priority) <= 254))
-
-#define _POSIX_Priority_To_core( _priority ) \
- ((Priority_Control) (255 - (_priority)))
-
-#define _POSIX_Priority_From_core( _priority ) \
- (255 - (_priority))
-
-#endif
diff --git a/cpukit/posix/macros/rtems/posix/pthread.inl b/cpukit/posix/macros/rtems/posix/pthread.inl
deleted file mode 100644
index f260c3d19a..0000000000
--- a/cpukit/posix/macros/rtems/posix/pthread.inl
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * @file rtems/posix/pthread.inl
- */
-
-/* rtems/posix/pthread.inl
- *
- * This include file contains the macro implementation of the private
- * inlined routines for POSIX threads.
- *
- * COPYRIGHT (c) 1989-1999.
- * 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_PTHREAD_INL
-#define _RTEMS_POSIX_PTHREAD_INL
-
-/*PAGE
- *
- * _POSIX_Threads_Allocate
- */
-
-#define _POSIX_Threads_Allocate() \
- (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information )
-
-/*PAGE
- *
- * _POSIX_Threads_Free
- */
-
-#define _POSIX_Threads_Free( _the_pthread ) \
- _Objects_Free( &_POSIX_Threads_Information, &(_the_pthread)->Object )
-
-/*PAGE
- *
- * _POSIX_Threads_Get
- */
-
-#define _POSIX_Threads_Get( _id, _location ) \
- (Thread_Control *) \
- _Objects_Get( &_POSIX_Threads_Information, (Objects_Id)(_id), (_location) )
-
-/*PAGE
- *
- * _POSIX_Threads_Is_null
- */
-
-#define _POSIX_Threads_Is_null( _the_pthread ) \
- (!(_the_pthread))
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/posix/macros/rtems/posix/semaphore.inl b/cpukit/posix/macros/rtems/posix/semaphore.inl
deleted file mode 100644
index 757816263a..0000000000
--- a/cpukit/posix/macros/rtems/posix/semaphore.inl
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * @file rtems/posix/semaphore.inl
- */
-
-/* rtems/posix/semaphore.inl
- *
- * This include file contains the macro implementation of the private
- * inlined routines for POSIX Semaphores.
- *
- * COPYRIGHT (c) 1989-1999.
- * 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_SEMAPHORE_INL
-#define _RTEMS_POSIX_SEMAPHORE_INL
-
-/*PAGE
- *
- * _POSIX_Semaphore_Allocate
- */
-
-#define _POSIX_Semaphore_Allocate() \
- (POSIX_Semaphore_Control *) \
- _Objects_Allocate( &_POSIX_Semaphore_Information );
-
-/*PAGE
- *
- * _POSIX_Semaphore_Free
- */
-
-#define _POSIX_Semaphore_Free( _the_semaphore ) \
- _Objects_Free( &_POSIX_Semaphore_Information, &(_the_semaphore)->Object )
-
-/*PAGE
- *
- * _POSIX_Semaphore_Namespace_remove
- */
-
-#define _POSIX_Semaphore_Namespace_remove( _the_semaphore ) \
- _Objects_Namespace_remove( \
- &_POSIX_Semaphore_Information, &(_the_semaphore)->Object )
-
-/*PAGE
- *
- * _POSIX_Semaphore_Get
- */
-
-#define _POSIX_Semaphore_Get( _id, _location ) \
- (POSIX_Semaphore_Control *) \
- _Objects_Get( &_POSIX_Semaphore_Information, *(_id), (_location) )
-
-/*PAGE
- *
- * _POSIX_Semaphore_Is_null
- */
-
-#define _POSIX_Semaphore_Is_null( _the_semaphore ) \
- (!(_the_semaphore))
-
-#endif
-/* end of include file */
-
diff --git a/cpukit/posix/macros/rtems/posix/timer.inl b/cpukit/posix/macros/rtems/posix/timer.inl
deleted file mode 100644
index 7e7ad76c00..0000000000
--- a/cpukit/posix/macros/rtems/posix/timer.inl
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * @file rtems/posix/timer.inl
- */
-
-/* timer.inl
- *
- * This file contains the macro implementation of the inlined routines
- * from the POSIX Timer Manager.
- *
- * COPYRIGHT (c) 1989-1999.
- * 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_TIMER_INL
-#define _RTEMS_POSIX_TIMER_INL
-
-/*PAGE
- *
- * _POSIX_Timer_Allocate
- */
-
-#define _POSIX_Timer_Allocate() \
- (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information )
-
-/*PAGE
- *
- * _POSIX_Timer_Free
- */
-
-#define _POSIX_Timer_Free( _the_timer ) \
- _Objects_Free( &_POSIX_Timer_Information, &(_the_timer)->Object );
-
-/*PAGE
- *
- * _POSIX_Timer_Get
- */
-
-#define _POSIX_Timer_Get( _id, _location ) \
- (POSIX_Timer_Control *) \
- _Objects_Get( &_POSIX_Timer_Information, (_id), (_location) )
-
-/*PAGE
- *
- * _POSIX_Timer_Is_null
- */
-
-#define _POSIX_Timer_Is_null( _the_timer ) \
- (!(_the_timer))
-
-#endif
-/* end of include file */