diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-08-06 14:46:24 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-08-06 15:47:57 +0200 |
commit | 2ad250e92d2978b56a9a552a0b55c1f8046312cb (patch) | |
tree | a1aa5613b23bcb54c995546be8591430e3304aea /cpukit/posix/inline | |
parent | psxtests/psx14: Include missing header file (diff) | |
download | rtems-2ad250e92d2978b56a9a552a0b55c1f8046312cb.tar.bz2 |
posix: Create key implementation header
Move implementation specific parts of key.h and key.inl into new header
file keyimpl.h. The key.h contains now only the application visible
API.
Diffstat (limited to 'cpukit/posix/inline')
-rw-r--r-- | cpukit/posix/inline/rtems/posix/key.inl | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/cpukit/posix/inline/rtems/posix/key.inl b/cpukit/posix/inline/rtems/posix/key.inl deleted file mode 100644 index ce5601b06d..0000000000 --- a/cpukit/posix/inline/rtems/posix/key.inl +++ /dev/null @@ -1,92 +0,0 @@ -/** - * @file - * - * @brief Private Inlined Routines for POSIX Key's - * - * This include file contains the static inline 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. - */ - -#ifndef _RTEMS_POSIX_KEY_H -# error "Never use <rtems/posix/key.inl> directly; include <rtems/posix/key.h> instead." -#endif - -#ifndef _RTEMS_POSIX_KEY_INL -#define _RTEMS_POSIX_KEY_INL - -/** - * @brief Allocate a keys control block. - * - * This function allocates a keys control block from - * the inactive chain of free keys control blocks. - */ - -RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) -{ - return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); -} - -/** - * @brief Free a keys control block. - * - * This routine frees a keys control block to the - * inactive chain of free keys control blocks. - */ -RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( - POSIX_Keys_Control *the_key -) -{ - _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); -} - -/** - * @brief Get a keys control block. - * - * This function maps key IDs to key control blocks. - * If ID corresponds to a local keys, then it returns - * the_key control pointer which maps to ID and location - * is set to OBJECTS_LOCAL. if the keys ID is global and - * resides on a remote node, then location is set to OBJECTS_REMOTE, - * and the_key is undefined. Otherwise, location is set - * to OBJECTS_ERROR and the_key is undefined. - */ - -RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get ( - pthread_key_t id, - Objects_Locations *location -) -{ - return (POSIX_Keys_Control *) - _Objects_Get( &_POSIX_Keys_Information, (Objects_Id) id, location ); -} - -/** - * @brief Check if a keys control block is NULL. - * - * This function returns @c TRUE if the_key is @c NULL and @c FALSE - * otherwise. - * - * @param[in] the_key is the pointer to the key control block to be checked. - * - * @retval TRUE The key control block is @c NULL. - * @retval FALSE The key control block is not @c NULL. - */ -RTEMS_INLINE_ROUTINE bool _POSIX_Keys_Is_null ( - POSIX_Keys_Control *the_key -) -{ - return !the_key; -} - -#endif -/* end of include file */ - |