source: rtems/cpukit/posix/inline/rtems/posix/semaphore.inl @ 21242c2

4.115
Last change on this file since 21242c2 was 21242c2, checked in by Joel Sherrill <joel.sherrill@…>, on 06/24/11 at 17:52:58

2011-06-24 Joel Sherrill <joel.sherrill@…>

  • include/rtems/bspIo.h, include/rtems/concat.h, include/rtems/endian.h, include/rtems/fs.h, include/rtems/irq.h, include/rtems/pci.h, include/rtems/userenv.h, libblock/include/rtems/flashdisk.h, libblock/include/rtems/nvdisk-sram.h, libblock/include/rtems/nvdisk.h, libcsupport/include/clockdrv.h, libcsupport/include/console.h, libcsupport/include/iosupp.h, libcsupport/include/spurious.h, libcsupport/include/motorola/mc68230.h, libcsupport/include/rtems/assoc.h, libcsupport/include/rtems/error.h, libcsupport/include/rtems/framebuffer.h, libcsupport/include/rtems/gxx_wrappers.h, libcsupport/include/rtems/libcsupport.h, libcsupport/include/rtems/libio_.h, libcsupport/include/rtems/malloc.h, libcsupport/include/rtems/termiostypes.h, libcsupport/include/sys/statvfs.h, libcsupport/include/sys/termios.h, libcsupport/include/sys/utsname.h, libcsupport/include/zilog/z8036.h, libcsupport/include/zilog/z8530.h, libcsupport/include/zilog/z8536.h, libfs/src/imfs/imfs.h, libfs/src/pipe/pipe.h, libmisc/capture/capture-cli.h, libmisc/capture/capture.h, libmisc/cpuuse/cpuuse.h, libmisc/devnull/devnull.h, libmisc/devnull/devzero.h, libmisc/dumpbuf/dumpbuf.h, libmisc/fb/fb.h, libmisc/fb/mw_uid.h, libmisc/mouse/mouse_parser.h, libmisc/shell/shellconfig.h, libmisc/stringto/stringto.h, libmisc/untar/untar.h, libnetworking/memory.h, posix/include/aio.h, posix/include/mqueue.h, posix/include/semaphore.h, posix/include/rtems/posix/aio_misc.h, posix/include/rtems/posix/barrier.h, posix/include/rtems/posix/cond.h, posix/include/rtems/posix/config.h, posix/include/rtems/posix/key.h, posix/include/rtems/posix/mqueue.h, posix/include/rtems/posix/mutex.h, posix/include/rtems/posix/posixapi.h, posix/include/rtems/posix/priority.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/sigset.h, posix/include/rtems/posix/spinlock.h, posix/include/rtems/posix/threadsup.h, posix/include/rtems/posix/time.h, posix/include/rtems/posix/timer.h, posix/inline/rtems/posix/barrier.inl, posix/inline/rtems/posix/cond.inl, posix/inline/rtems/posix/mqueue.inl, posix/inline/rtems/posix/mutex.inl, posix/inline/rtems/posix/priority.inl, posix/inline/rtems/posix/pthread.inl, posix/inline/rtems/posix/rwlock.inl, posix/inline/rtems/posix/semaphore.inl, posix/inline/rtems/posix/spinlock.inl, posix/inline/rtems/posix/timer.inl, rtems/mainpage.h, rtems/include/rtems/rtems/barrier.h, rtems/include/rtems/rtems/object.h, rtems/include/rtems/rtems/timer.h, rtems/inline/rtems/rtems/barrier.inl, rtems/inline/rtems/rtems/timer.inl, rtems/src/semtranslatereturncode.c, sapi/include/rtems/config.h, sapi/include/rtems/fatal.h, sapi/include/rtems/mptables.h, score/include/rtems/score/object.h, score/include/rtems/score/priority.h, score/inline/rtems/score/object.inl, score/inline/rtems/score/priority.inl: Add @file Doxygen directives and descriptions to files which originated with RTEMS. This improves the file list page generated by Doxygen.
  • Property mode set to 100644
File size: 1.8 KB
Line 
1/**
2 * @file rtems/posix/semaphore.inl
3 *
4 * This include file contains the static inline implementation of the private
5 * inlined routines for POSIX Semaphores.
6 */
7
8/*
9 *  COPYRIGHT (c) 1989-2011.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.com/license/LICENSE.
15 *
16 *  $Id$
17 */
18 
19#ifndef _RTEMS_POSIX_SEMAPHORE_H
20# error "Never use <rtems/posix/semaphore.inl> directly; include <rtems/posix/semaphore.h> instead."
21#endif
22
23#ifndef _RTEMS_POSIX_SEMAPHORE_INL
24#define _RTEMS_POSIX_SEMAPHORE_INL
25 
26/*PAGE
27 *
28 *  _POSIX_Semaphore_Allocate
29 */
30 
31RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void )
32{
33  return (POSIX_Semaphore_Control *)
34    _Objects_Allocate( &_POSIX_Semaphore_Information );
35}
36 
37/*PAGE
38 *
39 *  _POSIX_Semaphore_Free
40 */
41 
42RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free (
43  POSIX_Semaphore_Control *the_semaphore
44)
45{
46  _Objects_Free( &_POSIX_Semaphore_Information, &the_semaphore->Object );
47}
48 
49/*PAGE
50 *
51 *  _POSIX_Semaphore_Namespace_remove
52 */
53 
54RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Namespace_remove (
55  POSIX_Semaphore_Control *the_semaphore
56)
57{
58  _Objects_Namespace_remove(
59    &_POSIX_Semaphore_Information, &the_semaphore->Object );
60}
61 
62
63
64/*PAGE
65 *
66 *  _POSIX_Semaphore_Get
67 */
68RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get (
69  sem_t             *id,
70  Objects_Locations *location
71)
72{
73  return (POSIX_Semaphore_Control *)
74    _Objects_Get( &_POSIX_Semaphore_Information, (Objects_Id)*id, location );
75}
76 
77/*PAGE
78 *
79 *  _POSIX_Semaphore_Is_null
80 */
81 
82RTEMS_INLINE_ROUTINE bool _POSIX_Semaphore_Is_null (
83  POSIX_Semaphore_Control *the_semaphore
84)
85{
86  return !the_semaphore;
87}
88
89#endif
90/*  end of include file */
91
Note: See TracBrowser for help on using the repository browser.