source: rtems/cpukit/posix/include/rtems/posix/spinlock.h @ e49a36cb

4.115
Last change on this file since e49a36cb was e49a36cb, checked in by Alex Ivanov <alexivanov97@…>, on 12/15/12 at 14:54:10

posix: Doxygen Enhancement Task #5

http://www.google-melange.com/gci/task/view/google/gci2012/7959229

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/**
2 * @file rtems/posix/spinlock.h
3 *
4 * This include file contains all the constants and structures associated
5 * with the POSIX Spinlock Manager.
6 *
7 *  Directives provided are:
8 *
9 *   - create a spinlock
10 *   - delete a spinlock
11 *   - wait for a spinlock
12 */
13
14/*
15 *  COPYRIGHT (c) 1989-2011.
16 *  On-Line Applications Research Corporation (OAR).
17 *
18 *  The license and distribution terms for this file may be
19 *  found in the file LICENSE in this distribution or at
20 *  http://www.rtems.com/license/LICENSE.
21 */
22
23#ifndef _RTEMS_POSIX_SPINLOCK_H
24#define _RTEMS_POSIX_SPINLOCK_H
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30/**
31 * @defgroup POSIX_SPINLOCK POSIX Spinlock Support
32 *
33 * @ingroup POSIX
34 *
35 * @brief Constants and Structures Associated with the POSIX Spinlock Manager
36 */
37
38#include <rtems/score/object.h>
39#include <rtems/score/corespinlock.h>
40
41/**
42 *  This type defines the control block used to manage each spinlock.
43 */
44
45typedef struct {
46  /** This is used to manage a spinlock as an object. */
47  Objects_Control          Object;
48  /** This is used to implement the spinlock. */
49  CORE_spinlock_Control    Spinlock;
50}   POSIX_Spinlock_Control;
51
52/**
53 *  The following defines the information control block used to manage
54 *  this class of objects.
55 */
56
57POSIX_EXTERN Objects_Information  _POSIX_Spinlock_Information;
58
59/**
60 *  @brief _POSIX_Spinlock_Manager_initialization
61 *
62 *  This routine performs the initialization necessary for this manager.
63 *
64 *  @param[in] maximum_spinlocks is the total number of spinlocks allowed to
65 *             concurrently be active in the system.
66 */
67
68void _POSIX_Spinlock_Manager_initialization(void);
69
70/**
71 *  @brief POSIX Spinlock Translate Core Spinlock Return Code
72 *
73 *  This routine translates SuperCore Spinlock status codes into the
74 *  corresponding POSIX ones.
75 *
76 *
77 *  @param[in] the_spinlock_status is the SuperCore status.
78 *
79 *  @return the corresponding POSIX status
80 */
81int _POSIX_Spinlock_Translate_core_spinlock_return_code(
82  CORE_spinlock_Status  the_spinlock_status
83);
84
85#ifndef __RTEMS_APPLICATION__
86#include <rtems/posix/spinlock.inl>
87#endif
88
89#ifdef __cplusplus
90}
91#endif
92
93#endif
94/*  end of include file */
Note: See TracBrowser for help on using the repository browser.