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

4.104.11
Last change on this file since 12a191ae was 12a191ae, checked in by Joel Sherrill <joel.sherrill@…>, on Jul 22, 2009 at 12:09:31 AM

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
Line 
1/**
2 * @file rtems/posix/key.h
3 */
4
5/*  rtems/posix/key.h
6 *
7 *  This include file contains all the private support information for
8 *  POSIX key.
9 *
10 *  COPYRIGHT (c) 1989-2008.
11 *  On-Line Applications Research Corporation (OAR).
12 *
13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *  http://www.rtems.com/license/LICENSE.
16 *
17 *  $Id$
18 */
19
20#ifndef _RTEMS_POSIX_KEY_H
21#define _RTEMS_POSIX_KEY_H
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/**
28 *  This is the data Structure used to manage a POSIX key.
29 *
30 *  @note The Values is a table indexed by the index portion of the
31 *        ID of the currently executing thread.
32 */
33typedef struct {
34   /** This field is the Object control structure. */
35   Objects_Control     Object;
36   /** This field points to the optional destructor method. */
37   void              (*destructor)( void * );
38   /** This field points to the values per thread. */
39   void              **Values[ OBJECTS_APIS_LAST + 1 ];
40}  POSIX_Keys_Control;
41
42/**
43 *  The following defines the information control block used to manage
44 *  this class of objects.
45 */
46POSIX_EXTERN Objects_Information  _POSIX_Keys_Information;
47
48/**
49 *  @brief _POSIX_Keys_Manager_initialization
50 *
51 *  This routine performs the initialization necessary for this manager.
52 */
53void _POSIX_Key_Manager_initialization(void);
54
55/**
56 *  @brief _POSIX_Keys_Run_destructors
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 *
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.
66 */
67void _POSIX_Keys_Run_destructors(
68  Thread_Control *thread
69);
70
71/**
72 *  @brief _POSIX_Keys_Free
73 *
74 *  This routine frees a keys control block to the
75 *  inactive chain of free keys control blocks.
76 *
77 *  @param[in] the_key is the POSIX key to free.
78 */
79RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
80  POSIX_Keys_Control *the_key
81);
82
83#include <rtems/posix/key.inl>
84
85#ifdef __cplusplus
86}
87#endif
88
89#endif
90/*  end of include file */
Note: See TracBrowser for help on using the repository browser.