source: rtems/cpukit/posix/include/rtems/posix/key.h @ 12a191ae

4.104.115
Last change on this file since 12a191ae was 12a191ae, checked in by Joel Sherrill <joel.sherrill@…>, on 07/22/09 at 00:09:31

2009-07-21 Joel Sherrill <joel.sherrill@…>

  • posix/include/rtems/posix/key.h, posix/src/keycreate.c, posix/src/keydelete.c, posix/src/keyrundestructors.c: Restructure a bit to make it easier to do coverage analysis. Eliminate is_active member of control structure because it was redundant with very the key object was open or closed.
  • Property mode set to 100644
File size: 2.2 KB
RevLine 
[6c2675d]1/**
2 * @file rtems/posix/key.h
3 */
4
[5e9b32b]5/*  rtems/posix/key.h
6 *
7 *  This include file contains all the private support information for
8 *  POSIX key.
9 *
[309e2f6]10 *  COPYRIGHT (c) 1989-2008.
[5e9b32b]11 *  On-Line Applications Research Corporation (OAR).
12 *
[98e4ebf5]13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
[8e36f29]15 *  http://www.rtems.com/license/LICENSE.
[5e9b32b]16 *
17 *  $Id$
18 */
[874297f3]19
[5ec2f12d]20#ifndef _RTEMS_POSIX_KEY_H
21#define _RTEMS_POSIX_KEY_H
[874297f3]22
[5e9b32b]23#ifdef __cplusplus
24extern "C" {
25#endif
26
[12a191ae]27/**
28 *  This is the data Structure used to manage a POSIX key.
[5e9b32b]29 *
[12a191ae]30 *  @note The Values is a table indexed by the index portion of the
31 *        ID of the currently executing thread.
[5e9b32b]32 */
33typedef struct {
[12a191ae]34   /** This field is the Object control structure. */
[5e9b32b]35   Objects_Control     Object;
[12a191ae]36   /** This field points to the optional destructor method. */
[5e9b32b]37   void              (*destructor)( void * );
[12a191ae]38   /** This field points to the values per thread. */
[3c465878]39   void              **Values[ OBJECTS_APIS_LAST + 1 ];
[5e9b32b]40}  POSIX_Keys_Control;
41
[12a191ae]42/**
[5e9b32b]43 *  The following defines the information control block used to manage
44 *  this class of objects.
45 */
[c627b2a3]46POSIX_EXTERN Objects_Information  _POSIX_Keys_Information;
[874297f3]47
[12a191ae]48/**
49 *  @brief _POSIX_Keys_Manager_initialization
[5e9b32b]50 *
51 *  This routine performs the initialization necessary for this manager.
52 */
[309e2f6]53void _POSIX_Key_Manager_initialization(void);
[874297f3]54
[12a191ae]55/**
56 *  @brief _POSIX_Keys_Run_destructors
[5e9b32b]57 *
58 *  This function executes all the destructors associated with the thread's
59 *  keys.  This function will execute until all values have been set to NULL.
60 *
[12a191ae]61 *  @param[in] thread is the thread whose keys should have all their
62 *             destructors run.
63 *
64 *  @note This is the routine executed when a thread exits to
65 *        run through all the keys and do the destructor action.
[5e9b32b]66 */
67void _POSIX_Keys_Run_destructors(
68  Thread_Control *thread
69);
70
[12a191ae]71/**
72 *  @brief _POSIX_Keys_Free
[5e9b32b]73 *
74 *  This routine frees a keys control block to the
75 *  inactive chain of free keys control blocks.
[12a191ae]76 *
77 *  @param[in] the_key is the POSIX key to free.
[5e9b32b]78 */
[503dc058]79RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
[5e9b32b]80  POSIX_Keys_Control *the_key
81);
[874297f3]82
[5e9b32b]83#include <rtems/posix/key.inl>
84
85#ifdef __cplusplus
86}
87#endif
[874297f3]88
[5e9b32b]89#endif
90/*  end of include file */
Note: See TracBrowser for help on using the repository browser.