source: rtems/cpukit/score/inline/rtems/score/threadmp.inl @ e3fbffb

4.10
Last change on this file since e3fbffb was e3fbffb, checked in by Joel Sherrill <joel.sherrill@…>, on 11/09/11 at 18:44:01

2011-11-09 Werner Almesberger <werner@…>

PR 1957/cpukit

  • score/include/rtems/score/coremutex.h, score/inline/rtems/score/threadmp.inl: Add parentheses to protect macro arguments.
  • Property mode set to 100644
File size: 1.4 KB
Line 
1/**
2 *  @file  rtems/score/threadmp.inl
3 *
4 *  This include file contains the bodies of all inlined routines
5 *  for the multiprocessing part of thread package.
6 */
7
8/*
9 *  COPYRIGHT (c) 1989-2008.
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_SCORE_THREADMP_H
20# error "Never use <rtems/score/threadmp.inl> directly; include <rtems/score/threadmp.h> instead."
21#endif
22
23#include <rtems/score/mpci.h>
24
25#ifndef _RTEMS_SCORE_THREADMP_INL
26#define _RTEMS_SCORE_THREADMP_INL
27
28/**
29 *  @addtogroup ScoreThreadMP
30 *  @{
31 */
32
33/**
34 *  This function returns true if the thread in question is the
35 *  multiprocessing receive thread.
36 *
37 *  @note This is a macro to avoid needing a prototype for
38 *        _MPCI_Receive_server_tcb until it is used.
39 */
40#define _Thread_MP_Is_receive(_the_thread) \
41  ((_the_thread) == _MPCI_Receive_server_tcb)
42
43/**
44 *  This routine frees a proxy control block to the
45 *  inactive chain of free proxy control blocks.
46 */
47
48RTEMS_INLINE_ROUTINE void _Thread_MP_Free_proxy (
49  Thread_Control *the_thread
50)
51{
52  Thread_Proxy_control *the_proxy;
53
54  the_proxy = (Thread_Proxy_control *) the_thread;
55
56  _Chain_Extract( &the_proxy->Active );
57
58  _Chain_Append( &_Thread_MP_Inactive_proxies, &the_thread->Object.Node );
59}
60
61/**@}*/
62
63#endif
64/* end of include file */
Note: See TracBrowser for help on using the repository browser.