source: rtems/cpukit/posix/include/rtems/posix/spinlock.h @ 309e2f6

4.104.115
Last change on this file since 309e2f6 was 309e2f6, checked in by Joel Sherrill <joel.sherrill@…>, on 12/17/08 at 21:23:37

2008-12-17 Joel Sherrill <joel.sherrill@…>

  • posix/include/rtems/posix/barrier.h, posix/include/rtems/posix/cond.h, posix/include/rtems/posix/key.h, posix/include/rtems/posix/mqueue.h, posix/include/rtems/posix/mutex.h, posix/include/rtems/posix/psignal.h, posix/include/rtems/posix/pthread.h, posix/include/rtems/posix/ptimer.h, posix/include/rtems/posix/rwlock.h, posix/include/rtems/posix/semaphore.h, posix/include/rtems/posix/spinlock.h, posix/include/rtems/posix/timer.h, posix/src/cond.c, posix/src/key.c, posix/src/mqueue.c, posix/src/mutex.c, posix/src/pbarrier.c, posix/src/prwlock.c, posix/src/psignal.c, posix/src/pspin.c, posix/src/pthread.c, posix/src/pthreadinitthreads.c, posix/src/ptimer.c, posix/src/semaphore.c, sapi/src/posixapi.c: Convert POSIX manager initialization routines to directly pull parameters from configuration table.
  • Property mode set to 100644
File size: 2.0 KB
Line 
1/**
2 * @file rtems/posix/spinlock.h
3 */
4
5/*
6 *  This include file contains all the constants and structures associated
7 *  with the POSIX Spinlock Manager.
8 *
9 *  Directives provided are:
10 *
11 *     + create a spinlock
12 *     + delete a spinlock
13 *     + wait for a spinlock
14 *
15 *  COPYRIGHT (c) 1989-2008.
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 *  $Id$
23 */
24
25#ifndef _RTEMS_POSIX_SPINLOCK_H
26#define _RTEMS_POSIX_SPINLOCK_H
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32#include <rtems/score/object.h>
33#include <rtems/score/corespinlock.h>
34
35/**
36 *  This type defines the control block used to manage each spinlock.
37 */
38
39typedef struct {
40  /** This is used to manage a spinlock as an object. */
41  Objects_Control          Object;
42  /** This is used to implement the spinlock. */
43  CORE_spinlock_Control    Spinlock;
44}   POSIX_Spinlock_Control;
45
46/**
47 *  The following defines the information control block used to manage
48 *  this class of objects.
49 */
50
51POSIX_EXTERN Objects_Information  _POSIX_Spinlock_Information;
52
53/**
54 *  @brief _POSIX_Spinlock_Manager_initialization
55 *
56 *  This routine performs the initialization necessary for this manager.
57 *
58 *  @param[in] maximum_spinlocks is the total number of spinlocks allowed to
59 *             concurrently be active in the system.
60 */
61
62void _POSIX_Spinlock_Manager_initialization(void);
63
64/**
65 *  @brief _POSIX_Spinlock_Translate_core_spinlock_return_code (
66 *
67 *  This routine translates SuperCore Spinlock status codes into the
68 *  corresponding POSIX ones.
69 *
70 *
71 *  @param[in] the_spinlock_status is the SuperCore status.
72 *
73 *  @return the corresponding POSIX status
74 */
75int _POSIX_Spinlock_Translate_core_spinlock_return_code(
76  CORE_spinlock_Status  the_spinlock_status
77);
78
79#ifndef __RTEMS_APPLICATION__
80#include <rtems/posix/spinlock.inl>
81#endif
82
83#ifdef __cplusplus
84}
85#endif
86
87#endif
88/*  end of include file */
Note: See TracBrowser for help on using the repository browser.